diff --git a/apps/common/main/lib/view/SymbolTableDialog.js b/apps/common/main/lib/view/SymbolTableDialog.js index 8b0e97407..f95f03d1e 100644 --- a/apps/common/main/lib/view/SymbolTableDialog.js +++ b/apps/common/main/lib/view/SymbolTableDialog.js @@ -800,13 +800,16 @@ define([ }, getPasteSymbol: function(cellId) { - var bUpdateRecents = cellId[0] === 'c'; + var bUpdateRecents = false; var sFont; - if(bUpdateRecents){ - sFont = aFontSelects[nCurrentFont].displayValue; - } else { - var nFontId = parseInt(cellId.split('_')[2]); - sFont = aFontSelects[nFontId].displayValue; + if (cellId && cellId.length>0) { + bUpdateRecents = (cellId[0] === 'c'); + if(bUpdateRecents){ + sFont = aFontSelects[nCurrentFont].displayValue; + } else { + var nFontId = parseInt(cellId.split('_')[2]); + sFont = aFontSelects[nFontId].displayValue; + } } return {font: sFont, symbol: this.encodeSurrogateChar(nCurrentSymbol), code: nCurrentSymbol, updateRecents: bUpdateRecents}; }, @@ -831,7 +834,7 @@ define([ } var special = this.btnSpecial.isActive(); - var settings = special ? this.getSpecialSymbol() : this.getPasteSymbol(this.$window.find('.cell-selected').attr('id')); + var settings = (state=='ok') ? (special ? this.getSpecialSymbol() : this.getPasteSymbol(this.$window.find('.cell-selected').attr('id'))) : {}; if (this.options.handler) { this.options.handler.call(this, this, state, settings); } diff --git a/apps/documenteditor/main/app/controller/RightMenu.js b/apps/documenteditor/main/app/controller/RightMenu.js index 4b9fb3b64..1207e25d3 100644 --- a/apps/documenteditor/main/app/controller/RightMenu.js +++ b/apps/documenteditor/main/app/controller/RightMenu.js @@ -60,6 +60,8 @@ define([ 'rightmenuclick': this.onRightMenuClick } }); + + Common.Utils.InternalSettings.set("de-rightpanel-active-form", 1); }, onLaunch: function() { @@ -95,8 +97,29 @@ define([ this.editMode = mode.isEdit; }, - onRightMenuClick: function(menu, type, minimized) { + onRightMenuClick: function(menu, type, minimized, event) { if (!minimized && this.editMode) { + if (event) { // user click event + if (!this._settings[Common.Utils.documentSettingsType.Form].hidden) { + if (type == Common.Utils.documentSettingsType.Form) { + if (!this._settings[Common.Utils.documentSettingsType.Paragraph].hidden) + Common.Utils.InternalSettings.set("de-rightpanel-active-para", 0); + if (!this._settings[Common.Utils.documentSettingsType.Image].hidden) + Common.Utils.InternalSettings.set("de-rightpanel-active-image", 0); + if (!this._settings[Common.Utils.documentSettingsType.Shape].hidden) + Common.Utils.InternalSettings.set("de-rightpanel-active-shape", 0); + } else if (type == Common.Utils.documentSettingsType.Paragraph) { + Common.Utils.InternalSettings.set("de-rightpanel-active-para", 2); + } else if (type == Common.Utils.documentSettingsType.Image) { + Common.Utils.InternalSettings.set("de-rightpanel-active-image", 2); + Common.Utils.InternalSettings.set("de-rightpanel-active-shape", 0); + } else if (type == Common.Utils.documentSettingsType.Shape) { + Common.Utils.InternalSettings.set("de-rightpanel-active-shape", 2); + Common.Utils.InternalSettings.set("de-rightpanel-active-image", 0); + } + } + } + var panel = this._settings[type].panel; var props = this._settings[type].props; if (props && panel) @@ -223,6 +246,26 @@ define([ if (!this.rightmenu.minimizedMode || open) { var active; + if (priorityactive<0 && !this._settings[Common.Utils.documentSettingsType.Form].hidden && + (!this._settings[Common.Utils.documentSettingsType.Paragraph].hidden || !this._settings[Common.Utils.documentSettingsType.Image].hidden + || !this._settings[Common.Utils.documentSettingsType.Shape].hidden)) { + var imageactive = Common.Utils.InternalSettings.get("de-rightpanel-active-image") || 0, + shapeactive = Common.Utils.InternalSettings.get("de-rightpanel-active-shape") || 0, + paraactive = Common.Utils.InternalSettings.get("de-rightpanel-active-para") || 0, + formactive = Common.Utils.InternalSettings.get("de-rightpanel-active-form") || 0; + + if (!this._settings[Common.Utils.documentSettingsType.Paragraph].hidden) { + priorityactive = (formactive>paraactive) ? Common.Utils.documentSettingsType.Form : Common.Utils.documentSettingsType.Paragraph; + } else if (!this._settings[Common.Utils.documentSettingsType.Paragraph].Image || !this._settings[Common.Utils.documentSettingsType.Shape].hidden) { + if (formactive>shapeactive && formactive>imageactive) + priorityactive = Common.Utils.documentSettingsType.Form; + else if (shapeactive>formactive && shapeactive>imageactive) + priorityactive = Common.Utils.documentSettingsType.Shape; + else + priorityactive = Common.Utils.documentSettingsType.Image; + } + } + if (priorityactive>-1) active = priorityactive; else if (lastactive>=0 && currentactive<0) active = lastactive; else if (currentactive>=0) active = currentactive; diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index d5f4d17e2..fa9a5baa5 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -1897,7 +1897,7 @@ define([ })).show(); } else { - this.api.asc_RemoveContentControl(id); + this.api.asc_RemoveContentControlWrapper(id); Common.component.Analytics.trackEvent('ToolBar', 'Remove Content Control'); } } diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js index b19a433ae..56ffe81e1 100644 --- a/apps/documenteditor/main/app/view/DocumentHolder.js +++ b/apps/documenteditor/main/app/view/DocumentHolder.js @@ -1880,7 +1880,7 @@ define([ } })).show(); } else if (item.value == 'remove') { - this.api.asc_RemoveContentControl(props.get_InternalId()); + props.get_FormPr() ? this.api.asc_RemoveContentControl(props.get_InternalId()) : this.api.asc_RemoveContentControlWrapper(props.get_InternalId()); } } me.fireEvent('editcomplete', me); diff --git a/apps/documenteditor/main/app/view/RightMenu.js b/apps/documenteditor/main/app/view/RightMenu.js index 778dbc362..dfadc2c5c 100644 --- a/apps/documenteditor/main/app/view/RightMenu.js +++ b/apps/documenteditor/main/app/view/RightMenu.js @@ -293,7 +293,7 @@ define([ Common.localStorage.setItem("de-hide-right-settings", 1); } - this.fireEvent('rightmenuclick', [this, btn.options.asctype, this.minimizedMode]); + this.fireEvent('rightmenuclick', [this, btn.options.asctype, this.minimizedMode, e]); }, SetActivePane: function(type, open) { diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-wrap.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-wrap.png index 02bfe83c1..cd8f0e826 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-wrap.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-wrap.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-wrap.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-wrap.png index 4bc88d479..a4b3a7a5b 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-wrap.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-wrap.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-wrap.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-wrap.png index 2fe75c8e0..627e5155f 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-wrap.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-wrap.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-wrap.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-wrap.png index 619847137..6175162e6 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-wrap.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-wrap.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-wrap.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-wrap.png index beb0d9723..a23181bb0 100644 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-wrap.png and b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-wrap.png differ