From 00a1077f262caa310ac87ae4a37bbfc1871115d0 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 19 Apr 2024 22:29:44 +0300 Subject: [PATCH 1/4] [PDF] Fix list settings --- apps/common/main/lib/view/ListSettingsDialog.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/common/main/lib/view/ListSettingsDialog.js b/apps/common/main/lib/view/ListSettingsDialog.js index 2645541921..ef94e37f4a 100644 --- a/apps/common/main/lib/view/ListSettingsDialog.js +++ b/apps/common/main/lib/view/ListSettingsDialog.js @@ -336,11 +336,19 @@ define([ } }); + var config = this.options.colorConfig || {}; this.btnColor = new Common.UI.ColorButton({ parentEl: $window.find('#id-dlg-list-color'), style: "width:45px;", additionalAlign: this.menuAddAlign, color: this.color, + colors: config.colors, + dynamiccolors: config.dynamiccolors, + themecolors: config.themecolors, + effects: config.effects, + columns: config.columns, + paletteCls: config.cls, + paletteWidth: config.paletteWidth, takeFocusOnClose: true }); this.btnColor.on('color:select', _.bind(this.onColorsSelect, this)); @@ -400,7 +408,7 @@ define([ }, afterRender: function() { - this.updateThemeColors(); + !this.options.colorConfig && this.updateThemeColors(); this._setDefaults(this.props); var me = this; From e644b5e76811ffa844a9a599c7bc5a4921e5c770 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 19 Apr 2024 22:30:37 +0300 Subject: [PATCH 2/4] [PDF] Fix colors in list settings --- apps/pdfeditor/main/app/controller/Toolbar.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/pdfeditor/main/app/controller/Toolbar.js b/apps/pdfeditor/main/app/controller/Toolbar.js index 5937af48f2..f3ea9976f2 100644 --- a/apps/pdfeditor/main/app/controller/Toolbar.js +++ b/apps/pdfeditor/main/app/controller/Toolbar.js @@ -1750,6 +1750,7 @@ define([ api: me.api, props: props, type: type, + colorConfig: Common.define.simpleColorsConfig, storage: me.mode.canRequestInsertImage || me.mode.fileChoiceUrl && me.mode.fileChoiceUrl.indexOf("{documentType}")>-1, interfaceLang: me.toolbar.mode.lang, handler: function(result, value) { From 608495aecfdd42d585348d53fa8cefddea84f35c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 19 Apr 2024 22:32:14 +0300 Subject: [PATCH 3/4] Refactoring, bug 67563 --- apps/pdfeditor/main/app/controller/InsTab.js | 4 ++-- apps/pdfeditor/main/app/controller/Toolbar.js | 6 +++--- apps/pdfeditor/main/app/view/ChartSettings.js | 2 +- apps/presentationeditor/main/app/controller/Toolbar.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/pdfeditor/main/app/controller/InsTab.js b/apps/pdfeditor/main/app/controller/InsTab.js index f8459dd99e..b1cc6309df 100644 --- a/apps/pdfeditor/main/app/controller/InsTab.js +++ b/apps/pdfeditor/main/app/controller/InsTab.js @@ -352,7 +352,7 @@ define([ } } if (props) { - win = new PE.Views.HyperlinkSettingsDialog({ + win = new PDFE.Views.HyperlinkSettingsDialog({ api: me.api, appOptions: me.appOptions, handler: handlerDlg, @@ -563,7 +563,7 @@ define([ } else if (in_text && type=='datetime') { //insert date time var me = this; - (new PE.Views.DateTimeDialog({ + (new PDFE.Views.DateTimeDialog({ api: this.api, lang: this._state.lang, handler: function(result, value) { diff --git a/apps/pdfeditor/main/app/controller/Toolbar.js b/apps/pdfeditor/main/app/controller/Toolbar.js index f3ea9976f2..622271f899 100644 --- a/apps/pdfeditor/main/app/controller/Toolbar.js +++ b/apps/pdfeditor/main/app/controller/Toolbar.js @@ -1945,10 +1945,10 @@ define([ elType = selectedElements[i].get_ObjectType(); elValue = selectedElements[i].get_ObjectValue(); if (Asc.c_oAscTypeSelectElement.Shape == elType) { - var win = new PE.Views.ShapeSettingsAdvanced( + var win = new PDFE.Views.ShapeSettingsAdvanced( { shapeProps: elValue, - slideSize: PE.getController('Toolbar').currentPageSize, + slideSize: {width: me.api.get_PageWidth(), height: me.api.get_PageHeight()}, handler: function(result, value) { if (result == 'ok') { if (me.api) { @@ -1959,7 +1959,7 @@ define([ } }); win.show(); - win.setActiveCategory(4); + win.setActiveCategory(5); break; } } diff --git a/apps/pdfeditor/main/app/view/ChartSettings.js b/apps/pdfeditor/main/app/view/ChartSettings.js index 30d8bf8016..6df393e09b 100644 --- a/apps/pdfeditor/main/app/view/ChartSettings.js +++ b/apps/pdfeditor/main/app/view/ChartSettings.js @@ -766,7 +766,7 @@ define([ elType = selectedElements[i].get_ObjectType(); elValue = selectedElements[i].get_ObjectValue(); if (Asc.c_oAscTypeSelectElement.Chart == elType) { - (new PE.Views.ChartSettingsAdvanced( + (new PDFE.Views.ChartSettingsAdvanced( { chartProps: elValue, slideSize: {width: me.api.get_PageWidth(), height: me.api.get_PageHeight()}, diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 5bc5ce24cc..1650778b00 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -1603,7 +1603,7 @@ define([ } }); win.show(); - win.setActiveCategory(4); + win.setActiveCategory(5); break; } } From 1fd6eea9e0b2ada79dce22a69ff60b2dcc6a91d4 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 19 Apr 2024 22:32:32 +0300 Subject: [PATCH 4/4] [PDF] Fix drawing --- apps/pdfeditor/main/app/controller/Toolbar.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/pdfeditor/main/app/controller/Toolbar.js b/apps/pdfeditor/main/app/controller/Toolbar.js index 622271f899..7ee09ff73e 100644 --- a/apps/pdfeditor/main/app/controller/Toolbar.js +++ b/apps/pdfeditor/main/app/controller/Toolbar.js @@ -803,6 +803,8 @@ define([ var me = this; me.turnOnSelectTool(); me.turnOnShowComments(); + me.api.asc_StopInkDrawer(); + if (h === 'menu') { me._state.clrstrike = undefined; // me.onApiHighlightColor(); @@ -825,7 +827,6 @@ define([ me.api.SetMarkerFormat(me.toolbar.btnStrikeout.options.type, true, 100, parseInt(r, 16), parseInt(g, 16), parseInt(b, 16)); me.toolbar.mnuStrikeoutTransparent.setChecked(false, true); } - me.api.asc_StopInkDrawer(); Common.NotificationCenter.trigger('edit:complete', me.toolbar, me.toolbar.btnStrikeout); }, @@ -850,6 +851,8 @@ define([ var me = this; me.turnOnSelectTool(); me.turnOnShowComments(); + me.api.asc_StopInkDrawer(); + if (h === 'menu') { me._state.clrunderline = undefined; // me.onApiHighlightColor(); @@ -872,7 +875,6 @@ define([ me.api.SetMarkerFormat(me.toolbar.btnUnderline.options.type, true, 100, parseInt(r, 16), parseInt(g, 16), parseInt(b, 16)); me.toolbar.mnuUnderlineTransparent.setChecked(false, true); } - me.api.asc_StopInkDrawer(); Common.NotificationCenter.trigger('edit:complete', me.toolbar, me.toolbar.btnUnderline); }, @@ -897,6 +899,8 @@ define([ var me = this; me.turnOnSelectTool(); me.turnOnShowComments(); + me.api.asc_StopInkDrawer(); + if (h === 'menu') { me._state.clrhighlight = undefined; // me.onApiHighlightColor(); @@ -919,7 +923,6 @@ define([ me.api.SetMarkerFormat(me.toolbar.btnHighlight.options.type, true, 100, parseInt(r, 16), parseInt(g, 16), parseInt(b, 16)); me.toolbar.mnuHighlightTransparent.setChecked(false, true); } - me.api.asc_StopInkDrawer(); Common.NotificationCenter.trigger('edit:complete', me.toolbar, me.toolbar.btnHighlight); }, @@ -2175,6 +2178,7 @@ define([ _setMarkerColor: function(strcolor, h) { var me = this; + me.api.asc_StopInkDrawer(); if (h === 'menu') { me._state.textclrhighlight = undefined; @@ -2195,7 +2199,6 @@ define([ b = strcolor[4] + strcolor[5]; me.api.SetMarkerFormat(undefined, true, true, parseInt(r, 16), parseInt(g, 16), parseInt(b, 16)); } - me.api.asc_StopInkDrawer(); Common.NotificationCenter.trigger('edit:complete', me.toolbar, me.toolbar.btnTextHighlightColor); Common.component.Analytics.trackEvent('ToolBar', 'Highlight Color'); },