From 9e126ede65390aab85de03012e9aebb4d4f3644e Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Mon, 27 Jun 2016 13:47:51 +0300 Subject: [PATCH 01/23] AGPL v3 --- LICENSE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.txt b/LICENSE.txt index 2def0e883..dba13ed2d 100755 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -658,4 +658,4 @@ specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see -. \ No newline at end of file +. From f7b2b05b7a87d2cb53c84e9cc621e8da2098a6dd Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Mon, 27 Jun 2016 13:48:09 +0300 Subject: [PATCH 02/23] AGPL v3 From 0ddf48ba0b8e9bfb8ccdee7e78039e377e5ed8d1 Mon Sep 17 00:00:00 2001 From: Alexander Trofimov Date: Mon, 1 Aug 2016 13:06:36 +0300 Subject: [PATCH 03/23] Update Readme.md --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index c99f27c6a..1df1eb129 100644 --- a/Readme.md +++ b/Readme.md @@ -1,4 +1,4 @@ -[![License](https://img.shields.io/badge/License-GNU%20AGPL%20V3-green.svg?style=flat)](http://www.gnu.org/licenses/agpl-3.0.ru.html) ![Release](https://img.shields.io/badge/Release-v4.0.1-blue.svg?style=flat) +[![License](https://img.shields.io/badge/License-GNU%20AGPL%20V3-green.svg?style=flat)](http://www.gnu.org/licenses/agpl-3.0.ru.html) ![Release](https://img.shields.io/badge/Release-v4.0.2-blue.svg?style=flat) ## web-apps From 58c3fd33c0bb1d43f8810333455d6d360aee4ffd Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 3 Aug 2016 12:41:36 +0300 Subject: [PATCH 04/23] Select non-visual plugin when it starts. --- apps/common/main/lib/controller/Plugins.js | 71 ++++++++++---------- apps/common/main/lib/view/Plugins.js | 10 +++ apps/common/main/resources/less/plugins.less | 7 +- 3 files changed, 51 insertions(+), 37 deletions(-) diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index 01dbba4b5..4cb9de023 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -219,49 +219,52 @@ define([ onPluginShow: function(plugin, variationIndex) { var variation = plugin.get_Variations()[variationIndex]; - if (!variation.get_Visual()) return; - - if (variation.get_InsideMode()) { - this.panelPlugins.openInsideMode(plugin.get_Name(), ((plugin.get_BaseUrl().length == 0) ? this.panelPlugins.pluginsPath : plugin.get_BaseUrl()) + variation.get_Url()); - } else { - var me = this, - arrBtns = variation.get_Buttons(), - newBtns = {}, - size = variation.get_Size(); - if (!size || size.length<2) size = [800, 600]; + if (variation.get_Visual()) { + if (variation.get_InsideMode()) { + this.panelPlugins.openInsideMode(plugin.get_Name(), ((plugin.get_BaseUrl().length == 0) ? this.panelPlugins.pluginsPath : plugin.get_BaseUrl()) + variation.get_Url()); + } else { + var me = this, + arrBtns = variation.get_Buttons(), + newBtns = {}, + size = variation.get_Size(); + if (!size || size.length<2) size = [800, 600]; - if (_.isArray(arrBtns)) { - _.each(arrBtns, function(b, index){ - newBtns[index] = {text: b.text, cls: 'custom' + ((b.primary) ? ' primary' : '')}; + if (_.isArray(arrBtns)) { + _.each(arrBtns, function(b, index){ + newBtns[index] = {text: b.text, cls: 'custom' + ((b.primary) ? ' primary' : '')}; + }); + } + + var _baseUrl = (plugin.get_BaseUrl().length == 0) ? me.panelPlugins.pluginsPath : plugin.get_BaseUrl(); + me.pluginDlg = new Common.Views.PluginDlg({ + title: plugin.get_Name(), + width: size[0], // inner width + height: size[1], // inner height + url: _baseUrl + variation.get_Url(), + buttons: newBtns, + toolcallback: _.bind(this.onToolClose, this) }); + me.pluginDlg.on('render:after', function(obj){ + obj.getChild('.footer .dlg-btn').on('click', _.bind(me.onDlgBtnClick, me)); + me.pluginContainer = me.pluginDlg.$window.find('#id-plugin-container'); + }).on('close', function(obj){ + me.pluginDlg = undefined; + }).on('drag', function(args){ + me.api.asc_pluginEnableMouseEvents(args[1]=='start'); + }); + me.pluginDlg.show(); } - - var _baseUrl = (plugin.get_BaseUrl().length == 0) ? me.panelPlugins.pluginsPath : plugin.get_BaseUrl(); - me.pluginDlg = new Common.Views.PluginDlg({ - title: plugin.get_Name(), - width: size[0], // inner width - height: size[1], // inner height - url: _baseUrl + variation.get_Url(), - buttons: newBtns, - toolcallback: _.bind(this.onToolClose, this) - }); - me.pluginDlg.on('render:after', function(obj){ - obj.getChild('.footer .dlg-btn').on('click', _.bind(me.onDlgBtnClick, me)); - me.pluginContainer = me.pluginDlg.$window.find('#id-plugin-container'); - }).on('close', function(obj){ - me.pluginDlg = undefined; - }).on('drag', function(args){ - me.api.asc_pluginEnableMouseEvents(args[1]=='start'); - }); - me.pluginDlg.show(); - } + } else + this.panelPlugins.openNotVisualMode(plugin.get_Guid()); }, onPluginClose: function() { if (this.pluginDlg) this.pluginDlg.close(); - else + else if (this.panelPlugins.iframePlugin) this.panelPlugins.closeInsideMode(); + else + this.panelPlugins.closeNotVisualMode(); }, onPluginResize: function(width, height, callback) { diff --git a/apps/common/main/lib/view/Plugins.js b/apps/common/main/lib/view/Plugins.js index cc99f6115..ea8d5c649 100644 --- a/apps/common/main/lib/view/Plugins.js +++ b/apps/common/main/lib/view/Plugins.js @@ -172,6 +172,16 @@ define([ this.pluginsPanel.toggleClass('hidden', false); }, + openNotVisualMode: function(pluginGuid) { + var rec = this.viewPluginsList.store.findWhere({guid: pluginGuid}); + if (rec) + this.viewPluginsList.cmpEl.find('#' + rec.get('id')).parent().addClass('selected'); + }, + + closeNotVisualMode: function() { + this.viewPluginsList.cmpEl.find('.selected').removeClass('selected'); + }, + _onLoad: function() { if (this.loadMask) this.loadMask.hide(); diff --git a/apps/common/main/resources/less/plugins.less b/apps/common/main/resources/less/plugins.less index 435491476..a99f28bd0 100644 --- a/apps/common/main/resources/less/plugins.less +++ b/apps/common/main/resources/less/plugins.less @@ -27,10 +27,11 @@ &:hover, &.over { background-color: @secondary; + } - .plugin-icon { - .box-shadow(0 0 0 2px transparent); - } + &.selected { + background-color: @primary; + color: #fff; } } From 6e661c6cc9cbbd22166b68b03b8c6a6c125eb28a Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 3 Aug 2016 12:54:51 +0300 Subject: [PATCH 05/23] [DE] Fix Bug 32595. --- apps/documenteditor/main/app/view/TableSettingsAdvanced.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/documenteditor/main/app/view/TableSettingsAdvanced.js b/apps/documenteditor/main/app/view/TableSettingsAdvanced.js index d50b3e16d..bbc92bbab 100644 --- a/apps/documenteditor/main/app/view/TableSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/TableSettingsAdvanced.js @@ -1253,7 +1253,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat if (cellWidth !== null) this.nfPrefWidth.setValue(cellWidth>0 ? Common.Utils.Metric.fnRecalcFromMM(cellWidth) : -cellWidth , true); - this.chPrefWidth.setValue(cellWidth !== null, true); + this.chPrefWidth.setValue((props.get_CellsWidthNotEqual()) ? 'indeterminate' : (cellWidth !== null), true); value = (this.chPrefWidth.getValue()!=='checked'); this.nfPrefWidth.setDisabled(value); this.cmbPrefWidthUnit.setDisabled(value); From abfe324c4b8bbbb78a85d524ecdf3668bdf609eb Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Wed, 3 Aug 2016 14:24:34 +0300 Subject: [PATCH 06/23] Version up --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 1df1eb129..857ceb759 100644 --- a/Readme.md +++ b/Readme.md @@ -1,4 +1,4 @@ -[![License](https://img.shields.io/badge/License-GNU%20AGPL%20V3-green.svg?style=flat)](http://www.gnu.org/licenses/agpl-3.0.ru.html) ![Release](https://img.shields.io/badge/Release-v4.0.2-blue.svg?style=flat) +[![License](https://img.shields.io/badge/License-GNU%20AGPL%20V3-green.svg?style=flat)](http://www.gnu.org/licenses/agpl-3.0.ru.html) ![Release](https://img.shields.io/badge/Release-v4.0.3-blue.svg?style=flat) ## web-apps From 7a2e17340927f794415221f9ba23d233257ef5d1 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 3 Aug 2016 14:51:21 +0300 Subject: [PATCH 07/23] Set full toolbar in light version. --- apps/documenteditor/main/app/view/Toolbar.js | 3 +-- apps/presentationeditor/main/app/view/Toolbar.js | 3 +-- apps/spreadsheeteditor/main/app/view/Toolbar.js | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index 414026965..57e6535a7 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -1247,7 +1247,7 @@ define([ this.trigger('render:before', this); var value = Common.localStorage.getItem("de-compact-toolbar"); - var valueCompact = (mode.isLightVersion || value !== null && parseInt(value) == 1); + var valueCompact = (value !== null && parseInt(value) == 1); value = Common.localStorage.getItem("de-hidden-title"); var valueTitle = (value !== null && parseInt(value) == 1); @@ -1258,7 +1258,6 @@ define([ value = Common.localStorage.getItem("de-hidden-rulers"); var valueRulers = (value !== null && parseInt(value) == 1); - this.mnuitemCompactToolbar.setVisible(!mode.isLightVersion); this.mnuitemCompactToolbar.setChecked(valueCompact, true); this.mnuitemHideTitleBar.setChecked(valueTitle, true); this.mnuitemHideStatusBar.setChecked(valueStatus, true); diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 82f71dc91..29574d0b6 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -1158,7 +1158,7 @@ define([ this.trigger('render:before', this); var value = Common.localStorage.getItem('pe-compact-toolbar'); - var valueCompact = (mode.isLightVersion || value!==null && parseInt(value) == 1); + var valueCompact = (value!==null && parseInt(value) == 1); value = Common.localStorage.getItem('pe-hidden-title'); var valueTitle = (value!==null && parseInt(value) == 1); @@ -1169,7 +1169,6 @@ define([ value = Common.localStorage.getItem("pe-hidden-rulers"); var valueRulers = (value !== null && parseInt(value) == 1); - me.mnuitemCompactToolbar.setVisible(!mode.isLightVersion); me.mnuitemCompactToolbar.setChecked(valueCompact); me.mnuitemHideTitleBar.setChecked(valueTitle); me.mnuitemHideStatusBar.setChecked(valueStatus); diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 9e07e7b8a..af1fc6b62 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -1579,9 +1579,8 @@ define([ JSON.parse(Common.localStorage.getItem('sse-hidden-title')) && (options.title = true); JSON.parse(Common.localStorage.getItem('sse-hidden-formula')) && (options.formula = true); JSON.parse(Common.localStorage.getItem('sse-hidden-headings')) && (options.headings = true); - var isCompactView = mode.isLightVersion || !!JSON.parse(Common.localStorage.getItem('sse-toolbar-compact')); + var isCompactView = !!JSON.parse(Common.localStorage.getItem('sse-toolbar-compact')); - me.mnuitemCompactToolbar.setVisible(!mode.isLightVersion); me.mnuitemCompactToolbar.setChecked(isCompactView); me.mnuitemHideTitleBar.setChecked(!!options.title); me.mnuitemHideFormulaBar.setChecked(!!options.formula); From bc0a3bffd1386182aa929d21be3a02dff03a8fd1 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 4 Aug 2016 14:41:16 +0300 Subject: [PATCH 08/23] Add the ability to resize windows. --- apps/common/main/lib/component/Window.js | 119 +++++++++++++++++++- apps/common/main/resources/less/window.less | 30 +++++ 2 files changed, 148 insertions(+), 1 deletion(-) diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index 5b2a20195..785262341 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -150,7 +150,11 @@ define([ title: 'Title', alias: 'Window', cls: '', - toolclose: 'close' + toolclose: 'close', + maxwidth: undefined, + maxheight: undefined, + minwidth: 0, + minheight: 0 }; var template = '
<%= cls?" "+cls:"" %>" id="<%= id %>" style="width:<%= width %>px;">' + @@ -286,6 +290,81 @@ define([ } } + /* window resize functions */ + function _resizestart(event) { + Common.UI.Menu.Manager.hideAll(); + var el = $(event.target), + left = parseInt(this.$window.css('left')), + top = parseInt(this.$window.css('top')); + + this.resizing.enabled = true; + this.resizing.initpage_x = event.pageX; + this.resizing.initpage_y = event.pageY; + this.resizing.initx = event.pageX - left; + this.resizing.inity = event.pageY - top; + this.resizing.initw = parseInt(this.$window.css("width")); + this.resizing.inith = parseInt(this.$window.css("height")); + this.resizing.type = [el.hasClass('left') ? -1 : (el.hasClass('right') ? 1 : 0), el.hasClass('top') ? -1 : (el.hasClass('bottom') ? 1 : 0)]; + + var main_width = (window.innerHeight == undefined) ? document.documentElement.offsetWidth : window.innerWidth; + var main_height = (window.innerHeight == undefined) ? document.documentElement.offsetHeight : window.innerHeight; + if (!this.initConfig.maxwidth) this.initConfig.maxwidth = main_width; + if (!this.initConfig.maxheight) this.initConfig.maxheight = main_height; + + if (this.resizing.type[0]>0) { + this.resizing.maxx = Math.min(main_width, left+this.initConfig.maxwidth); + this.resizing.minx = left+this.initConfig.minwidth; + } else if (this.resizing.type[0]<0) { + this.resizing.maxx = left+this.resizing.initw-this.initConfig.minwidth; + this.resizing.minx = Math.max(0, left+this.resizing.initw-this.initConfig.maxwidth); + } + if (this.resizing.type[1]>0) { + this.resizing.maxy = Math.min(main_height, top+this.initConfig.maxheight); + this.resizing.miny = top+this.initConfig.minheight; + } else if (this.resizing.type[1]<0) { + this.resizing.maxy = top+this.resizing.inith-this.initConfig.minheight; + this.resizing.miny = Math.max(0, top+this.resizing.inith-this.initConfig.maxheight); + } + + $(document.body).css('cursor', el.css('cursor')); + this.$window.find('.resize-border').addClass('resizing'); + this.$window.find('.header').addClass('resizing'); + + $(document).on('mousemove', this.binding.resize); + $(document).on('mouseup', this.binding.resizeStop); + this.fireEvent('resize', [this, 'start']); + } + + function _resize(event) { + if (this.resizing.enabled) { + var resized = false; + if (this.resizing.type[0] && event.pageXthis.resizing.minx) { + if (this.resizing.type[0]<0) + this.$window.css({left: event.pageX - this.resizing.initx}); + this.setWidth(this.resizing.initw + (event.pageX - this.resizing.initpage_x) * this.resizing.type[0]); + resized = true; + } + if (this.resizing.type[1] && event.pageYthis.resizing.miny) { + if (this.resizing.type[1]<0) + this.$window.css({top: event.pageY - this.resizing.inity}); + this.setHeight(this.resizing.inith + (event.pageY - this.resizing.initpage_y) * this.resizing.type[1]); + resized = true; + } + if (resized) this.fireEvent('resizing'); + } + } + + function _resizestop() { + $(document).off('mousemove', this.binding.resize); + $(document).off('mouseup', this.binding.resizeStop); + $(document.body).css('cursor', 'auto'); + this.$window.find('.resize-border').removeClass('resizing'); + this.$window.find('.header').removeClass('resizing'); + + this.resizing.enabled = false; + this.fireEvent('resize', [this, 'end']); + } + Common.UI.alert = function(options) { var me = this.Window.prototype; var arrBtns = {ok: me.okButtonText, cancel: me.cancelButtonText, @@ -450,6 +529,7 @@ define([ $window : undefined, $lastmodal : undefined, dragging : {enabled: false}, + resizing : {enabled: false}, initialize : function(options) { this.initConfig = {}; @@ -503,6 +583,9 @@ define([ this.$window.css('height',this.initConfig.height); } + if (this.initConfig.resizable) + this.setResizable(this.initConfig.resizable); + var me = this; Common.NotificationCenter.on('window:close', function() { if (me.$window && me.isVisible()) me.close(); @@ -683,6 +766,7 @@ define([ if (width >= 0) { var min = parseInt(this.$window.css('min-width')); width < min && (width = min); + width -= (parseInt(this.$window.css('border-left-width')) + parseInt(this.$window.css('border-right-width'))); this.$window.width(width); } }, @@ -695,6 +779,7 @@ define([ if (height >= 0) { var min = parseInt(this.$window.css('min-height')); height < min && (height = min); + height -= (parseInt(this.$window.css('border-bottom-width')) + parseInt(this.$window.css('border-top-width'))); this.$window.height(height); if (this.initConfig.header) @@ -729,6 +814,38 @@ define([ return this.$window && this.$window.is(':visible'); }, + setResizable: function(resizable) { + if (resizable !== this.resizable) { + if (resizable) { + var bordersTemplate = '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
'; + if (this.initConfig.header) + bordersTemplate += '
' + + '
'; + + this.$window.append(_.template(bordersTemplate)); + + this.binding.resize = _.bind(_resize, this); + this.binding.resizeStop = _.bind(_resizestop, this); + this.binding.resizeStart = _.bind(_resizestart, this); + + (this.initConfig.minwidth==undefined) && (this.initConfig.minwidth = 0); + (this.initConfig.minheight==undefined) && (this.initConfig.minheight = 0); + + this.$window.find('.resize-border').on('mousedown', this.binding.resizeStart); + } else { + this.$window.find('.resize-border').remove(); + } + this.resizable = resizable; + } + }, + onPrimary: function() {}, cancelButtonText: 'Cancel', diff --git a/apps/common/main/resources/less/window.less b/apps/common/main/resources/less/window.less index d93deb9ce..f23a8f74a 100644 --- a/apps/common/main/resources/less/window.less +++ b/apps/common/main/resources/less/window.less @@ -80,6 +80,10 @@ } } } + + &.resizing { + cursor: inherit !important; + } } > .body { @@ -185,6 +189,32 @@ -o-transform: none !important; -o-transition: none !important; } + + .resize-border { + position: absolute; + width: 5px; + height: 5px; + z-index: 1; + background: @gray-lighter; + border: 1px none @gray-dark; + + &.left { + left: 0; + } + &.right { + right: 0; + } + &.top { + top: 0; + } + &.bottom { + bottom: 0; + } + + &.resizing { + cursor: inherit !important; + } + } } .modal-dlg { From b475bb5f2088700c5ca09f2e45359e1e750c4b6f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 4 Aug 2016 14:44:23 +0300 Subject: [PATCH 09/23] Debugging resizable plugins. --- apps/common/main/lib/controller/Plugins.js | 18 ++++++++++++++---- apps/common/main/lib/view/Plugins.js | 22 +++++++++++++--------- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index 4cb9de023..a4c32a331 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -226,7 +226,9 @@ define([ var me = this, arrBtns = variation.get_Buttons(), newBtns = {}, - size = variation.get_Size(); + size = variation.get_Size(), + maxsize = variation.get_MaximumSize(), + minsize = variation.get_MinimumSize(); if (!size || size.length<2) size = [800, 600]; if (_.isArray(arrBtns)) { @@ -242,7 +244,11 @@ define([ height: size[1], // inner height url: _baseUrl + variation.get_Url(), buttons: newBtns, - toolcallback: _.bind(this.onToolClose, this) + toolcallback: _.bind(this.onToolClose, this), + maxwidth: maxsize[0], + maxheight: maxsize[1], + minwidth: minsize[0], + minheight: minsize[1] }); me.pluginDlg.on('render:after', function(obj){ obj.getChild('.footer .dlg-btn').on('click', _.bind(me.onDlgBtnClick, me)); @@ -251,6 +257,8 @@ define([ me.pluginDlg = undefined; }).on('drag', function(args){ me.api.asc_pluginEnableMouseEvents(args[1]=='start'); + }).on('resize', function(args){ + me.api.asc_pluginEnableMouseEvents(args[1]=='start'); }); me.pluginDlg.show(); } @@ -286,7 +294,8 @@ define([ onPluginMouseUp: function(x, y) { if (this.pluginDlg) { - this.pluginDlg.binding.dragStop(); + if (this.pluginDlg.binding.dragStop) this.pluginDlg.binding.dragStop(); + if (this.pluginDlg.binding.resizeStop) this.pluginDlg.binding.resizeStop(); } else Common.NotificationCenter.trigger('frame:mouseup', jQuery.Event("mouseup", { pageX: x+this._moveOffset.x, pageY: y+this._moveOffset.y } )); }, @@ -294,7 +303,8 @@ define([ onPluginMouseMove: function(x, y) { if (this.pluginDlg) { var offset = this.pluginContainer.offset(); - this.pluginDlg.binding.drag(jQuery.Event("mousemove", { pageX: x+offset.left, pageY: y+offset.top } )); + if (this.pluginDlg.binding.drag) this.pluginDlg.binding.drag(jQuery.Event("mousemove", { pageX: x+offset.left, pageY: y+offset.top } )); + if (this.pluginDlg.binding.resize) this.pluginDlg.binding.resize(jQuery.Event("mousemove", { pageX: x+offset.left, pageY: y+offset.top } )); } else Common.NotificationCenter.trigger('frame:mousemove', jQuery.Event("mousemove", { pageX: x+this._moveOffset.x, pageY: y+this._moveOffset.y } )); } diff --git a/apps/common/main/lib/view/Plugins.js b/apps/common/main/lib/view/Plugins.js index ea8d5c649..7bf7bc9e0 100644 --- a/apps/common/main/lib/view/Plugins.js +++ b/apps/common/main/lib/view/Plugins.js @@ -230,6 +230,10 @@ define([ Common.UI.Window.prototype.render.call(this); this.$window.find('> .body').css({height: 'auto', overflow: 'hidden'}); + this.boxEl = this.$window.find('.body > .box'); + this._headerFooterHeight = (this.options.buttons && _.size(this.options.buttons)>0) ? 85 : 34; + this._headerFooterHeight += ((parseInt(this.$window.css('border-top-width')) + parseInt(this.$window.css('border-bottom-width')))); + var iframe = document.createElement("iframe"); iframe.id = 'plugin_iframe'; iframe.name = 'pluginFrameEditor', @@ -251,6 +255,10 @@ define([ iframe.src = this.url; $('#id-plugin-placeholder').append(iframe); + + this.on('resizing', function(args){ + me.boxEl.css('height', parseInt(me.$window.css('height')) - me._headerFooterHeight); + }); }, _onLoad: function() { @@ -262,23 +270,19 @@ define([ setInnerSize: function(width, height) { var maxHeight = parseInt(window.innerHeight), maxWidth = parseInt(window.innerWidth), - header_footer = (this.options.buttons && _.size(this.options.buttons)>0) ? 85 : 34, - borders_height = (parseInt(this.$window.css('border-top-width')) + parseInt(this.$window.css('border-bottom-width'))), borders_width = (parseInt(this.$window.css('border-left-width')) + parseInt(this.$window.css('border-right-width'))); - if (maxHeight .box'); - boxEl.css('height', height); + this.boxEl.css('height', height); - Common.UI.Window.prototype.setHeight.call(this, height + header_footer + borders_height); + Common.UI.Window.prototype.setHeight.call(this, height + this._headerFooterHeight); Common.UI.Window.prototype.setWidth.call(this, width + borders_width); this.$window.css('left',(maxWidth - width - borders_width) / 2); - this.$window.css('top',((maxHeight - height - header_footer - borders_height) / 2) * 0.9); + this.$window.css('top',((maxHeight - height - this._headerFooterHeight) / 2) * 0.9); }, textLoading : 'Loading' From bf5a237993c585d0bbfd659933639eec71f9874c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 4 Aug 2016 16:02:39 +0300 Subject: [PATCH 10/23] Update window resizing. --- apps/common/main/lib/component/Window.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index 785262341..9cbe07b56 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -306,24 +306,24 @@ define([ this.resizing.inith = parseInt(this.$window.css("height")); this.resizing.type = [el.hasClass('left') ? -1 : (el.hasClass('right') ? 1 : 0), el.hasClass('top') ? -1 : (el.hasClass('bottom') ? 1 : 0)]; - var main_width = (window.innerHeight == undefined) ? document.documentElement.offsetWidth : window.innerWidth; - var main_height = (window.innerHeight == undefined) ? document.documentElement.offsetHeight : window.innerHeight; - if (!this.initConfig.maxwidth) this.initConfig.maxwidth = main_width; - if (!this.initConfig.maxheight) this.initConfig.maxheight = main_height; + var main_width = (window.innerHeight == undefined) ? document.documentElement.offsetWidth : window.innerWidth, + main_height = (window.innerHeight == undefined) ? document.documentElement.offsetHeight : window.innerHeight, + maxwidth = (this.initConfig.maxwidth) ? this.initConfig.maxwidth : main_width, + maxheight = (this.initConfig.maxheight) ? this.initConfig.maxheight : main_height; if (this.resizing.type[0]>0) { - this.resizing.maxx = Math.min(main_width, left+this.initConfig.maxwidth); + this.resizing.maxx = Math.min(main_width, left+maxwidth); this.resizing.minx = left+this.initConfig.minwidth; } else if (this.resizing.type[0]<0) { this.resizing.maxx = left+this.resizing.initw-this.initConfig.minwidth; - this.resizing.minx = Math.max(0, left+this.resizing.initw-this.initConfig.maxwidth); + this.resizing.minx = Math.max(0, left+this.resizing.initw-maxwidth); } if (this.resizing.type[1]>0) { - this.resizing.maxy = Math.min(main_height, top+this.initConfig.maxheight); + this.resizing.maxy = Math.min(main_height, top+maxheight); this.resizing.miny = top+this.initConfig.minheight; } else if (this.resizing.type[1]<0) { this.resizing.maxy = top+this.resizing.inith-this.initConfig.minheight; - this.resizing.miny = Math.max(0, top+this.resizing.inith-this.initConfig.maxheight); + this.resizing.miny = Math.max(0, top+this.resizing.inith-maxheight); } $(document.body).css('cursor', el.css('cursor')); @@ -814,7 +814,7 @@ define([ return this.$window && this.$window.is(':visible'); }, - setResizable: function(resizable) { + setResizable: function(resizable, minSize, maxSize) { if (resizable !== this.resizable) { if (resizable) { var bordersTemplate = '
' + @@ -835,8 +835,10 @@ define([ this.binding.resizeStop = _.bind(_resizestop, this); this.binding.resizeStart = _.bind(_resizestart, this); - (this.initConfig.minwidth==undefined) && (this.initConfig.minwidth = 0); - (this.initConfig.minheight==undefined) && (this.initConfig.minheight = 0); + (minSize && minSize.length>1) && (this.initConfig.minwidth = minSize[0]); + (minSize && minSize.length>1) && (this.initConfig.minheight = minSize[1]); + (maxSize && maxSize.length>1) && (this.initConfig.maxwidth = maxSize[0]); + (maxSize && maxSize.length>1) && (this.initConfig.maxheight = maxSize[1]); this.$window.find('.resize-border').on('mousedown', this.binding.resizeStart); } else { From 4d9125372f73881aeee80d5bf2185b15b32d11b5 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 4 Aug 2016 16:03:17 +0300 Subject: [PATCH 11/23] Update plugin window resizing. --- apps/common/main/lib/controller/Plugins.js | 18 ++++++------------ apps/common/main/lib/model/Plugin.js | 4 +--- .../documenteditor/main/app/controller/Main.js | 4 +--- .../main/app/controller/Main.js | 4 +--- .../main/app/controller/Main.js | 4 +--- 5 files changed, 10 insertions(+), 24 deletions(-) diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index a4c32a331..b8b935bc2 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -136,8 +136,6 @@ define([ variation.set_UpdateOleOnResize(itemVar.get('isUpdateOleOnResize')); variation.set_Buttons(itemVar.get('buttons')); variation.set_Size(itemVar.get('size')); - variation.set_MaximumSize(itemVar.get('maximumSize')); - variation.set_MinimumSize(itemVar.get('minimumSize')); variationsArr.push(variation); }); plugin.set_Variations(variationsArr); @@ -226,9 +224,7 @@ define([ var me = this, arrBtns = variation.get_Buttons(), newBtns = {}, - size = variation.get_Size(), - maxsize = variation.get_MaximumSize(), - minsize = variation.get_MinimumSize(); + size = variation.get_Size(); if (!size || size.length<2) size = [800, 600]; if (_.isArray(arrBtns)) { @@ -244,11 +240,7 @@ define([ height: size[1], // inner height url: _baseUrl + variation.get_Url(), buttons: newBtns, - toolcallback: _.bind(this.onToolClose, this), - maxwidth: maxsize[0], - maxheight: maxsize[1], - minwidth: minsize[0], - minheight: minsize[1] + toolcallback: _.bind(this.onToolClose, this) }); me.pluginDlg.on('render:after', function(obj){ obj.getChild('.footer .dlg-btn').on('click', _.bind(me.onDlgBtnClick, me)); @@ -275,9 +267,11 @@ define([ this.panelPlugins.closeNotVisualMode(); }, - onPluginResize: function(width, height, callback) { + onPluginResize: function(size, minSize, maxSize, callback ) { if (this.pluginDlg) { - this.pluginDlg.setInnerSize(width, height); + var resizable = (minSize && minSize.length>1 && maxSize && maxSize.length>1 && (maxSize[0] > minSize[0] || maxSize[1] > minSize[1] || maxSize[0]==0 || maxSize[1] == 0)); + this.pluginDlg.setResizable(resizable, minSize, maxSize); + this.pluginDlg.setInnerSize(size[0], size[1]); if (callback) callback.call(); } diff --git a/apps/common/main/lib/model/Plugin.js b/apps/common/main/lib/model/Plugin.js index c4d47830b..14acce6b3 100644 --- a/apps/common/main/lib/model/Plugin.js +++ b/apps/common/main/lib/model/Plugin.js @@ -64,9 +64,7 @@ define([ initData: "", isUpdateOleOnResize: false, buttons: [], - size: [800, 600], - maximumSize: [], - minimumSize: [] + size: [800, 600] } } }); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 7df6d5b15..202a0c2a6 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1727,9 +1727,7 @@ define([ initData: itemVar.initData, isUpdateOleOnResize : itemVar.isUpdateOleOnResize, buttons: itemVar.buttons, - size: itemVar.size, - minimumSize: itemVar.minimumSize, - maximumSize: itemVar.maximumSize + size: itemVar.size })); }); if (variationsArr.length>0) diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index b69d69f7d..94660dedd 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1513,9 +1513,7 @@ define([ initData: itemVar.initData, isUpdateOleOnResize : itemVar.isUpdateOleOnResize, buttons: itemVar.buttons, - size: itemVar.size, - minimumSize: itemVar.minimumSize, - maximumSize: itemVar.maximumSize + size: itemVar.size })); }); if (variationsArr.length>0) diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 0fd78dd62..e8c4c96ff 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1722,9 +1722,7 @@ define([ initData: itemVar.initData, isUpdateOleOnResize : itemVar.isUpdateOleOnResize, buttons: itemVar.buttons, - size: itemVar.size, - minimumSize: itemVar.minimumSize, - maximumSize: itemVar.maximumSize + size: itemVar.size })); }); if (variationsArr.length>0) From 278633279fe36ceaf4489509605ff2526cee58de Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 5 Aug 2016 14:40:47 +0300 Subject: [PATCH 12/23] [SSE] Fix bug 32282. --- .../main/app/controller/DocumentHolder.js | 18 ++++++++++++++++-- apps/spreadsheeteditor/main/locale/en.json | 2 ++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index db4dac223..d90ec45e8 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -960,7 +960,19 @@ define([ }, onApiHyperlinkClick: function(url) { - if (url && this.api.asc_getUrlType(url)>0) { + if (!url) { + Common.UI.alert({ + msg: this.errorInvalidLink, + title: this.notcriticalErrorTitle, + iconCls: 'warn', + buttons: ['ok'], + callback: _.bind(function(btn){ + Common.NotificationCenter.trigger('edit:complete', this.documentHolder); + }, this) + }); + return; + } + if (this.api.asc_getUrlType(url)>0) { var newDocumentPage = window.open(url, '_blank'); if (newDocumentPage) newDocumentPage.focus(); @@ -1540,7 +1552,9 @@ define([ textChangeRowHeight : 'Row Height {0} points ({1} pixels)', textInsertLeft : 'Insert Left', textInsertTop : 'Insert Top', - textSym : 'sym' + textSym : 'sym', + notcriticalErrorTitle: 'Warning', + errorInvalidLink: 'The link reference does not exist. Please correct the link or delete it.' }, SSE.Controllers.DocumentHolder || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index c406e83dc..5c24e0753 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -98,6 +98,8 @@ "SSE.Controllers.DocumentHolder.txtHeight": "Height", "SSE.Controllers.DocumentHolder.txtRowHeight": "Row Height", "SSE.Controllers.DocumentHolder.txtWidth": "Width", + "SSE.Controllers.DocumentHolder.notcriticalErrorTitle": "Warning", + "SSE.Controllers.DocumentHolder.errorInvalidLink": "The link reference does not exist. Please correct the link or delete it.", "SSE.Controllers.LeftMenu.newDocumentTitle": "Unnamed spreadsheet", "SSE.Controllers.LeftMenu.textByColumns": "By columns", "SSE.Controllers.LeftMenu.textByRows": "By rows", From 18f49aaa200d0b6b52945f190272759213eb9e1f Mon Sep 17 00:00:00 2001 From: Sergey Luzyanin Date: Mon, 8 Aug 2016 12:20:17 +0300 Subject: [PATCH 13/23] added apiBuilder for presentation editor --- apps/presentationeditor/sdk_dev_scripts.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/presentationeditor/sdk_dev_scripts.js b/apps/presentationeditor/sdk_dev_scripts.js index 03b4a404c..69996b51e 100644 --- a/apps/presentationeditor/sdk_dev_scripts.js +++ b/apps/presentationeditor/sdk_dev_scripts.js @@ -149,5 +149,6 @@ var sdk_dev_scrpipts = [ "../../../../sdkjs/common/Drawings/Format/DrawingContent.js", "../../../../sdkjs/common/clipboard_base.js", "../../../../sdkjs/common/plugins.js", + "../../../../sdkjs/slide/apiBuilder.js", "../../../../sdkjs/common/text_input.js" ]; \ No newline at end of file From aa0797286ad3a29f846a7e091469820d12199541 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 8 Aug 2016 15:16:04 +0300 Subject: [PATCH 14/23] [SSE] Updated translations. --- apps/spreadsheeteditor/main/locale/ru.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/locale/ru.json b/apps/spreadsheeteditor/main/locale/ru.json index f069dc3a3..b35a88caf 100644 --- a/apps/spreadsheeteditor/main/locale/ru.json +++ b/apps/spreadsheeteditor/main/locale/ru.json @@ -461,7 +461,7 @@ "SSE.Views.DocumentHolder.txtClearHyper": "Гиперссылки", "SSE.Views.DocumentHolder.txtClearText": "Текст", "SSE.Views.DocumentHolder.txtColumn": "Столбец", - "SSE.Views.DocumentHolder.txtColumnWidth": "Ширина столбца", + "SSE.Views.DocumentHolder.txtColumnWidth": "Задать ширину столбца", "SSE.Views.DocumentHolder.txtCopy": "Копировать", "SSE.Views.DocumentHolder.txtCut": "Вырезать", "SSE.Views.DocumentHolder.txtDelete": "Удалить", @@ -479,7 +479,7 @@ "SSE.Views.DocumentHolder.txtPaste": "Вставить", "SSE.Views.DocumentHolder.txtReapply": "Применить повторно", "SSE.Views.DocumentHolder.txtRow": "Строку", - "SSE.Views.DocumentHolder.txtRowHeight": "Высота строки", + "SSE.Views.DocumentHolder.txtRowHeight": "Задать высоту строки", "SSE.Views.DocumentHolder.txtSelect": "Выделить", "SSE.Views.DocumentHolder.txtShiftDown": "Ячейки со сдвигом вниз", "SSE.Views.DocumentHolder.txtShiftLeft": "Ячейки со сдвигом влево", From a04a34f21a7e6b952b6d608e877d909f124cae94 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 8 Aug 2016 16:06:04 +0300 Subject: [PATCH 15/23] [PE] Check editors support when loading plugins. --- apps/presentationeditor/main/app/controller/Main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 94660dedd..881aacf45 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1494,7 +1494,7 @@ define([ variations.forEach(function(itemVar){ var isSupported = false; for (var i=0; i Date: Mon, 8 Aug 2016 16:13:57 +0300 Subject: [PATCH 16/23] [PE] Edit ole-objects. --- apps/presentationeditor/main/app/view/ImageSettings.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/presentationeditor/main/app/view/ImageSettings.js b/apps/presentationeditor/main/app/view/ImageSettings.js index 27e8356a9..18a8b9d9e 100644 --- a/apps/presentationeditor/main/app/view/ImageSettings.js +++ b/apps/presentationeditor/main/app/view/ImageSettings.js @@ -111,8 +111,8 @@ define([ }, this)); this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this)); this.btnEditObject.on('click', _.bind(function(btn){ -// if (this.api) this.api.asc_pluginRun(this._originalProps.asc_getPluginGuid(), 0, this._originalProps.asc_getPluginData()); -// this.fireEvent('editcomplete', this); + if (this.api) this.api.asc_pluginRun(this._originalProps.asc_getPluginGuid(), 0, this._originalProps.asc_getPluginData()); + this.fireEvent('editcomplete', this); }, this)); $(this.el).on('click', '#image-advanced-link', _.bind(this.openAdvancedSettings, this)); }, @@ -180,9 +180,8 @@ define([ } if (this._state.isOleObject) { -// var plugin = DE.getCollection('Common.Collections.Plugins').findWhere({guid: pluginGuid}); -// this.btnEditObject.setDisabled(plugin===null || plugin ===undefined); - this.btnEditObject.setDisabled(true); + var plugin = PE.getCollection('Common.Collections.Plugins').findWhere({guid: pluginGuid}); + this.btnEditObject.setDisabled(plugin===null || plugin ===undefined); } else { this.btnInsertFromUrl.setDisabled(pluginGuid===null); this.btnInsertFromFile.setDisabled(pluginGuid===null); From 1fe2a5066a66b1d8a7aeeb12e6b1620ef20f75d3 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 8 Aug 2016 16:27:00 +0300 Subject: [PATCH 17/23] Add "initOnSelectionChanged" parameter to plugins. --- apps/common/main/lib/controller/Plugins.js | 1 + apps/common/main/lib/model/Plugin.js | 3 ++- apps/documenteditor/main/app/controller/Main.js | 3 ++- apps/presentationeditor/main/app/controller/Main.js | 3 ++- apps/spreadsheeteditor/main/app/controller/Main.js | 3 ++- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index b8b935bc2..14430d868 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -136,6 +136,7 @@ define([ variation.set_UpdateOleOnResize(itemVar.get('isUpdateOleOnResize')); variation.set_Buttons(itemVar.get('buttons')); variation.set_Size(itemVar.get('size')); + variation.set_InitOnSelectionChanged(itemVar.get('initOnSelectionChanged')); variationsArr.push(variation); }); plugin.set_Variations(variationsArr); diff --git a/apps/common/main/lib/model/Plugin.js b/apps/common/main/lib/model/Plugin.js index 14acce6b3..8c0ace1d0 100644 --- a/apps/common/main/lib/model/Plugin.js +++ b/apps/common/main/lib/model/Plugin.js @@ -64,7 +64,8 @@ define([ initData: "", isUpdateOleOnResize: false, buttons: [], - size: [800, 600] + size: [800, 600], + initOnSelectionChanged: false } } }); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 202a0c2a6..ef42654e7 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1727,7 +1727,8 @@ define([ initData: itemVar.initData, isUpdateOleOnResize : itemVar.isUpdateOleOnResize, buttons: itemVar.buttons, - size: itemVar.size + size: itemVar.size, + initOnSelectionChanged: itemVar.initOnSelectionChanged })); }); if (variationsArr.length>0) diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 881aacf45..521d001ec 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1513,7 +1513,8 @@ define([ initData: itemVar.initData, isUpdateOleOnResize : itemVar.isUpdateOleOnResize, buttons: itemVar.buttons, - size: itemVar.size + size: itemVar.size, + initOnSelectionChanged: itemVar.initOnSelectionChanged })); }); if (variationsArr.length>0) diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index e8c4c96ff..a8105de0b 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1722,7 +1722,8 @@ define([ initData: itemVar.initData, isUpdateOleOnResize : itemVar.isUpdateOleOnResize, buttons: itemVar.buttons, - size: itemVar.size + size: itemVar.size, + initOnSelectionChanged: itemVar.initOnSelectionChanged })); }); if (variationsArr.length>0) From 7e75a2a2267bedbcfdd04e66f2336046226b6c49 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 8 Aug 2016 17:13:39 +0300 Subject: [PATCH 18/23] Refactoring ThemeColorPalette component. --- .../main/lib/component/ThemeColorPalette.js | 48 ++++++-- .../main/app/view/DropcapSettingsAdvanced.js | 43 +------ .../main/app/view/ParagraphSettings.js | 22 +--- .../app/view/ParagraphSettingsAdvanced.js | 43 +------ .../main/app/view/ShapeSettings.js | 106 +----------------- .../main/app/view/TableSettings.js | 43 +------ .../main/app/view/TableSettingsAdvanced.js | 63 +---------- .../main/app/view/TextArtSettings.js | 64 +---------- apps/documenteditor/main/app/view/Toolbar.js | 43 +------ apps/documenteditor/main/locale/en.json | 34 +++--- .../main/app/view/ShapeSettings.js | 106 +----------------- .../main/app/view/SlideSettings.js | 85 +------------- .../main/app/view/TableSettings.js | 43 +------ .../main/app/view/TextArtSettings.js | 106 +----------------- .../main/app/view/Toolbar.js | 23 +--- apps/presentationeditor/main/locale/en.json | 22 ++-- .../main/app/view/ShapeSettings.js | 106 +----------------- .../main/app/view/Statusbar.js | 22 +--- .../main/app/view/TextArtSettings.js | 106 +----------------- .../main/app/view/Toolbar.js | 65 +---------- apps/spreadsheeteditor/main/locale/en.json | 18 +-- 21 files changed, 130 insertions(+), 1081 deletions(-) diff --git a/apps/common/main/lib/component/ThemeColorPalette.js b/apps/common/main/lib/component/ThemeColorPalette.js index 769419825..7a6361078 100644 --- a/apps/common/main/lib/component/ThemeColorPalette.js +++ b/apps/common/main/lib/component/ThemeColorPalette.js @@ -47,10 +47,14 @@ define([ ], function () { 'use strict'; - Common.UI.ThemeColorPalette = Common.UI.BaseView.extend({ + Common.UI.ThemeColorPalette = Common.UI.BaseView.extend(_.extend({ options: { dynamiccolors: 10, + standardcolors: 10, + themecolors: 10, + effects: 5, allowReselect: true, + transparent: false, value: '000000' }, @@ -96,12 +100,7 @@ define([ var me = this, el = $(this.el); - this.colors = me.options.colors || [ - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', '--', '-', - '000000', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39' - ]; + this.colors = me.options.colors || this.generateColorData(me.options.themecolors, me.options.effects, me.options.standardcolors, me.options.transparent); el.addClass('theme-colorpalette'); this.render(); @@ -372,7 +371,38 @@ define([ clearSelection: function(suppressEvent) { $(this.el).find('a.' + this.selectedCls).removeClass(this.selectedCls); this.value = undefined; - } + }, - }); + generateColorData: function(themecolors, effects, standardcolors, transparent) { + var arr = [], + len = (themecolors>0 && effects>0) ? themecolors * effects : 0; + if (themecolors>0) { + arr = [this.textThemeColors, '-']; + for (var i=0; i0) arr.push('-'); + for (var i=0; iPlease click to save your changes and reload the updates.", + "Common.UI.ThemeColorPalette.textStandartColors": "Standard Colors", + "Common.UI.ThemeColorPalette.textThemeColors": "Theme Colors", "Common.UI.Window.cancelButtonText": "Cancel", "Common.UI.Window.closeButtonText": "Close", "Common.UI.Window.noButtonText": "No", @@ -842,8 +844,8 @@ "DE.Views.DropcapSettingsAdvanced.textRelative": "Relative to", "DE.Views.DropcapSettingsAdvanced.textRight": "Right", "DE.Views.DropcapSettingsAdvanced.textRowHeight": "Height in rows", - "DE.Views.DropcapSettingsAdvanced.textStandartColors": "Standard Colors", - "DE.Views.DropcapSettingsAdvanced.textThemeColors": "Theme Colors", + "del_DE.Views.DropcapSettingsAdvanced.textStandartColors": "Standard Colors", + "del_DE.Views.DropcapSettingsAdvanced.textThemeColors": "Theme Colors", "DE.Views.DropcapSettingsAdvanced.textTitle": "Drop Cap - Advanced Settings", "DE.Views.DropcapSettingsAdvanced.textTitleFrame": "Frame - Advanced Settings", "DE.Views.DropcapSettingsAdvanced.textTop": "Top", @@ -1115,8 +1117,8 @@ "DE.Views.ParagraphSettings.textBackColor": "Background color", "DE.Views.ParagraphSettings.textExact": "Exactly", "DE.Views.ParagraphSettings.textNewColor": "Add New Custom Color", - "DE.Views.ParagraphSettings.textStandartColors": "Standard Colors", - "DE.Views.ParagraphSettings.textThemeColors": "Theme Colors", + "del_DE.Views.ParagraphSettings.textStandartColors": "Standard Colors", + "del_DE.Views.ParagraphSettings.textThemeColors": "Theme Colors", "DE.Views.ParagraphSettings.txtAutoText": "Auto", "DE.Views.ParagraphSettingsAdvanced.cancelButtonText": "Cancel", "DE.Views.ParagraphSettingsAdvanced.noTabs": "The specified tabs will appear in this field", @@ -1157,12 +1159,12 @@ "DE.Views.ParagraphSettingsAdvanced.textRight": "Right", "DE.Views.ParagraphSettingsAdvanced.textSet": "Specify", "DE.Views.ParagraphSettingsAdvanced.textSpacing": "Spacing", - "DE.Views.ParagraphSettingsAdvanced.textStandartColors": "Standard Colors", + "del_DE.Views.ParagraphSettingsAdvanced.textStandartColors": "Standard Colors", "DE.Views.ParagraphSettingsAdvanced.textTabCenter": "Center", "DE.Views.ParagraphSettingsAdvanced.textTabLeft": "Left", "DE.Views.ParagraphSettingsAdvanced.textTabPosition": "Tab Position", "DE.Views.ParagraphSettingsAdvanced.textTabRight": "Right", - "DE.Views.ParagraphSettingsAdvanced.textThemeColors": "Theme Colors", + "del_DE.Views.ParagraphSettingsAdvanced.textThemeColors": "Theme Colors", "DE.Views.ParagraphSettingsAdvanced.textTitle": "Paragraph - Advanced Settings", "DE.Views.ParagraphSettingsAdvanced.textTop": "Top", "DE.Views.ParagraphSettingsAdvanced.tipAll": "Set Outer Border and All Inner Lines", @@ -1208,11 +1210,11 @@ "DE.Views.ShapeSettings.textPatternFill": "Pattern", "DE.Views.ShapeSettings.textRadial": "Radial", "DE.Views.ShapeSettings.textSelectTexture": "Select", - "DE.Views.ShapeSettings.textStandartColors": "Standard Colors", + "del_DE.Views.ShapeSettings.textStandartColors": "Standard Colors", "DE.Views.ShapeSettings.textStretch": "Stretch", "DE.Views.ShapeSettings.textStyle": "Style", "DE.Views.ShapeSettings.textTexture": "From Texture", - "DE.Views.ShapeSettings.textThemeColors": "Theme Colors", + "del_DE.Views.ShapeSettings.textThemeColors": "Theme Colors", "DE.Views.ShapeSettings.textTile": "Tile", "DE.Views.ShapeSettings.textWrap": "Wrapping Style", "DE.Views.ShapeSettings.txtBehind": "Behind", @@ -1293,9 +1295,9 @@ "DE.Views.TableSettings.textOK": "OK", "DE.Views.TableSettings.textRows": "Rows", "DE.Views.TableSettings.textSelectBorders": "Select borders you want to change applying style chosen above", - "DE.Views.TableSettings.textStandartColors": "Standard Colors", + "del_DE.Views.TableSettings.textStandartColors": "Standard Colors", "DE.Views.TableSettings.textTemplate": "Select From Template", - "DE.Views.TableSettings.textThemeColors": "Theme Colors", + "del_DE.Views.TableSettings.textThemeColors": "Theme Colors", "DE.Views.TableSettings.textTotal": "Total", "DE.Views.TableSettings.textWrap": "Text Wrapping", "DE.Views.TableSettings.textWrapNoneTooltip": "Inline table", @@ -1353,12 +1355,12 @@ "DE.Views.TableSettingsAdvanced.textRight": "Right", "DE.Views.TableSettingsAdvanced.textRightOf": "to the right of", "DE.Views.TableSettingsAdvanced.textRightTooltip": "Right", - "DE.Views.TableSettingsAdvanced.textStandartColors": "Standard Colors", + "del_DE.Views.TableSettingsAdvanced.textStandartColors": "Standard Colors", "DE.Views.TableSettingsAdvanced.textTable": "Table", "DE.Views.TableSettingsAdvanced.textTableBackColor": "Table Background", "DE.Views.TableSettingsAdvanced.textTablePosition": "Table Position", "DE.Views.TableSettingsAdvanced.textTableSize": "Table Size", - "DE.Views.TableSettingsAdvanced.textThemeColors": "Theme Colors", + "del_DE.Views.TableSettingsAdvanced.textThemeColors": "Theme Colors", "DE.Views.TableSettingsAdvanced.textTitle": "Table - Advanced Settings", "DE.Views.TableSettingsAdvanced.textTop": "Top", "DE.Views.TableSettingsAdvanced.textVertical": "Vertical", @@ -1400,10 +1402,10 @@ "DE.Views.TextArtSettings.textNoFill": "No Fill", "DE.Views.TextArtSettings.textRadial": "Radial", "DE.Views.TextArtSettings.textSelectTexture": "Select", - "DE.Views.TextArtSettings.textStandartColors": "Standard Colors", + "del_DE.Views.TextArtSettings.textStandartColors": "Standard Colors", "DE.Views.TextArtSettings.textStyle": "Style", "DE.Views.TextArtSettings.textTemplate": "Template", - "DE.Views.TextArtSettings.textThemeColors": "Theme Colors", + "del_DE.Views.TextArtSettings.textThemeColors": "Theme Colors", "DE.Views.TextArtSettings.textTransform": "Transform", "DE.Views.TextArtSettings.txtNoBorders": "No Line", "DE.Views.Toolbar.mniCustomTable": "Insert Custom Table", @@ -1462,7 +1464,7 @@ "DE.Views.Toolbar.textPoint": "Point Chart", "DE.Views.Toolbar.textPortrait": "Portrait", "DE.Views.Toolbar.textRight": "Right: ", - "DE.Views.Toolbar.textStandartColors": "Standard Colors", + "del_DE.Views.Toolbar.textStandartColors": "Standard Colors", "DE.Views.Toolbar.textStock": "Stock Chart", "DE.Views.Toolbar.textStrikeout": "Strikeout", "DE.Views.Toolbar.textStyleMenuDelete": "Delete style", @@ -1473,7 +1475,7 @@ "DE.Views.Toolbar.textStyleMenuUpdate": "Update from selection", "DE.Views.Toolbar.textSubscript": "Subscript", "DE.Views.Toolbar.textSuperscript": "Superscript", - "DE.Views.Toolbar.textThemeColors": "Theme Colors", + "del_DE.Views.Toolbar.textThemeColors": "Theme Colors", "DE.Views.Toolbar.textTitleError": "Error", "DE.Views.Toolbar.textToCurrent": "To current position", "DE.Views.Toolbar.textTop": "Top: ", diff --git a/apps/presentationeditor/main/app/view/ShapeSettings.js b/apps/presentationeditor/main/app/view/ShapeSettings.js index 7587e3da7..0666b4e80 100644 --- a/apps/presentationeditor/main/app/view/ShapeSettings.js +++ b/apps/presentationeditor/main/app/view/ShapeSettings.js @@ -156,26 +156,8 @@ define([ this.btnBackColor.on('render:after', function(btn) { me.colorsBack = new Common.UI.ThemeColorPalette({ el: $('#shape-back-color-menu'), - dynamiccolors: 10, value: 'transparent', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', 'transparent', - '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + transparent: true }); me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me)); }); @@ -222,26 +204,7 @@ define([ this.btnFGColor.on('render:after', function(btn) { me.colorsFG = new Common.UI.ThemeColorPalette({ el: $('#shape-foreground-color-menu'), - dynamiccolors: 10, - value: '000000', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: '000000' }); me.colorsFG.on('select', _.bind(me.onColorsFGSelect, me)); }); @@ -263,26 +226,7 @@ define([ this.btnBGColor.on('render:after', function(btn) { me.colorsBG = new Common.UI.ThemeColorPalette({ el: $('#shape-background-color-menu'), - dynamiccolors: 10, - value: 'ffffff', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: 'ffffff' }); me.colorsBG.on('select', _.bind(me.onColorsBGSelect, me)); }); @@ -434,26 +378,7 @@ define([ this.btnGradColor.on('render:after', function(btn) { me.colorsGrad = new Common.UI.ThemeColorPalette({ el: $('#shape-gradient-color-menu'), - dynamiccolors: 10, - value: '000000', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: '000000' }); me.colorsGrad.on('select', _.bind(me.onColorsGradientSelect, me)); }); @@ -508,26 +433,7 @@ define([ this.btnBorderColor.on('render:after', function(btn) { me.colorsBorder = new Common.UI.ThemeColorPalette({ el: $('#shape-border-color-menu'), - dynamiccolors: 10, - value: '000000', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: '000000' }); me.colorsBorder.on('select', _.bind(me.onColorsBorderSelect, me)); }); @@ -1703,8 +1609,6 @@ define([ txtPapyrus : 'Papyrus', txtWood : 'Wood', textNewColor : 'Add New Custom Color', - textThemeColors : 'Theme Colors', - textStandartColors : 'Standart Colors', textAdvanced : 'Show advanced settings', strTransparency : 'Opacity', textNoFill : 'No Fill', diff --git a/apps/presentationeditor/main/app/view/SlideSettings.js b/apps/presentationeditor/main/app/view/SlideSettings.js index 6753117cc..b17dc8390 100644 --- a/apps/presentationeditor/main/app/view/SlideSettings.js +++ b/apps/presentationeditor/main/app/view/SlideSettings.js @@ -146,26 +146,8 @@ define([ this.btnBackColor.on('render:after', function(btn) { me.colorsBack = new Common.UI.ThemeColorPalette({ el: $('#slide-back-color-menu'), - dynamiccolors: 10, value: 'ffffff', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', 'transparent', - '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + transparent: true }); me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me)); }); @@ -208,26 +190,7 @@ define([ this.btnFGColor.on('render:after', function(btn) { me.colorsFG = new Common.UI.ThemeColorPalette({ el: $('#slide-foreground-color-menu'), - dynamiccolors: 10, - value: '000000', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: '000000' }); me.colorsFG.on('select', _.bind(me.onColorsFGSelect, me)); }); @@ -249,26 +212,7 @@ define([ this.btnBGColor.on('render:after', function(btn) { me.colorsBG = new Common.UI.ThemeColorPalette({ el: $('#slide-background-color-menu'), - dynamiccolors: 10, - value: 'ffffff', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: 'ffffff' }); me.colorsBG.on('select', _.bind(me.onColorsBGSelect, me)); }); @@ -393,26 +337,7 @@ define([ this.btnGradColor.on('render:after', function(btn) { me.colorsGrad = new Common.UI.ThemeColorPalette({ el: $('#slide-gradient-color-menu'), - dynamiccolors: 10, - value: '000000', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: '000000' }); me.colorsGrad.on('select', _.bind(me.onColorsGradientSelect, me)); }); @@ -1525,8 +1450,6 @@ define([ txtPapyrus : 'Papyrus', txtWood : 'Wood', textNewColor : 'Add New Custom Color', - textThemeColors : 'Theme Colors', - textStandartColors : 'Standart Colors', textAdvanced : 'Show advanced settings', textNoFill : 'No Fill', textSelectTexture : 'Select', diff --git a/apps/presentationeditor/main/app/view/TableSettings.js b/apps/presentationeditor/main/app/view/TableSettings.js index c17a90a00..9f9b2220d 100644 --- a/apps/presentationeditor/main/app/view/TableSettings.js +++ b/apps/presentationeditor/main/app/view/TableSettings.js @@ -203,26 +203,7 @@ define([ this.btnBorderColor.on('render:after', function(btn) { me.borderColor = new Common.UI.ThemeColorPalette({ - el: $('#table-border-color-menu'), - dynamiccolors: 10, - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + el: $('#table-border-color-menu') }); me.borderColor.on('select', _.bind(me.onColorsBorderSelect, me)); }); @@ -244,25 +225,7 @@ define([ this.btnBackColor.on('render:after', function(btn) { me.colorsBack = new Common.UI.ThemeColorPalette({ el: $('#table-back-color-menu'), - dynamiccolors: 10, - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', 'transparent', - '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + transparent: true }); me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me)); }); @@ -724,8 +687,6 @@ define([ textFirst : 'First', textLast : 'Last', textEmptyTemplate : 'No templates', - textThemeColors : 'Theme Colors', - textStandartColors : 'Standart Colors', tipTop: 'Set Outer Top Border Only', tipLeft: 'Set Outer Left Border Only', tipBottom: 'Set Outer Bottom Border Only', diff --git a/apps/presentationeditor/main/app/view/TextArtSettings.js b/apps/presentationeditor/main/app/view/TextArtSettings.js index 485229ed6..4621342c9 100644 --- a/apps/presentationeditor/main/app/view/TextArtSettings.js +++ b/apps/presentationeditor/main/app/view/TextArtSettings.js @@ -170,26 +170,8 @@ define([ this.btnBackColor.on('render:after', function(btn) { me.colorsBack = new Common.UI.ThemeColorPalette({ el: $('#textart-back-color-menu'), - dynamiccolors: 10, value: 'transparent', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', 'transparent', - '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + transparent: true }); me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me)); }); @@ -237,26 +219,7 @@ define([ this.btnFGColor.on('render:after', function(btn) { me.colorsFG = new Common.UI.ThemeColorPalette({ el: $('#textart-foreground-color-menu'), - dynamiccolors: 10, - value: '000000', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: '000000' }); me.colorsFG.on('select', _.bind(me.onColorsFGSelect, me)); }); @@ -278,26 +241,7 @@ define([ this.btnBGColor.on('render:after', function(btn) { me.colorsBG = new Common.UI.ThemeColorPalette({ el: $('#textart-background-color-menu'), - dynamiccolors: 10, - value: 'ffffff', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: 'ffffff' }); me.colorsBG.on('select', _.bind(me.onColorsBGSelect, me)); }); @@ -449,26 +393,7 @@ define([ this.btnGradColor.on('render:after', function(btn) { me.colorsGrad = new Common.UI.ThemeColorPalette({ el: $('#textart-gradient-color-menu'), - dynamiccolors: 10, - value: '000000', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: '000000' }); me.colorsGrad.on('select', _.bind(me.onColorsGradientSelect, me)); }); @@ -524,26 +449,7 @@ define([ this.btnBorderColor.on('render:after', function(btn) { me.colorsBorder = new Common.UI.ThemeColorPalette({ el: $('#textart-border-color-menu'), - dynamiccolors: 10, - value: '000000', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: '000000' }); me.colorsBorder.on('select', _.bind(me.onColorsBorderSelect, me)); }); @@ -1706,8 +1612,6 @@ define([ txtPapyrus : 'Papyrus', txtWood : 'Wood', textNewColor : 'Add New Custom Color', - textThemeColors : 'Theme Colors', - textStandartColors : 'Standart Colors', strTransparency : 'Opacity', textNoFill : 'No Fill', textSelectTexture : 'Select', diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 29574d0b6..1e2682647 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -410,26 +410,7 @@ define([ colorVal.css('background-color', btn.currentColor || 'transparent'); me.mnuFontColorPicker = new Common.UI.ThemeColorPalette({ - el: $('#id-toolbar-menu-fontcolor'), - dynamiccolors: 10, - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + el: $('#id-toolbar-menu-fontcolor') }); }); me.paragraphControls.push(me.btnFontColor); @@ -1595,8 +1576,6 @@ define([ textCancel: 'Cancel', tipColorSchemas: 'Change Color Scheme', textNewColor: 'Add New Custom Color', - textThemeColors: 'Theme Colors', - textStandartColors: 'Standart Colors', mniSlideStandard: 'Standard (4:3)', mniSlideWide: 'Widescreen (16:9)', mniSlideAdvanced: 'Advanced Settings', diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index bfdb25ddf..2959fcb6a 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -28,6 +28,8 @@ "Common.UI.SearchDialog.txtBtnReplaceAll": "Replace All", "Common.UI.SynchronizeTip.textDontShow": "Don't show this message again", "Common.UI.SynchronizeTip.textSynchronize": "The document has been changed by another user.
Please click to save your changes and reload the updates.", + "Common.UI.ThemeColorPalette.textStandartColors": "Standard Colors", + "Common.UI.ThemeColorPalette.textThemeColors": "Theme Colors", "Common.UI.Window.cancelButtonText": "Cancel", "Common.UI.Window.closeButtonText": "Close", "Common.UI.Window.noButtonText": "No", @@ -498,11 +500,11 @@ "PE.Views.ShapeSettings.textPatternFill": "Pattern", "PE.Views.ShapeSettings.textRadial": "Radial", "PE.Views.ShapeSettings.textSelectTexture": "Select", - "PE.Views.ShapeSettings.textStandartColors": "Standard Colors", + "del_PE.Views.ShapeSettings.textStandartColors": "Standard Colors", "PE.Views.ShapeSettings.textStretch": "Stretch", "PE.Views.ShapeSettings.textStyle": "Style", "PE.Views.ShapeSettings.textTexture": "From Texture", - "PE.Views.ShapeSettings.textThemeColors": "Theme Colors", + "del_PE.Views.ShapeSettings.textThemeColors": "Theme Colors", "PE.Views.ShapeSettings.textTile": "Tile", "PE.Views.ShapeSettings.txtBrownPaper": "Brown Paper", "PE.Views.ShapeSettings.txtCanvas": "Canvas", @@ -588,11 +590,11 @@ "PE.Views.SlideSettings.textSelectTexture": "Select", "PE.Views.SlideSettings.textSmoothly": "Smoothly", "PE.Views.SlideSettings.textSplit": "Split", - "PE.Views.SlideSettings.textStandartColors": "Standard Colors", + "del_PE.Views.SlideSettings.textStandartColors": "Standard Colors", "PE.Views.SlideSettings.textStretch": "Stretch", "PE.Views.SlideSettings.textStyle": "Style", "PE.Views.SlideSettings.textTexture": "From Texture", - "PE.Views.SlideSettings.textThemeColors": "Theme Colors", + "del_PE.Views.SlideSettings.textThemeColors": "Theme Colors", "PE.Views.SlideSettings.textTile": "Tile", "PE.Views.SlideSettings.textTop": "Top", "PE.Views.SlideSettings.textTopLeft": "Top Left", @@ -686,9 +688,9 @@ "PE.Views.TableSettings.textNewColor": "Custom Color", "PE.Views.TableSettings.textRows": "Rows", "PE.Views.TableSettings.textSelectBorders": "Select borders you want to change applying style chosen above", - "PE.Views.TableSettings.textStandartColors": "Standard Colors", + "del_PE.Views.TableSettings.textStandartColors": "Standard Colors", "PE.Views.TableSettings.textTemplate": "Select From Template", - "PE.Views.TableSettings.textThemeColors": "Theme Colors", + "del_PE.Views.TableSettings.textThemeColors": "Theme Colors", "PE.Views.TableSettings.textTotal": "Total", "PE.Views.TableSettings.tipAll": "Set Outer Border and All Inner Lines", "PE.Views.TableSettings.tipBottom": "Set Outer Bottom Border Only", @@ -736,12 +738,12 @@ "PE.Views.TextArtSettings.textPatternFill": "Pattern", "PE.Views.TextArtSettings.textRadial": "Radial", "PE.Views.TextArtSettings.textSelectTexture": "Select", - "PE.Views.TextArtSettings.textStandartColors": "Standard Colors", + "del_PE.Views.TextArtSettings.textStandartColors": "Standard Colors", "PE.Views.TextArtSettings.textStretch": "Stretch", "PE.Views.TextArtSettings.textStyle": "Style", "PE.Views.TextArtSettings.textTemplate": "Template", "PE.Views.TextArtSettings.textTexture": "From Texture", - "PE.Views.TextArtSettings.textThemeColors": "Theme Colors", + "del_PE.Views.TextArtSettings.textThemeColors": "Theme Colors", "PE.Views.TextArtSettings.textTile": "Tile", "PE.Views.TextArtSettings.textTransform": "Transform", "PE.Views.TextArtSettings.txtBrownPaper": "Brown Paper", @@ -798,12 +800,12 @@ "PE.Views.Toolbar.textShapeAlignMiddle": "Align Middle", "PE.Views.Toolbar.textShapeAlignRight": "Align Right", "PE.Views.Toolbar.textShapeAlignTop": "Align Top", - "PE.Views.Toolbar.textStandartColors": "Standard Colors", + "del_PE.Views.Toolbar.textStandartColors": "Standard Colors", "PE.Views.Toolbar.textStock": "Stock Chart", "PE.Views.Toolbar.textStrikeout": "Strikeout", "PE.Views.Toolbar.textSubscript": "Subscript", "PE.Views.Toolbar.textSuperscript": "Superscript", - "PE.Views.Toolbar.textThemeColors": "Theme Colors", + "del_PE.Views.Toolbar.textThemeColors": "Theme Colors", "PE.Views.Toolbar.textTitleError": "Error", "PE.Views.Toolbar.textUnderline": "Underline", "PE.Views.Toolbar.textZoom": "Zoom", diff --git a/apps/spreadsheeteditor/main/app/view/ShapeSettings.js b/apps/spreadsheeteditor/main/app/view/ShapeSettings.js index 347ef2bb9..27499474c 100644 --- a/apps/spreadsheeteditor/main/app/view/ShapeSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ShapeSettings.js @@ -157,26 +157,8 @@ define([ this.btnBackColor.on('render:after', function(btn) { me.colorsBack = new Common.UI.ThemeColorPalette({ el: $('#shape-back-color-menu'), - dynamiccolors: 10, value: 'transparent', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', 'transparent', - '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + transparent: true }); me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me)); }); @@ -223,26 +205,7 @@ define([ this.btnFGColor.on('render:after', function(btn) { me.colorsFG = new Common.UI.ThemeColorPalette({ el: $('#shape-foreground-color-menu'), - dynamiccolors: 10, - value: '000000', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: '000000' }); me.colorsFG.on('select', _.bind(me.onColorsFGSelect, me)); }); @@ -264,26 +227,7 @@ define([ this.btnBGColor.on('render:after', function(btn) { me.colorsBG = new Common.UI.ThemeColorPalette({ el: $('#shape-background-color-menu'), - dynamiccolors: 10, - value: 'ffffff', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: 'ffffff' }); me.colorsBG.on('select', _.bind(me.onColorsBGSelect, me)); }); @@ -435,26 +379,7 @@ define([ this.btnGradColor.on('render:after', function(btn) { me.colorsGrad = new Common.UI.ThemeColorPalette({ el: $('#shape-gradient-color-menu'), - dynamiccolors: 10, - value: '000000', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: '000000' }); me.colorsGrad.on('select', _.bind(me.onColorsGradientSelect, me)); }); @@ -509,26 +434,7 @@ define([ this.btnBorderColor.on('render:after', function(btn) { me.colorsBorder = new Common.UI.ThemeColorPalette({ el: $('#shape-border-color-menu'), - dynamiccolors: 10, - value: '000000', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: '000000' }); me.colorsBorder.on('select', _.bind(me.onColorsBorderSelect, me)); }); @@ -1728,8 +1634,6 @@ define([ txtPapyrus : 'Papyrus', txtWood : 'Wood', textNewColor : 'Add New Custom Color', - textThemeColors : 'Theme Colors', - textStandartColors : 'Standart Colors', textAdvanced : 'Show advanced settings', strTransparency : 'Opacity', textNoFill : 'No Fill', diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index a49a631ab..216f16e52 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -292,25 +292,7 @@ define([ me.mnuTabColor = new Common.UI.ThemeColorPalette({ el: $('#id-tab-menu-color'), - dynamiccolors: 10, - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', 'transparent', - '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + transparent: true }); me.mnuTabColor.on('select', function(picker, color) { @@ -637,8 +619,6 @@ define([ itemHide : 'Hide', itemHidden : 'Hidden', itemTabColor : 'Tab Color', - textThemeColors : 'Theme Colors', - textStandartColors : 'Standart Colors', textNoColor : 'No Color', textNewColor : 'Add New Custom Color', zoomText : 'Zoom {0}%', diff --git a/apps/spreadsheeteditor/main/app/view/TextArtSettings.js b/apps/spreadsheeteditor/main/app/view/TextArtSettings.js index b008cd9ee..9e7b91642 100644 --- a/apps/spreadsheeteditor/main/app/view/TextArtSettings.js +++ b/apps/spreadsheeteditor/main/app/view/TextArtSettings.js @@ -171,26 +171,8 @@ define([ this.btnBackColor.on('render:after', function(btn) { me.colorsBack = new Common.UI.ThemeColorPalette({ el: $('#textart-back-color-menu'), - dynamiccolors: 10, value: 'transparent', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', 'transparent', - '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + transparent: true }); me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me)); }); @@ -238,26 +220,7 @@ define([ this.btnFGColor.on('render:after', function(btn) { me.colorsFG = new Common.UI.ThemeColorPalette({ el: $('#textart-foreground-color-menu'), - dynamiccolors: 10, - value: '000000', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: '000000' }); me.colorsFG.on('select', _.bind(me.onColorsFGSelect, me)); }); @@ -279,26 +242,7 @@ define([ this.btnBGColor.on('render:after', function(btn) { me.colorsBG = new Common.UI.ThemeColorPalette({ el: $('#textart-background-color-menu'), - dynamiccolors: 10, - value: 'ffffff', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: 'ffffff' }); me.colorsBG.on('select', _.bind(me.onColorsBGSelect, me)); }); @@ -450,26 +394,7 @@ define([ this.btnGradColor.on('render:after', function(btn) { me.colorsGrad = new Common.UI.ThemeColorPalette({ el: $('#textart-gradient-color-menu'), - dynamiccolors: 10, - value: '000000', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: '000000' }); me.colorsGrad.on('select', _.bind(me.onColorsGradientSelect, me)); }); @@ -525,26 +450,7 @@ define([ this.btnBorderColor.on('render:after', function(btn) { me.colorsBorder = new Common.UI.ThemeColorPalette({ el: $('#textart-border-color-menu'), - dynamiccolors: 10, - value: '000000', - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + value: '000000' }); me.colorsBorder.on('select', _.bind(me.onColorsBorderSelect, me)); }); @@ -1711,8 +1617,6 @@ define([ txtPapyrus : 'Papyrus', txtWood : 'Wood', textNewColor : 'Add New Custom Color', - textThemeColors : 'Theme Colors', - textStandartColors : 'Standart Colors', strTransparency : 'Opacity', textNoFill : 'No Fill', textSelectTexture : 'Select', diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index af1fc6b62..55a2384cc 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -304,26 +304,7 @@ define([ colorVal.css('background-color', btn.currentColor || 'transparent'); me.mnuTextColorPicker = new Common.UI.ThemeColorPalette({ - el: $('#id-toolbar-menu-fontcolor'), - dynamiccolors: 10, - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + el: $('#id-toolbar-menu-fontcolor') }); }); @@ -347,26 +328,7 @@ define([ colorVal.css('background-color', btn.currentColor || 'transparent'); me.mnuBackColorPicker = new Common.UI.ThemeColorPalette({ - el: $('#id-toolbar-menu-paracolor'), - dynamiccolors: 10, - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - 'transparent', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + el: $('#id-toolbar-menu-paracolor') }); }); @@ -500,26 +462,7 @@ define([ colorVal.css('background-color', btn.currentColor || 'transparent'); me.mnuBorderColorPicker = new Common.UI.ThemeColorPalette({ - el: $('#id-toolbar-menu-bordercolor'), - dynamiccolors: 10, - colors: [ - me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5}, - {color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4}, - '-', - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - {color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, - '-', '--', '-', me.textStandartColors, '-', - '3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39', - '-', '--' - ] + el: $('#id-toolbar-menu-bordercolor') }); }); @@ -1967,8 +1910,6 @@ define([ tipEditChart: 'Edit Chart', textPrint: 'Print', textPrintOptions: 'Print Options', - textThemeColors: 'Theme Colors', - textStandartColors: 'Standart Colors', tipColorSchemas: 'Change Color Scheme', tipNewDocument: 'New Document', tipOpenDocument: 'Open Document', diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 5c24e0753..952fa33b1 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -25,6 +25,8 @@ "Common.UI.SearchDialog.txtBtnReplaceAll": "Replace All", "Common.UI.SynchronizeTip.textDontShow": "Don't show this message again", "Common.UI.SynchronizeTip.textSynchronize": "The document has been changed by another user.
Please click to save your changes and reload the updates.", + "Common.UI.ThemeColorPalette.textStandartColors": "Standard Colors", + "Common.UI.ThemeColorPalette.textThemeColors": "Theme Colors", "Common.UI.Window.cancelButtonText": "Cancel", "Common.UI.Window.closeButtonText": "Close", "Common.UI.Window.noButtonText": "No", @@ -804,11 +806,11 @@ "SSE.Views.ShapeSettings.textPatternFill": "Pattern", "SSE.Views.ShapeSettings.textRadial": "Radial", "SSE.Views.ShapeSettings.textSelectTexture": "Select", - "SSE.Views.ShapeSettings.textStandartColors": "Standard Colors", + "del_SSE.Views.ShapeSettings.textStandartColors": "Standard Colors", "SSE.Views.ShapeSettings.textStretch": "Stretch", "SSE.Views.ShapeSettings.textStyle": "Style", "SSE.Views.ShapeSettings.textTexture": "From Texture", - "SSE.Views.ShapeSettings.textThemeColors": "Theme Colors", + "del_SSE.Views.ShapeSettings.textThemeColors": "Theme Colors", "SSE.Views.ShapeSettings.textTile": "Tile", "SSE.Views.ShapeSettings.txtBrownPaper": "Brown Paper", "SSE.Views.ShapeSettings.txtCanvas": "Canvas", @@ -867,9 +869,9 @@ "SSE.Views.Statusbar.textCount": "COUNT", "SSE.Views.Statusbar.textNewColor": "Add New Custom Color", "SSE.Views.Statusbar.textNoColor": "No Color", - "SSE.Views.Statusbar.textStandartColors": "Standard Colors", + "del_SSE.Views.Statusbar.textStandartColors": "Standard Colors", "SSE.Views.Statusbar.textSum": "SUM", - "SSE.Views.Statusbar.textThemeColors": "Theme Colors", + "del_SSE.Views.Statusbar.textThemeColors": "Theme Colors", "SSE.Views.Statusbar.tipAccessRights": "Manage document access rights", "SSE.Views.Statusbar.tipAddTab": "Add worksheet", "SSE.Views.Statusbar.tipFirst": "Scroll to First Sheet", @@ -947,12 +949,12 @@ "SSE.Views.TextArtSettings.textPatternFill": "Pattern", "SSE.Views.TextArtSettings.textRadial": "Radial", "SSE.Views.TextArtSettings.textSelectTexture": "Select", - "SSE.Views.TextArtSettings.textStandartColors": "Standard Colors", + "del_SSE.Views.TextArtSettings.textStandartColors": "Standard Colors", "SSE.Views.TextArtSettings.textStretch": "Stretch", "SSE.Views.TextArtSettings.textStyle": "Style", "SSE.Views.TextArtSettings.textTemplate": "Template", "SSE.Views.TextArtSettings.textTexture": "From Texture", - "SSE.Views.TextArtSettings.textThemeColors": "Theme Colors", + "del_SSE.Views.TextArtSettings.textThemeColors": "Theme Colors", "SSE.Views.TextArtSettings.textTile": "Tile", "SSE.Views.TextArtSettings.textTransform": "Transform", "SSE.Views.TextArtSettings.txtBrownPaper": "Brown Paper", @@ -1012,8 +1014,8 @@ "SSE.Views.Toolbar.textRightBorders": "Right Borders", "SSE.Views.Toolbar.textRotateDown": "Rotate Text Down", "SSE.Views.Toolbar.textRotateUp": "Rotate Text Up", - "SSE.Views.Toolbar.textStandartColors": "Standard Colors", - "SSE.Views.Toolbar.textThemeColors": "Theme Colors", + "del_SSE.Views.Toolbar.textStandartColors": "Standard Colors", + "del_SSE.Views.Toolbar.textThemeColors": "Theme Colors", "SSE.Views.Toolbar.textTopBorders": "Top Borders", "SSE.Views.Toolbar.textUnderline": "Underline", "SSE.Views.Toolbar.textZoom": "Zoom", From 0c14aeb1915e97fc50a7e42062a2b938634a5076 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 8 Aug 2016 17:14:53 +0300 Subject: [PATCH 19/23] Limited size of warning window. --- apps/documenteditor/main/app/controller/Main.js | 1 + apps/presentationeditor/main/app/controller/Main.js | 1 + apps/spreadsheeteditor/main/app/controller/Main.js | 1 + 3 files changed, 3 insertions(+) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index ef42654e7..a4a00d088 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -313,6 +313,7 @@ define([ if (!old_rights) Common.UI.warning({ title: this.notcriticalErrorTitle, + width: _.isEmpty(data.message) ? 'auto' : 350, msg : _.isEmpty(data.message) ? this.warnProcessRightsChange : data.message, callback: function(){ me._state.lostEditingRights = false; diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 521d001ec..1b7dd409e 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -294,6 +294,7 @@ define([ if (!old_rights) Common.UI.warning({ title: this.notcriticalErrorTitle, + width: _.isEmpty(data.message) ? 'auto' : 350, msg : _.isEmpty(data.message) ? this.warnProcessRightsChange : data.message, callback: function(){ me._state.lostEditingRights = false; diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index a8105de0b..a328e09c2 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -325,6 +325,7 @@ define([ if (!old_rights) Common.UI.warning({ title: this.notcriticalErrorTitle, + width: _.isEmpty(data.message) ? 'auto' : 350, msg : _.isEmpty(data.message) ? this.warnProcessRightsChange : data.message, callback: function(){ me._state.lostEditingRights = false; From ccded15130ff1a292460318bb1d7804eaccf72ef Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 9 Aug 2016 11:50:51 +0300 Subject: [PATCH 20/23] Fix Bug 32934. --- apps/common/main/lib/view/Chat.js | 29 ++++++++++++++------------- apps/common/main/lib/view/Comments.js | 29 ++++++++++++++------------- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/apps/common/main/lib/view/Chat.js b/apps/common/main/lib/view/Chat.js index 536a1ca77..75bf4fafe 100644 --- a/apps/common/main/lib/view/Chat.js +++ b/apps/common/main/lib/view/Chat.js @@ -227,22 +227,9 @@ define([ _pickLink: function(message) { var arr = [], offset, len; - message.replace(Common.Utils.emailStrongRe, function(subStr) { - var ref = (! /((^mailto:)\/\/)/i.test(subStr) ) ? ('mailto:' + subStr) : subStr; - offset = arguments[arguments.length-2]; - arr.push({start: offset, end: subStr.length+offset, str: '' + subStr + ''}); - return ''; - }); - message.replace(Common.Utils.ipStrongRe, function(subStr) { offset = arguments[arguments.length-2]; - len = subStr.length; - var elem = _.find(arr, function(item){ - return ( (offset>=item.start) && (offsetitem.start)); - }); - if (!elem) - arr.push({start: offset, end: len+offset, str: '' + subStr + ''}); + arr.push({start: offset, end: subStr.length+offset, str: '' + subStr + ''}); return ''; }); @@ -259,6 +246,20 @@ define([ arr.push({start: offset, end: len+offset, str: '' + subStr + ''}); return ''; }); + + message.replace(Common.Utils.emailStrongRe, function(subStr) { + var ref = (! /((^mailto:)\/\/)/i.test(subStr) ) ? ('mailto:' + subStr) : subStr; + offset = arguments[arguments.length-2]; + len = subStr.length; + var elem = _.find(arr, function(item){ + return ( (offset>=item.start) && (offsetitem.start)); + }); + if (!elem) + arr.push({start: offset, end: len+offset, str: '' + subStr + ''}); + return ''; + }); + arr = _.sortBy(arr, function(item){ return item.start; }); var str_res = (arr.length>0) ? ( message.substring(0, arr[0].start) + arr[0].str) : message; diff --git a/apps/common/main/lib/view/Comments.js b/apps/common/main/lib/view/Comments.js index a6f0fce84..8deac95d0 100644 --- a/apps/common/main/lib/view/Comments.js +++ b/apps/common/main/lib/view/Comments.js @@ -1356,22 +1356,9 @@ define([ var arr = [], offset, len; message = Common.Utils.String.htmlEncode(message); - message.replace(Common.Utils.emailStrongRe, function(subStr) { - var ref = (! /((^mailto:)\/\/)/i.test(subStr) ) ? ('mailto:' + subStr) : subStr; - offset = arguments[arguments.length-2]; - arr.push({start: offset, end: subStr.length+offset, str: '' + subStr + ''}); - return ''; - }); - message.replace(Common.Utils.ipStrongRe, function(subStr) { offset = arguments[arguments.length-2]; - len = subStr.length; - var elem = _.find(arr, function(item){ - return ( (offset>=item.start) && (offsetitem.start)); - }); - if (!elem) - arr.push({start: offset, end: len+offset, str: '' + subStr + ''}); + arr.push({start: offset, end: subStr.length+offset, str: '' + subStr + ''}); return ''; }); @@ -1388,6 +1375,20 @@ define([ arr.push({start: offset, end: len+offset, str: '' + subStr + ''}); return ''; }); + + message.replace(Common.Utils.emailStrongRe, function(subStr) { + var ref = (! /((^mailto:)\/\/)/i.test(subStr) ) ? ('mailto:' + subStr) : subStr; + offset = arguments[arguments.length-2]; + len = subStr.length; + var elem = _.find(arr, function(item){ + return ( (offset>=item.start) && (offsetitem.start)); + }); + if (!elem) + arr.push({start: offset, end: len+offset, str: '' + subStr + ''}); + return ''; + }); + arr = _.sortBy(arr, function(item){ return item.start; }); var str_res = (arr.length>0) ? ( message.substring(0, arr[0].start) + arr[0].str) : message; From be7c3de41d35267023456d9e55ba528b03c8f2d5 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 9 Aug 2016 12:25:34 +0300 Subject: [PATCH 21/23] Limited size of warning window (use autosize or maximum width). --- apps/common/main/lib/component/Window.js | 4 ++++ apps/documenteditor/main/app/controller/Main.js | 2 +- apps/presentationeditor/main/app/controller/Main.js | 2 +- apps/spreadsheeteditor/main/app/controller/Main.js | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index 9cbe07b56..68c6cf7a4 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -434,6 +434,10 @@ define([ if (!options.dontshow) body.css('padding-bottom', '10px'); + if (options.maxwidth && options.width=='auto') { + if ((text.position().left + text.width() + parseInt(text_cnt.css('padding-right'))) > options.maxwidth) + options.width = options.maxwidth; + } if (options.width=='auto') { text_cnt.height(Math.max(text.height() + ((check.length>0) ? (check.height() + parseInt(check.css('margin-top'))) : 0), icon.height())); body.height(parseInt(text_cnt.css('height')) + parseInt(footer.css('height'))); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index a4a00d088..fa305a188 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -313,7 +313,7 @@ define([ if (!old_rights) Common.UI.warning({ title: this.notcriticalErrorTitle, - width: _.isEmpty(data.message) ? 'auto' : 350, + maxwidth: 600, msg : _.isEmpty(data.message) ? this.warnProcessRightsChange : data.message, callback: function(){ me._state.lostEditingRights = false; diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 1b7dd409e..693cac443 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -294,7 +294,7 @@ define([ if (!old_rights) Common.UI.warning({ title: this.notcriticalErrorTitle, - width: _.isEmpty(data.message) ? 'auto' : 350, + maxwidth: 600, msg : _.isEmpty(data.message) ? this.warnProcessRightsChange : data.message, callback: function(){ me._state.lostEditingRights = false; diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index a328e09c2..b839d47e6 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -325,7 +325,7 @@ define([ if (!old_rights) Common.UI.warning({ title: this.notcriticalErrorTitle, - width: _.isEmpty(data.message) ? 'auto' : 350, + maxwidth: 600, msg : _.isEmpty(data.message) ? this.warnProcessRightsChange : data.message, callback: function(){ me._state.lostEditingRights = false; From 9f20d9d4d493822e01ffce31baae5037943362c5 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 10 Aug 2016 12:33:08 +0300 Subject: [PATCH 22/23] [DE][SSE] Open protected files. --- apps/common/main/lib/view/OpenDialog.js | 41 ++++++++++++++++--- .../main/app/controller/Main.js | 23 ++++++++--- apps/documenteditor/main/locale/en.json | 2 + .../main/app/controller/Main.js | 21 +++++++--- apps/spreadsheeteditor/main/locale/en.json | 2 + 5 files changed, 73 insertions(+), 16 deletions(-) diff --git a/apps/common/main/lib/view/OpenDialog.js b/apps/common/main/lib/view/OpenDialog.js index 852ffbfd7..e3f929b3a 100644 --- a/apps/common/main/lib/view/OpenDialog.js +++ b/apps/common/main/lib/view/OpenDialog.js @@ -61,18 +61,24 @@ define([ header : true, cls : 'open-dlg', contentTemplate : '', - title : t.txtTitle.replace('%1', (options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 'CSV' : 'TXT') + title : (options.type == Asc.c_oAscAdvancedOptionsID.DRM) ? t.txtTitleProtected : t.txtTitle.replace('%1', (options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 'CSV' : 'TXT') + }, options); this.template = options.template || [ '
', '
', + '<% if (type == Asc.c_oAscAdvancedOptionsID.DRM) { %>', + '', + '
', + '<% } else { %>', '', '
', '<% if (type == Asc.c_oAscAdvancedOptionsID.CSV) { %>', '', '
', '<% } %>', + '<% } %>', '
', '
', @@ -97,13 +103,36 @@ define([ if (this.$window) { this.$window.find('.tool').hide(); this.$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); - this.initCodePages(); + if (this.type == Asc.c_oAscAdvancedOptionsID.DRM) { + var me = this; + me.inputPwd = new Common.UI.InputField({ + el: $('#id-password-txt'), + type: 'password', + allowBlank: false, + validateOnBlur: false + }); + } else + this.initCodePages(); } }, + show: function() { + Common.UI.Window.prototype.show.apply(this, arguments); + + if (this.type == Asc.c_oAscAdvancedOptionsID.DRM) { + var me = this; + setTimeout(function(){ + me.inputPwd.cmpEl.find('input').focus(); + }, 500); + } + }, + onBtnClick: function (event) { - if (this.handler && this.cmbEncoding) { - this.handler.call(this, this.cmbEncoding.getValue(), this.cmbDelimiter ? this.cmbDelimiter.getValue() : null); + if (this.handler) { + if (this.cmbEncoding) + this.handler.call(this, this.cmbEncoding.getValue(), this.cmbDelimiter ? this.cmbDelimiter.getValue() : null); + else + this.handler.call(this, this.inputPwd.getValue()); } this.close(); @@ -311,7 +340,9 @@ define([ txtEncoding : "Encoding ", txtSpace : "Space", txtTab : "Tab", - txtTitle : "Choose %1 options" + txtTitle : "Choose %1 options", + txtPassword : "Password", + txtTitleProtected : "Protected File" }, Common.Views.OpenDialog || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index fa305a188..0a65e779f 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1592,14 +1592,14 @@ define([ }, onAdvancedOptions: function(advOptions) { - var type = advOptions.asc_getOptionId(); + var type = advOptions.asc_getOptionId(), + me = this, dlg; if (type == Asc.c_oAscAdvancedOptionsID.TXT) { - var me = this; - var dlg = new Common.Views.OpenDialog({ + dlg = new Common.Views.OpenDialog({ type: type, codepages: advOptions.asc_getOptions().asc_getCodePages(), settings: advOptions.asc_getOptions().asc_getRecommendedSettings(), - handler: function (encoding, delimiter) { + handler: function (encoding) { me.isShowOpenDialog = false; if (me && me.api) { me.api.asc_setAdvancedOptions(type, new Asc.asc_CTXTAdvancedOptions(encoding)); @@ -1607,11 +1607,22 @@ define([ } } }); - + } else if (type == Asc.c_oAscAdvancedOptionsID.DRM) { + dlg = new Common.Views.OpenDialog({ + type: type, + handler: function (value) { + me.isShowOpenDialog = false; + if (me && me.api) { + me.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(value)); + me.loadMask && me.loadMask.show(); + } + } + }); + } + if (dlg) { this.isShowOpenDialog = true; this.loadMask && this.loadMask.hide(); this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument); - dlg.show(); } }, diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index bd592f97f..e5c2b84d3 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -159,6 +159,8 @@ "Common.Views.OpenDialog.okButtonText": "OK", "Common.Views.OpenDialog.txtEncoding": "Encoding ", "Common.Views.OpenDialog.txtTitle": "Choose %1 options", + "Common.Views.OpenDialog.txtPassword": "Password", + "Common.Views.OpenDialog.txtTitleProtected": "Protected File", "Common.Views.Plugins.strPlugins": "Add-ons", "Common.Views.Plugins.textLoading": "Loading", "Common.Views.Plugins.textStart": "Start", diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index b839d47e6..073d6f438 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1304,10 +1304,10 @@ define([ }, onAdvancedOptions: function(advOptions) { - var type = advOptions.asc_getOptionId(); + var type = advOptions.asc_getOptionId(), + me = this, dlg; if (type == Asc.c_oAscAdvancedOptionsID.CSV) { - var me = this; - var dlg = new Common.Views.OpenDialog({ + dlg = new Common.Views.OpenDialog({ type: type, codepages: advOptions.asc_getOptions().asc_getCodePages(), settings: advOptions.asc_getOptions().asc_getRecommendedSettings(), @@ -1319,11 +1319,22 @@ define([ } } }); - + } else if (type == Asc.c_oAscAdvancedOptionsID.DRM) { + dlg = new Common.Views.OpenDialog({ + type: type, + handler: function (value) { + me.isShowOpenDialog = false; + if (me && me.api) { + me.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(value)); + me.loadMask && me.loadMask.show(); + } + } + }); + } + if (dlg) { this.isShowOpenDialog = true; this.loadMask && this.loadMask.hide(); this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument); - dlg.show(); } }, diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 952fa33b1..5aefcc037 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -86,6 +86,8 @@ "Common.Views.OpenDialog.txtSpace": "Space", "Common.Views.OpenDialog.txtTab": "Tab", "Common.Views.OpenDialog.txtTitle": "Choose %1 options", + "Common.Views.OpenDialog.txtPassword": "Password", + "Common.Views.OpenDialog.txtTitleProtected": "Protected File", "Common.Views.Plugins.strPlugins": "Add-ons", "Common.Views.Plugins.textLoading": "Loading", "Common.Views.Plugins.textStart": "Start", From bfd12d15a1886b097ce533d0e0c361b9a79bcc7b Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 11 Aug 2016 12:22:58 +0300 Subject: [PATCH 23/23] [PE] Fix Bug 32928. --- apps/common/main/lib/component/DataView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/main/lib/component/DataView.js b/apps/common/main/lib/component/DataView.js index 091a49fe7..5d1f5824e 100644 --- a/apps/common/main/lib/component/DataView.js +++ b/apps/common/main/lib/component/DataView.js @@ -536,7 +536,7 @@ define([ var innerEl = $(this.el).find('.inner'), inner_top = innerEl.offset().top, idx = _.indexOf(this.store.models, record), - div = (idx>=0) ? $(this.dataViewItems[idx].el) : innerEl.find('#' + record.get('id')); + div = (idx>=0 && this.dataViewItems.length>0) ? $(this.dataViewItems[idx].el) : innerEl.find('#' + record.get('id')); if (div.length<=0) return; var div_top = div.offset().top;