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; 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 5937af48f2..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); }, @@ -1750,6 +1753,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) { @@ -1944,10 +1948,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) { @@ -1958,7 +1962,7 @@ define([ } }); win.show(); - win.setActiveCategory(4); + win.setActiveCategory(5); break; } } @@ -2174,6 +2178,7 @@ define([ _setMarkerColor: function(strcolor, h) { var me = this; + me.api.asc_StopInkDrawer(); if (h === 'menu') { me._state.textclrhighlight = undefined; @@ -2194,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'); }, 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; } }