From 575adb8540e1529a58016c5877c1a0c8c7632a53 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Tue, 22 Nov 2022 21:14:19 +0300 Subject: [PATCH] [DE PE SSE] Change layouts of Download as, Document info, Protect document, Advanced settings, Create new panels --- .../main/app/view/FileMenuPanels.js | 43 ++++++++-- .../main/resources/less/filemenu.less | 82 +++++++++---------- .../main/app/view/FileMenuPanels.js | 66 +++++++++++++-- .../main/resources/less/leftmenu.less | 58 +++++++------ .../main/app/view/FileMenuPanels.js | 66 +++++++++++++-- .../main/resources/less/leftmenu.less | 57 ++++++------- 6 files changed, 250 insertions(+), 122 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index def9c4070..eb832315c 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -216,6 +216,16 @@ define([ this.menu = options.menu; this.fileType = options.fileType; this.mode = options.mode; + + Common.NotificationCenter.on({ + 'window:resize': _.bind(function() { + var divided = Common.Utils.innerWidth() >= this.maxWidth; + if (this.isDivided !== divided) { + this.$el.find('.divider').css('width', divided ? '100%' : '0'); + this.isDivided = divided; + } + }, this) + }); }, render: function() { @@ -246,6 +256,21 @@ define([ }); } + var itemWidth = 70 + 24, // width + margin + maxCount = 0; + this.formats.forEach(_.bind(function (item, index) { + var count = item.length; + if (count > maxCount) { + maxCount = count; + } + }, this)); + this.maxWidth = $('#file-menu-panel .panel-menu').outerWidth() + 20 + 10 + itemWidth * maxCount; // menu + left padding + margin + + if (Common.Utils.innerWidth() >= this.maxWidth) { + this.$el.find('.divider').css('width', '100%'); + this.isDivided = true; + } + return this; }, @@ -271,7 +296,8 @@ define([ template: _.template([ '
', - '', + '
<%= scope.txtAdvancedSettings %>
', + '
', '', '', '', @@ -1026,7 +1052,8 @@ define([ txtStrictTip: 'Use the \'Save\' button to sync the changes you and others make', strIgnoreWordsInUPPERCASE: 'Ignore words in UPPERCASE', strIgnoreWordsWithNumbers: 'Ignore words with numbers', - strShowOthersChanges: 'Show changes from other users' + strShowOthersChanges: 'Show changes from other users', + txtAdvancedSettings: 'Advanced Settings' }, DE.Views.FileMenuPanels.Settings || {})); DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ @@ -1099,7 +1126,7 @@ define([ }, template: _.template([ - '

<%= scope.txtCreateNew %>

', + '
<%= scope.txtCreateNew %>
', '
', '<% if (blank) { %> ', '
', @@ -1187,7 +1214,8 @@ define([ this.template = _.template([ '
', - '
', + '
' + this.txtDocumentInfo + '
', + '
', '', '', '', @@ -1313,7 +1341,7 @@ define([ '
', '
', '
', - '', + '
', '', '', '', @@ -1895,7 +1923,8 @@ define([ txtFastWV: 'Fast Web View', txtYes: 'Yes', txtNo: 'No', - txtPdfProducer: 'PDF Producer' + txtPdfProducer: 'PDF Producer', + txtDocumentInfo: 'Document Info' }, DE.Views.FileMenuPanels.DocumentInfo || {})); @@ -2229,7 +2258,7 @@ define([ menu: undefined, template: _.template([ - '', + '', '
', '', '
', diff --git a/apps/documenteditor/main/resources/less/filemenu.less b/apps/documenteditor/main/resources/less/filemenu.less index 94b5a981d..f6f508893 100644 --- a/apps/documenteditor/main/resources/less/filemenu.less +++ b/apps/documenteditor/main/resources/less/filemenu.less @@ -92,8 +92,8 @@ margin: 30px 0 0 10px; .header { - font-size: 18px; - margin-bottom: 17px; + font-size: 16px; + margin-bottom: 20px; } .format-items { @@ -220,6 +220,11 @@ } #panel-settings { + .header { + margin: 30px 0 16px 30px; + font-size: 16px; + } + table { width: auto !important; tr { @@ -267,31 +272,14 @@ } #panel-createnew { - h3 { - margin: 0; - font-size: 10pt; - color: @text-normal-ie; - color: @text-normal; - .font-weight-bold(); - padding: 0 0 10px 10px; + .header { + font-size: 16px; + padding: 0 0 0 10px; white-space: nowrap; + margin-top: 30px; + margin-bottom: 20px; } - - - .blank-document-info { - vertical-align: top; - width: 445px; - display: inline-block; - - h3 { - padding-left: 0; - padding-top: 40px; - white-space: nowrap; - } - } - - hr { margin: 0; border-bottom: none; @@ -453,6 +441,10 @@ #panel-info, #panel-rights { + .header { + margin: 30px 0 20px 30px; + font-size: 16px; + } table { tr { td { @@ -461,7 +453,7 @@ &.left { padding: 5px 10px; text-align: right; - width: 30%; + width: 200px; label { .font-weight-bold(); @@ -470,7 +462,7 @@ &.right { padding: 5px 10px; - width: 70%; + width: calc(100% - 200px); } } @@ -539,22 +531,26 @@ } #panel-protect { -label { - font-size: 12px; -} - -#file-menu-panel & { - padding: 30px 30px; -} - -.header { - .font-weight-bold(); - margin: 30px 0 10px; -} - -table { - td { - padding: 5px 0; + label { + font-size: 12px; + } + + #file-menu-panel & { + padding: 30px 30px; + } + + .header { + .font-weight-bold(); + margin: 20px 0 10px; + } + + table { + td { + padding: 5px 0; + } + } + + #id-fms-lbl-protect-header { + font-size: 16px; } -} } \ No newline at end of file diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index 0d3e06dff..f294ac798 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -92,6 +92,16 @@ define([ this.menu = options.menu; this.fileType = options.fileType; + + Common.NotificationCenter.on({ + 'window:resize': _.bind(function() { + var divided = Common.Utils.innerWidth() >= this.maxWidth; + if (this.isDivided !== divided) { + this.$el.find('.divider').css('width', divided ? '100%' : '0'); + this.isDivided = divided; + } + }, this) + }); }, render: function() { @@ -106,6 +116,21 @@ define([ }); } + var itemWidth = 70 + 24, // width + margin + maxCount = 0; + this.formats.forEach(_.bind(function (item, index) { + var count = item.length; + if (count > maxCount) { + maxCount = count; + } + }, this)); + this.maxWidth = $('#file-menu-panel .panel-menu').outerWidth() + 20 + 10 + itemWidth * maxCount; // menu + left padding + margin + + if (Common.Utils.innerWidth() >= this.maxWidth) { + this.$el.find('.divider').css('width', '100%'); + this.isDivided = true; + } + return this; }, @@ -166,6 +191,16 @@ define([ this.menu = options.menu; this.fileType = options.fileType; + + Common.NotificationCenter.on({ + 'window:resize': _.bind(function() { + var divided = Common.Utils.innerWidth() >= this.maxWidth; + if (this.isDivided !== divided) { + this.$el.find('.divider').css('width', divided ? '100%' : '0'); + this.isDivided = divided; + } + }, this) + }); }, render: function() { @@ -180,6 +215,21 @@ define([ }); } + var itemWidth = 70 + 24, // width + margin + maxCount = 0; + this.formats.forEach(_.bind(function (item, index) { + var count = item.length; + if (count > maxCount) { + maxCount = count; + } + }, this)); + this.maxWidth = $('#file-menu-panel .panel-menu').outerWidth() + 20 + 10 + itemWidth * maxCount; // menu + left padding + margin + + if (Common.Utils.innerWidth() >= this.maxWidth) { + this.$el.find('.divider').css('width', '100%'); + this.isDivided = true; + } + return this; }, @@ -205,7 +255,8 @@ define([ template: _.template([ '
', - '
', + '
<%= scope.txtAdvancedSettings %>
', + '
', '', '', '', @@ -785,7 +836,8 @@ define([ txtStrictTip: 'Use the \'Save\' button to sync the changes you and others make', strIgnoreWordsInUPPERCASE: 'Ignore words in UPPERCASE', strIgnoreWordsWithNumbers: 'Ignore words with numbers', - strShowOthersChanges: 'Show changes from other users' + strShowOthersChanges: 'Show changes from other users', + txtAdvancedSettings: 'Advanced Settings' }, PE.Views.FileMenuPanels.Settings || {})); PE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ @@ -858,7 +910,7 @@ define([ }, template: _.template([ - '

<%= scope.txtCreateNew %>

', + '
<%= scope.txtCreateNew %>
', '
', '<% if (blank) { %> ', '
', @@ -946,7 +998,8 @@ define([ this.template = _.template([ '
', - '
', + '
' + this.txtPresentationInfo + '
', + '
', '', '', '', @@ -1374,7 +1427,8 @@ define([ txtAddAuthor: 'Add Author', txtAddText: 'Add Text', txtMinutes: 'min', - okButtonText: 'Apply' + okButtonText: 'Apply', + txtPresentationInfo: 'Presentation Info' }, PE.Views.FileMenuPanels.DocumentInfo || {})); PE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({ @@ -1687,7 +1741,7 @@ define([ menu: undefined, template: _.template([ - '', + '', '
', '', '
', diff --git a/apps/presentationeditor/main/resources/less/leftmenu.less b/apps/presentationeditor/main/resources/less/leftmenu.less index b1ec7752a..f8d6b84df 100644 --- a/apps/presentationeditor/main/resources/less/leftmenu.less +++ b/apps/presentationeditor/main/resources/less/leftmenu.less @@ -192,12 +192,16 @@ } #panel-saveas, #panel-savecopy { + &.content-box { + padding: 0 0 0 20px; + } + .content-container { margin: 30px 0 0 10px; .header { - font-size: 18px; - margin-bottom: 17px; + font-size: 16px; + margin-bottom: 20px; } .format-items { @@ -217,12 +221,6 @@ height: 0; } - @media(min-width: 800px) { - .divider { - width: 100%; - } - } - } } } @@ -235,6 +233,11 @@ } #panel-settings { + .header { + margin: 30px 0 16px 30px; + font-size: 16px; + } + table { width: auto !important; @@ -281,26 +284,12 @@ } #panel-createnew { - h3 { - margin: 0; - font-size: 10pt; - color: @text-normal-ie; - color: @text-normal; - .font-weight-bold(); - padding: 0 0 10px 10px; + .header { + font-size: 16px; + padding: 0 0 0 10px; white-space: nowrap; - } - - .blank-document-info { - vertical-align: top; - width: 445px; - display: inline-block; - - h3 { - padding-left: 0; - padding-top: 45px; - white-space: nowrap; - } + margin-top: 30px; + margin-bottom: 20px; } hr { @@ -462,6 +451,11 @@ #panel-info, #panel-rights { + .header { + margin: 30px 0 20px 30px; + font-size: 16px; + } + table { tr { td { @@ -470,7 +464,7 @@ &.left { padding: 5px 10px; text-align: right; - width: 30%; + width: 200px; label { .font-weight-bold(); @@ -479,7 +473,7 @@ &.right { padding: 5px 10px; - width: 70%; + width: calc(100% - 200px); } } @@ -535,7 +529,7 @@ .header { .font-weight-bold(); - margin: 30px 0 10px; + margin: 20px 0 10px; } table { @@ -543,6 +537,10 @@ padding: 5px 0; } } + + #id-fms-lbl-protect-header { + font-size: 16px; + } } } } diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index afbe0ad32..b8f066451 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -78,6 +78,16 @@ define([ this.menu = options.menu; this.fileType = options.fileType; + + Common.NotificationCenter.on({ + 'window:resize': _.bind(function() { + var divided = Common.Utils.innerWidth() >= this.maxWidth; + if (this.isDivided !== divided) { + this.$el.find('.divider').css('width', divided ? '100%' : '0'); + this.isDivided = divided; + } + }, this) + }); }, render: function() { @@ -92,6 +102,21 @@ define([ }); } + var itemWidth = 70 + 24, // width + margin + maxCount = 0; + this.formats.forEach(_.bind(function (item, index) { + var count = item.length; + if (count > maxCount) { + maxCount = count; + } + }, this)); + this.maxWidth = $('#file-menu-panel .panel-menu').outerWidth() + 20 + 10 + itemWidth * maxCount; // menu + left padding + margin + + if (Common.Utils.innerWidth() >= this.maxWidth) { + this.$el.find('.divider').css('width', '100%'); + this.isDivided = true; + } + return this; }, @@ -149,6 +174,16 @@ define([ this.menu = options.menu; this.fileType = options.fileType; + + Common.NotificationCenter.on({ + 'window:resize': _.bind(function() { + var divided = Common.Utils.innerWidth() >= this.maxWidth; + if (this.isDivided !== divided) { + this.$el.find('.divider').css('width', divided ? '100%' : '0'); + this.isDivided = divided; + } + }, this) + }); }, render: function() { @@ -163,6 +198,21 @@ define([ }); } + var itemWidth = 70 + 24, // width + margin + maxCount = 0; + this.formats.forEach(_.bind(function (item, index) { + var count = item.length; + if (count > maxCount) { + maxCount = count; + } + }, this)); + this.maxWidth = $('#file-menu-panel .panel-menu').outerWidth() + 20 + 10 + itemWidth * maxCount; // menu + left padding + margin + + if (Common.Utils.innerWidth() >= this.maxWidth) { + this.$el.find('.divider').css('width', '100%'); + this.isDivided = true; + } + return this; }, @@ -188,7 +238,8 @@ define([ template: _.template([ '
', - '
', + '
<%= scope.txtAdvancedSettings %>
', + '
', '', '', '', @@ -1173,7 +1224,8 @@ define([ txtStrictTip: 'Use the \'Save\' button to sync the changes you and others make', strShowOthersChanges: 'Show changes from other users', txtCalculating: 'Calculating', - strDateFormat1904: 'Use 1904 date system' + strDateFormat1904: 'Use 1904 date system', + txtAdvancedSettings: 'Advanced Settings' }, SSE.Views.FileMenuPanels.MainSettingsGeneral || {})); @@ -1247,7 +1299,7 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ }, template: _.template([ - '

<%= scope.txtCreateNew %>

', + '
<%= scope.txtCreateNew %>
', '
', '<% if (blank) { %> ', '
', @@ -1335,7 +1387,8 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ this.template = _.template([ '
', - '
', + '
' + this.txtSpreadsheetInfo + '
', + '
', '', '', '', @@ -1758,7 +1811,8 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ txtAddAuthor: 'Add Author', txtAddText: 'Add Text', txtMinutes: 'min', - okButtonText: 'Apply' + okButtonText: 'Apply', + txtSpreadsheetInfo: 'Spreadsheet Info' }, SSE.Views.FileMenuPanels.DocumentInfo || {})); SSE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({ @@ -2071,7 +2125,7 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ menu: undefined, template: _.template([ - '', + '', '
', '', '
', diff --git a/apps/spreadsheeteditor/main/resources/less/leftmenu.less b/apps/spreadsheeteditor/main/resources/less/leftmenu.less index 8b3d227d1..3b0ec2e8a 100644 --- a/apps/spreadsheeteditor/main/resources/less/leftmenu.less +++ b/apps/spreadsheeteditor/main/resources/less/leftmenu.less @@ -177,12 +177,16 @@ } #panel-saveas, #panel-savecopy { + &.content-box { + padding: 0 0 0 20px; + } + .content-container { margin: 30px 0 0 10px; .header { - font-size: 18px; - margin-bottom: 17px; + font-size: 16px; + margin-bottom: 20px; } .format-items { @@ -202,12 +206,6 @@ height: 0; } - @media(min-width: 800px) { - .divider { - width: 100%; - } - } - } } } @@ -223,6 +221,11 @@ display: flex; flex-direction: column; + .header { + margin: 30px 0 16px 30px; + font-size: 16px; + } + #id-settings-menu { .dataview { border-right: @scaled-one-px-value-ie solid @border-toolbar-ie; @@ -336,26 +339,12 @@ } #panel-createnew { - h3 { - margin: 0; - font-size: 10pt; - color: @text-normal-ie; - color: @text-normal; - .font-weight-bold(); - padding: 0 0 10px 10px; + .header { + font-size: 16px; + padding: 0 0 0 10px; white-space: nowrap; - } - - .blank-document-info { - vertical-align: top; - width: 445px; - display: inline-block; - - h3 { - padding-left: 0; - padding-top: 45px; - white-space: nowrap; - } + margin-top: 30px; + margin-bottom: 20px; } hr { @@ -517,6 +506,10 @@ #panel-info, #panel-rights { + .header { + margin: 30px 0 20px 30px; + font-size: 16px; + } table { tr { td { @@ -525,7 +518,7 @@ &.left { padding: 5px 10px; text-align: right; - width: 30%; + width: 200px; label { .font-weight-bold(); @@ -534,7 +527,7 @@ &.right { padding: 5px 10px; - width: 70%; + width: calc(100% - 200px); } } @@ -590,7 +583,7 @@ .header { .font-weight-bold(); - margin: 30px 0 10px; + margin: 20px 0 10px; } table { @@ -598,6 +591,10 @@ padding: 5px 0; } } + + #id-fms-lbl-protect-header { + font-size: 16px; + } } #panel-print {