From ffca06badb574a39357e5556ffc7394a7d78be15 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 18 Aug 2020 14:02:44 +0300 Subject: [PATCH] [DE] Add icons to button menu and context menu --- apps/common/main/lib/component/ColorButton.js | 4 +- apps/common/main/lib/component/Menu.js | 10 ++-- apps/common/main/lib/component/MenuItem.js | 10 ++++ .../main/resources/less/dropdown-menu.less | 21 +++++++ .../main/app/view/ControlSettingsDialog.js | 2 +- .../main/app/view/DocumentHolder.js | 56 ++++++++++++++++++- apps/documenteditor/main/app/view/Links.js | 6 +- apps/documenteditor/main/app/view/Toolbar.js | 24 ++++++-- .../main/app/view/WatermarkSettingsDialog.js | 6 +- 9 files changed, 121 insertions(+), 18 deletions(-) diff --git a/apps/common/main/lib/component/ColorButton.js b/apps/common/main/lib/component/ColorButton.js index c01bcd325..75a7205a4 100644 --- a/apps/common/main/lib/component/ColorButton.js +++ b/apps/common/main/lib/component/ColorButton.js @@ -107,10 +107,12 @@ define([ var id = Common.UI.getId(), menu = new Common.UI.Menu({ id: id, + cls: 'shifted-left', + custom: true, additionalAlign: options.additionalAlign, items: (options.additionalItems ? options.additionalItems : []).concat([ { template: _.template('
') }, - { template: _.template('' + this.textNewColor + '') } + { template: _.template('' + this.textNewColor + '') } ]) }); return menu; diff --git a/apps/common/main/lib/component/Menu.js b/apps/common/main/lib/component/Menu.js index e528612c6..e232b8bf8 100644 --- a/apps/common/main/lib/component/Menu.js +++ b/apps/common/main/lib/component/Menu.js @@ -150,11 +150,12 @@ define([ offset : [0, 0], cyclic : true, search : false, - scrollAlwaysVisible: true + scrollAlwaysVisible: true, + custom : false }, template: _.template([ - '' + '' ].join('')), initialize : function(options) { @@ -620,11 +621,12 @@ define([ offset : [0, 0], cyclic : true, search : false, - scrollAlwaysVisible: true + scrollAlwaysVisible: true, + custom : false }, template: _.template([ - '