diff --git a/javascripts/discourse/components/spreadsheet-editor.hbs b/javascripts/discourse/components/spreadsheet-editor.hbs
index 881f3c2..3a753d3 100644
--- a/javascripts/discourse/components/spreadsheet-editor.hbs
+++ b/javascripts/discourse/components/spreadsheet-editor.hbs
@@ -4,27 +4,6 @@
class="insert-table-modal"
>
<:body>
- {{#if this.isEditingTable}}
-
-
- {{#if this.showEditReason}}
-
- {{/if}}
-
- {{/if}}
-
+ {{#if this.isEditingTable}}
+
+
+ {{#if this.showEditReason}}
+
+ {{/if}}
+
+ {{/if}}
diff --git a/javascripts/discourse/components/spreadsheet-editor.js b/javascripts/discourse/components/spreadsheet-editor.js
index 13d78c7..446b0b3 100644
--- a/javascripts/discourse/components/spreadsheet-editor.js
+++ b/javascripts/discourse/components/spreadsheet-editor.js
@@ -60,11 +60,7 @@ export default class SpreadsheetEditor extends Component {
@action
showEditReasonField() {
- if (this.showEditReason) {
- this.showEditReason = false;
- } else {
- this.showEditReason = true;
- }
+ this.showEditReason = !this.showEditReason;
}
@action
diff --git a/scss/modal/insert-table-modal.scss b/scss/modal/insert-table-modal.scss
index 2cf6dd7..00079a0 100644
--- a/scss/modal/insert-table-modal.scss
+++ b/scss/modal/insert-table-modal.scss
@@ -25,24 +25,16 @@
.modal-inner-container {
--modal-max-width: $reply-area-max-width;
- width: $reply-area-max-width;
+ width: 100%;
+ height: 100%;
- @media screen and (max-width: 1200px) {
- --modal-max-width: 90%;
- width: 100vw;
- }
+ display: grid;
+ grid-template-rows: auto 1fr auto;
}
.modal-body {
padding: 0;
- margin: 0.5em;
- }
-
- .btn-edit-reason {
- background: none;
- .d-icon {
- color: var(--primary-high);
- }
+ margin: 0;
}
.modal-footer {
@@ -50,6 +42,26 @@
align-items: center;
justify-content: space-between;
+ .secondary-actions {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+
+ .edit-reason {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ }
+
+ .btn {
+ margin-right: 0;
+ }
+
+ input {
+ margin: 0;
+ }
+ }
+
.secondary-actions .tippy-content {
h4 {
color: var(--primary);
@@ -60,15 +72,4 @@
}
}
}
-
- .jexcel_container {
- padding: 0.5em;
- min-width: 100%;
- .jexcel_content {
- min-width: 100%;
- table.jexcel {
- min-width: 100%;
- }
- }
- }
}
diff --git a/scss/theme/jspreadsheet-theme.scss b/scss/theme/jspreadsheet-theme.scss
index b65ea00..a05f455 100644
--- a/scss/theme/jspreadsheet-theme.scss
+++ b/scss/theme/jspreadsheet-theme.scss
@@ -254,3 +254,19 @@ table.jexcel > tbody > tr > td {
.jcontextmenu > div:not(.contextmenu-line):last-child {
display: none;
}
+
+.jexcel_container {
+ padding: 0.5em;
+ min-width: 100%;
+ .jexcel_content {
+ min-width: 100%;
+ padding: 0;
+ table.jexcel {
+ min-width: 100%;
+ }
+ }
+}
+
+.jexcel_container {
+ padding: 0;
+}