diff --git a/src/public/javascripts/widgets/detail/note_detail_file.js b/src/public/javascripts/widgets/detail/note_detail_file.js index 6060be826..52bfebbfe 100644 --- a/src/public/javascripts/widgets/detail/note_detail_file.js +++ b/src/public/javascripts/widgets/detail/note_detail_file.js @@ -6,39 +6,51 @@ import TabAwareWidget from "../tab_aware_widget.js"; const TPL = `
+ + - + - + - + - + - - - - - - -
Note ID:Note ID:
Original file name:Original file name:
File type:File type:
File size:File size:
Preview: -

-            
- -   - -   - -
+ +

+
+    
+     
+    
+     
+    
 
     
 
`; @@ -50,7 +62,6 @@ class NoteDetailFile extends TabAwareWidget{ this.$fileName = this.$widget.find(".file-filename"); this.$fileType = this.$widget.find(".file-filetype"); this.$fileSize = this.$widget.find(".file-filesize"); - this.$previewRow = this.$widget.find(".file-preview-row"); this.$previewContent = this.$widget.find(".file-preview-content"); this.$downloadButton = this.$widget.find(".file-download"); this.$openButton = this.$widget.find(".file-open"); @@ -116,11 +127,11 @@ class NoteDetailFile extends TabAwareWidget{ this.$fileType.text(this.tabContext.note.mime); if (this.tabContext.note.content) { - this.$previewRow.show(); + this.$previewContent.show(); this.$previewContent.text(this.tabContext.note.content); } else { - this.$previewRow.hide(); + this.$previewContent.empty().hide(); } // open doesn't work for protected notes since it works through browser which isn't in protected session diff --git a/src/public/javascripts/widgets/promoted_attributes.js b/src/public/javascripts/widgets/promoted_attributes.js index 8170e3c03..6ab045ac7 100644 --- a/src/public/javascripts/widgets/promoted_attributes.js +++ b/src/public/javascripts/widgets/promoted_attributes.js @@ -79,6 +79,10 @@ export default class PromotedAttributesWidget extends TabAwareWidget { // we replace the whole content in one step so there can't be any race conditions // (previously we saw promoted attributes doubling) this.$container.empty().append($tbody); + this.$widget.show(); + } + else { + this.$widget.hide(); } return attributes; diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css index 540f210cd..1d26d2ac1 100644 --- a/src/public/stylesheets/style.css +++ b/src/public/stylesheets/style.css @@ -353,11 +353,6 @@ div.ui-tooltip { background-color: #eeeeee } -.file-table th, .file-table td { - padding: 10px; - font-size: larger; -} - #sql-console-query { height: 150px; width: 100%; @@ -440,14 +435,6 @@ pre:not(.CodeMirror-line) { white-space: pre-wrap; } -.file-preview-content { - background-color: var(--accented-background-color); - padding: 15px; - max-width: 600px; - max-height: 300px; - overflow: auto; -} - .pointer { cursor: pointer; }