Browse Source

Fix TinyMCE modal styles and overlapping issues.

Kailash Nadh 3 years ago
parent
commit
f6cd24d6c9
2 changed files with 42 additions and 16 deletions
  1. 1 1
      frontend/cypress/support/commands.js
  2. 41 15
      frontend/src/assets/style.scss

+ 1 - 1
frontend/cypress/support/commands.js

@@ -14,7 +14,7 @@ Cypress.Commands.add('resetDB', () => {
 // table against the given IDs, asserting the expected order of sort.
 // table against the given IDs, asserting the expected order of sort.
 Cypress.Commands.add('sortTable', (theadSelector, ordIDs) => {
 Cypress.Commands.add('sortTable', (theadSelector, ordIDs) => {
   cy.get(theadSelector).click();
   cy.get(theadSelector).click();
-  cy.wait(500);
+  cy.wait(100);
   cy.get('tbody td[data-id]').each(($el, index) => {
   cy.get('tbody td[data-id]').each(($el, index) => {
     expect(ordIDs[index]).to.equal(parseInt($el.attr('data-id')));
     expect(ordIDs[index]).to.equal(parseInt($el.attr('data-id')));
   });
   });

+ 41 - 15
frontend/src/assets/style.scss

@@ -203,12 +203,18 @@ body.is-noscroll {
   border-radius: 2px;
   border-radius: 2px;
 }
 }
 
 
+.plain-editor textarea {
+  height: 65vh;
+}
+
+.alt-body textarea {
+  height: 30vh;
+}
+
+
 .editor {
 .editor {
   margin-bottom: 30px;
   margin-bottom: 30px;
 
 
-  .tox .tox-dialog-wrap {
-    z-index: 950;
-  }
   .tox-tinymce {
   .tox-tinymce {
     box-shadow: 2px 2px 0 #f3f3f3;
     box-shadow: 2px 2px 0 #f3f3f3;
     border: 1px solid #e6e6e6;
     border: 1px solid #e6e6e6;
@@ -226,24 +232,41 @@ body.is-noscroll {
   }
   }
 }
 }
 
 
-.tox-track-link {
-  display: block !important;
-  cursor: pointer !important;
 
 
-  margin: 5px 0 10px 0 !important;
-  input {
-    margin-right: 5px !important;
+.tox.tox-silver-sink {
+  z-index: 850;
+
+  .tox-dialog-wrap {
+    z-index: 900;
+  }
+  .tox-dialog {
+    @extend .box;
   }
   }
-}
 
 
-  .plain-editor textarea {
-    height: 65vh;
+  .tox-track-link {
+    display: block;
+    cursor: pointer;
+
+    margin: 5px 0 10px 0;
+    input {
+      margin-right: 5px;
+    }
   }
   }
-  .alt-body textarea {
-    height: 30vh;
+
+  .tox-button {
+    border-radius: 4px;
+  }
+  .tox-button:not(.tox-button--secondary):not(.tox-button--naked) {
+    background: $primary;
   }
   }
 
 
-  .tox, .tox-tinymce, .tox-tinymce-aux, .tox .tox-button, .tox .tox-button-link, .tox .tox-dialog__title,
+  .tox-textfield {
+    box-shadow: 2px 2px 0 $white-ter;
+    border: 1px solid $grey-lighter;
+  }
+}
+
+.tox, .tox-tinymce, .tox-tinymce-aux, .tox .tox-button, .tox .tox-button-link, .tox .tox-dialog__title,
   .tox .tox-textfield,
   .tox .tox-textfield,
   .tox .tox-toolbar-textfield,
   .tox .tox-toolbar-textfield,
   .tox .tox-listboxfield .tox-listbox--select,
   .tox .tox-listboxfield .tox-listbox--select,
@@ -277,6 +300,9 @@ body.is-noscroll {
 }
 }
 
 
 /* Modal */
 /* Modal */
+.modal {
+  z-index: 950;
+}
 .modal-background {
 .modal-background {
   background: rgba(255, 255, 255, 0.7);
   background: rgba(255, 255, 255, 0.7);
 }
 }