From 4f85426deb8e97f7468241fd7ddf3322be373e4c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 22 Apr 2022 21:34:30 +0300 Subject: [PATCH] Change layout for color palette --- apps/common/main/lib/component/ColorButton.js | 5 +++-- .../main/lib/component/ThemeColorPalette.js | 19 +++++++++++-------- .../main/resources/less/dropdown-menu.less | 1 + .../main/app/view/ControlSettingsDialog.js | 1 - .../main/app/view/FormSettings.js | 1 - apps/documenteditor/main/app/view/FormsTab.js | 1 - apps/documenteditor/main/app/view/Toolbar.js | 3 ++- .../main/app/view/FormatRulesEditDlg.js | 3 ++- .../main/app/view/Statusbar.js | 3 ++- .../main/app/view/Toolbar.js | 3 ++- 10 files changed, 23 insertions(+), 17 deletions(-) diff --git a/apps/common/main/lib/component/ColorButton.js b/apps/common/main/lib/component/ColorButton.js index e33631d3b..b14e4c280 100644 --- a/apps/common/main/lib/component/ColorButton.js +++ b/apps/common/main/lib/component/ColorButton.js @@ -80,7 +80,7 @@ define([ getMenu: function(options) { if (typeof this.menu !== 'object') { options = options || this.options; - var height = options.paletteHeight || 240, + var height = options.paletteHeight ? options.paletteHeight + 'px' : 'auto', id = Common.UI.getId(), auto = []; if (options.auto) { @@ -98,7 +98,8 @@ define([ cls: 'shifted-left', additionalAlign: options.additionalAlign, items: (options.additionalItems ? options.additionalItems : []).concat(auto).concat([ - { template: _.template('
') }, + { template: _.template('
') }, + {caption: '--'}, { id: id + '-color-new', template: _.template('' + this.textNewColor + '') diff --git a/apps/common/main/lib/component/ThemeColorPalette.js b/apps/common/main/lib/component/ThemeColorPalette.js index 770dc4231..42f1cf928 100644 --- a/apps/common/main/lib/component/ThemeColorPalette.js +++ b/apps/common/main/lib/component/ThemeColorPalette.js @@ -62,7 +62,7 @@ define([ template : _.template( - '
' + + '
' + '<% var me = this; var idx = 0; %>' + '<% $(colors).each(function(num, item) { %>' + '<% if (me.isBlankSeparator(item)) { %>
' + @@ -85,7 +85,9 @@ define([ '<% }); %>' + '
' + '<% if (me.options.dynamiccolors!==undefined) { %>' + - '
' + + '
' + + '
' + + '
<%=me.textRecentColors%>
' + '<% for (var i=0; i' + '' + ' ' + @@ -483,7 +485,7 @@ define([ var arr = [], len = (themecolors>0 && effects>0) ? themecolors * effects : 0; if (themecolors>0) { - arr = [this.textThemeColors, '-']; + arr = [this.textThemeColors]; for (var i=0; i
')}, + {template: _.template('
')}, + {caption: '--'}, { id: 'id-toolbar-menu-new-control-color', template: _.template('' + this.textNewColor + '') diff --git a/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js b/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js index bab9b24b5..16c4a82fb 100644 --- a/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js +++ b/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js @@ -531,7 +531,8 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template', menu : new Common.UI.Menu({ menuAlign : 'tl-tr', items : [ - { template: _.template('
'), stopPropagation: true }, + { template: _.template('
'), stopPropagation: true }, + {caption: '--'}, { template: _.template('' + this.textNewColor + ''), stopPropagation: true } ] }) diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index 19827c534..70512f416 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -335,7 +335,8 @@ define([ menuAlign: 'tl-tr', cls: 'color-tab', items: [ - { template: _.template('
') }, + { template: _.template('
') }, + {caption: '--'}, { template: _.template('' + me.textNewColor + '') } ] }); diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 0572660fd..5f548d87b 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -2120,7 +2120,8 @@ define([ stopPropagation: true }, {caption: '--'}, - { template: _.template('
'), stopPropagation: true }, + { template: _.template('
'), stopPropagation: true }, + {caption: '--'}, { template: _.template('' + this.textNewColor + ''), stopPropagation: true } ] })