diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 542fb2816..10b6c9fc0 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -48,7 +48,8 @@ comment: // default = edit, modifyFilter: // default = true modifyContentControl: // default = true - fillForms: // default = edit || review + fillForms: // default = edit || review, + copy: // default = true } }, editorConfig: { diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index 9405cc200..6e3249300 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -152,6 +152,7 @@ define([ alias: 'Window', cls: '', toolclose: 'close', + help: false, maxwidth: undefined, maxheight: undefined, minwidth: 0, @@ -162,9 +163,14 @@ define([ var template = '
<%= cls?" "+cls:"" %>" id="<%= id %>" style="width:<%= width %>px;">' + '<% if (header==true) { %>' + '
' + + '
' + '<% if (closable!==false) %>' + '
' + '<% %>' + + '<% if (help===true) %>' + + '
?
' + + '<% %>' + + '
' + '
<%= title %>
' + '
' + '<% } %>' + @@ -284,7 +290,7 @@ define([ /* window drag's functions */ function _dragstart(event) { - if ( $(event.target).hasClass('close') ) return; + if ( $(event.target).hasClass('close') || $(event.target).hasClass('help') ) return; Common.UI.Menu.Manager.hideAll(); var zoom = (event instanceof jQuery.Event) ? Common.Utils.zoom() : 1; this.dragging.enabled = true; @@ -635,8 +641,13 @@ define([ else (this.initConfig.toolclose=='hide') ? this.hide() : this.close(); }; + var dohelp = function() { + if ( this.$window.find('.tool.help').hasClass('disabled') ) return; + this.fireEvent('help',this); + }; this.$window.find('.header').on('mousedown', this.binding.dragStart); this.$window.find('.tool.close').on('click', _.bind(doclose, this)); + this.$window.find('.tool.help').on('click', _.bind(dohelp, this)); if (!this.initConfig.modal) Common.Gateway.on('processmouse', _.bind(_onProcessMouse, this)); @@ -951,6 +962,13 @@ define([ this.$window.find('.resize-border').remove(); } this.resizable = resizable; + } else { + if (resizable) { + (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]); + } } }, diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index 8bf8ff38a..b305b8649 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -225,6 +225,7 @@ define([ variation.set_Size(itemVar.get('size')); variation.set_InitOnSelectionChanged(itemVar.get('initOnSelectionChanged')); variation.set_Events(itemVar.get('events')); + variation.set_Help(itemVar.get('help')); variationsArr.push(variation); }); @@ -380,6 +381,7 @@ define([ }); } + var help = variation.get_Help(); me.pluginDlg = new Common.Views.PluginDlg({ cls: isCustomWindow ? 'plain' : '', header: !isCustomWindow, @@ -389,7 +391,8 @@ define([ url: url, frameId : frameId, buttons: isCustomWindow ? undefined : newBtns, - toolcallback: _.bind(this.onToolClose, this) + toolcallback: _.bind(this.onToolClose, this), + help: !!help }); me.pluginDlg.on({ 'render:after': function(obj){ @@ -404,6 +407,9 @@ define([ }, 'resize': function(args){ me.api.asc_pluginEnableMouseEvents(args[1]=='start'); + }, + 'help': function(){ + help && window.open(help, '_blank'); } }); @@ -535,7 +541,8 @@ define([ url: itemVar.url, icons: itemVar.icons, buttons: itemVar.buttons, - visible: visible + visible: visible, + help: itemVar.help }); variationsArr.push(model); diff --git a/apps/common/main/resources/less/buttons.less b/apps/common/main/resources/less/buttons.less index a0e6c8a3f..8e3386b15 100644 --- a/apps/common/main/resources/less/buttons.less +++ b/apps/common/main/resources/less/buttons.less @@ -309,7 +309,7 @@ &:not(.icon-top) .caption:not(:empty) { - padding: 0 2px; + padding: 0 5px; } .icon { diff --git a/apps/common/main/resources/less/window.less b/apps/common/main/resources/less/window.less index afb367b6a..5a47e07ca 100644 --- a/apps/common/main/resources/less/window.less +++ b/apps/common/main/resources/less/window.less @@ -59,6 +59,12 @@ cursor: move; + .tools { + position: absolute; + right: 0; + padding-right: 6px; + } + .tool { float: right; width: 16px; @@ -80,6 +86,25 @@ cursor: default; } } + + &.help { + width: 20px; + margin-right:0; + line-height: 14px; + font-size: 14px; + font-weight: bold; + color: #444; + opacity: 0.7; + + &:hover { + opacity: 1; + } + + &.disabled { + opacity: 0.3; + cursor: default; + } + } } &.resizing { diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 856454690..a75270b3a 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -2376,7 +2376,7 @@ define([ toolbar.lockToolbar(SSE.enumLock.multiselect, this._state.multiselect, { array: [toolbar.btnTableTemplate, toolbar.btnInsertHyperlink, toolbar.btnInsertTable]}); this._state.inpivot = !!info.asc_getPivotTableInfo(); - toolbar.lockToolbar(SSE.enumLock.editPivot, this._state.inpivot, { array: toolbar.btnsSetAutofilter.concat(toolbar.btnsClearAutofilter, toolbar.btnsSortDown, toolbar.btnsSortUp, toolbar.btnCustomSort, + toolbar.lockToolbar(SSE.enumLock.editPivot, this._state.inpivot, { array: toolbar.btnsSetAutofilter.concat(toolbar.btnCustomSort, toolbar.btnMerge, toolbar.btnInsertHyperlink, toolbar.btnInsertTable, toolbar.btnRemoveDuplicates)}); toolbar.lockToolbar(SSE.enumLock.noSlicerSource, !(this._state.inpivot || formatTableInfo), { array: [toolbar.btnInsertSlicer]}); diff --git a/apps/spreadsheeteditor/main/app/template/ChartSettingsDlg.template b/apps/spreadsheeteditor/main/app/template/ChartSettingsDlg.template index afad9d985..f73333cf4 100644 --- a/apps/spreadsheeteditor/main/app/template/ChartSettingsDlg.template +++ b/apps/spreadsheeteditor/main/app/template/ChartSettingsDlg.template @@ -9,27 +9,27 @@
-
-
- - - - - - - - - - -
- -
-
-
- -
-
-
+ + + + + + + + + + + + + + + + + + + + +
diff --git a/apps/spreadsheeteditor/main/app/template/RightMenu.template b/apps/spreadsheeteditor/main/app/template/RightMenu.template index bcba6cfa2..1a6b96c13 100644 --- a/apps/spreadsheeteditor/main/app/template/RightMenu.template +++ b/apps/spreadsheeteditor/main/app/template/RightMenu.template @@ -30,7 +30,7 @@ - +
diff --git a/apps/spreadsheeteditor/main/app/template/TableSettings.template b/apps/spreadsheeteditor/main/app/template/TableSettings.template index 78e589aa3..47f03cc6d 100644 --- a/apps/spreadsheeteditor/main/app/template/TableSettings.template +++ b/apps/spreadsheeteditor/main/app/template/TableSettings.template @@ -75,22 +75,34 @@ - +
+ + + + + + + + + diff --git a/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js b/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js index 4cf0401c3..d6726cf2d 100644 --- a/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js @@ -83,7 +83,7 @@ define([ '', '', '
', - '', - '' @@ -567,6 +1038,11 @@ define([ }); this.miSortHigh2Low.on('click', _.bind(this.onSortType, this, Asc.c_oAscSortOptions.Descending)); + this.miSortOptions = new Common.UI.MenuItem({ + caption : this.txtSortOption + }); + this.miSortOptions.on('click', _.bind(this.onSortOptions, this)); + this.miSortCellColor = new Common.UI.MenuItem({ caption : this.txtSortCellColor, toggleGroup : 'menufiltersort', @@ -685,19 +1161,75 @@ define([ }); this.miReapply.on('click', _.bind(this.onReapply, this)); + this.miReapplySeparator = new Common.UI.MenuItem({ caption: '--' }); + + // pivot + this.miValueFilter = new Common.UI.MenuItem({ + caption : this.txtValueFilter, + toggleGroup : 'menufilterfilter', + checkable : true, + checked : false, + menu : new Common.UI.Menu({ + menuAlign: 'tl-tr', + items: [ + {value: Asc.c_oAscCustomAutoFilter.equals, caption: this.txtEquals, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'value'}, + {value: Asc.c_oAscCustomAutoFilter.doesNotEqual, caption: this.txtNotEquals, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'value'}, + {value: Asc.c_oAscCustomAutoFilter.isGreaterThan, caption: this.txtGreater, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'value'}, + {value: Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo, caption: this.txtGreaterEquals,checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'value'}, + {value: Asc.c_oAscCustomAutoFilter.isLessThan, caption: this.txtLess, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'value'}, + {value: Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo, caption: this.txtLessEquals, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'value'}, + {value: -2, caption: this.txtBetween, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'value'}, + {value: -3, caption: this.txtNotBetween, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'value'}, + {value: Asc.c_oAscCustomAutoFilter.top10, caption: this.txtTop10, checkable: true, type: Asc.c_oAscAutoFilterTypes.Top10, pivottype: 'value'} + ] + }) + }); + this.miValueFilter.menu.on('item:click', _.bind(this.onValueFilterMenuClick, this)); + + this.miLabelFilter = new Common.UI.MenuItem({ + caption : this.txtLabelFilter, + toggleGroup : 'menufilterfilter', + checkable : true, + checked : false, + menu : new Common.UI.Menu({ + menuAlign: 'tl-tr', + items: [ + {value: Asc.c_oAscCustomAutoFilter.equals, caption: this.txtEquals, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'label'}, + {value: Asc.c_oAscCustomAutoFilter.doesNotEqual, caption: this.txtNotEquals, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'label'}, + {value: Asc.c_oAscCustomAutoFilter.beginsWith, caption: this.txtBegins, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'label'}, + {value: Asc.c_oAscCustomAutoFilter.doesNotBeginWith, caption: this.txtNotBegins, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'label'}, + {value: Asc.c_oAscCustomAutoFilter.endsWith, caption: this.txtEnds, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'label'}, + {value: Asc.c_oAscCustomAutoFilter.doesNotEndWith, caption: this.txtNotEnds, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'label'}, + {value: Asc.c_oAscCustomAutoFilter.contains, caption: this.txtContains, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'label'}, + {value: Asc.c_oAscCustomAutoFilter.doesNotContain, caption: this.txtNotContains, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'label'}, + {caption: '--'}, + {value: Asc.c_oAscCustomAutoFilter.isGreaterThan, caption: this.txtGreater, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'label'}, + {value: Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo, caption: this.txtGreaterEquals,checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'label'}, + {value: Asc.c_oAscCustomAutoFilter.isLessThan, caption: this.txtLess, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'label'}, + {value: Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo, caption: this.txtLessEquals, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'label'}, + {value: -2, caption: this.txtBetween, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'label'}, + {value: -3, caption: this.txtNotBetween, checkable: true, type: Asc.c_oAscAutoFilterTypes.CustomFilters, pivottype: 'label'} + ] + }) + }); + this.miLabelFilter.menu.on('item:click', _.bind(this.onLabelFilterMenuClick, this)); + this.filtersMenu = new Common.UI.Menu({ items: [ this.miSortLow2High, this.miSortHigh2Low, + this.miSortOptions, this.miSortCellColor, this.miSortFontColor, {caption : '--'}, + this.miLabelFilter, + this.miValueFilter, this.miNumFilter, this.miTextFilter, this.miFilterCellColor, this.miFilterFontColor, this.miClear, - {caption : '--'}, + this.miReapplySeparator, this.miReapply ] }); @@ -847,6 +1379,19 @@ define([ this.close(); }, + onSortOptions: function () { + var me = this, + dlgSort = new SSE.Views.SortFilterDialog({api:this.api}).on({ + 'close': function() { + me.close(); + } + }); + this.close(); + + dlgSort.setSettings(this.configTo); + dlgSort.show(); + }, + onNumCustomFilterItemClick: function(item) { var filterObj = this.configTo.asc_getFilterObj(), value1 = '', value2 = '', @@ -866,10 +1411,10 @@ define([ if (item.value!==-1) { var newCustomFilter = new Asc.CustomFilters(); - newCustomFilter.asc_setCustomFilters((item.value == -2) ? [new Asc.CustomFilter(), new Asc.CustomFilter()]: [new Asc.CustomFilter()]); + newCustomFilter.asc_setCustomFilters((item.value == -2 || item.value == -3) ? [new Asc.CustomFilter(), new Asc.CustomFilter()]: [new Asc.CustomFilter()]); var newCustomFilters = newCustomFilter.asc_getCustomFilters(); - newCustomFilters[0].asc_setOperator((item.value == -2) ? Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo : item.value); + newCustomFilters[0].asc_setOperator((item.value == -2) ? Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo : ((item.value == -3) ? Asc.c_oAscCustomAutoFilter.isLessThan : item.value)); if (item.value == -2) { var isBetween = (cond1 == Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo && cond2 == Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo); @@ -877,6 +1422,12 @@ define([ newCustomFilters[0].asc_setVal(isBetween ? value1 : ''); newCustomFilters[1].asc_setOperator(Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo); newCustomFilters[1].asc_setVal(isBetween ? value2 : ''); + } else if (item.value == -3) { + var isNotBetween = (cond1 == Asc.c_oAscCustomAutoFilter.isLessThan && cond2 == Asc.c_oAscCustomAutoFilter.isGreaterThan); + newCustomFilter.asc_setAnd(isNotBetween ? isAnd : false); + newCustomFilters[0].asc_setVal(isNotBetween ? value1 : ''); + newCustomFilters[1].asc_setOperator(Asc.c_oAscCustomAutoFilter.isGreaterThan); + newCustomFilters[1].asc_setVal(isNotBetween ? value2 : ''); } else { newCustomFilter.asc_setAnd(true); newCustomFilters[0].asc_setVal((item.value == cond1) ? value1 : ''); @@ -887,6 +1438,14 @@ define([ } var me = this, + dlgDigitalFilter; + if (item.options.pivottype == 'label' || item.options.pivottype == 'value') + dlgDigitalFilter = new SSE.Views.PivotDigitalFilterDialog({api:this.api, type: item.options.pivottype}).on({ + 'close': function() { + me.close(); + } + }); + else dlgDigitalFilter = new SSE.Views.DigitalFilterDialog({api:this.api, type: 'number'}).on({ 'close': function() { me.close(); @@ -930,12 +1489,19 @@ define([ } var me = this, + dlgDigitalFilter; + if (item.options.pivottype == 'label' || item.options.pivottype == 'value') + dlgDigitalFilter = new SSE.Views.PivotDigitalFilterDialog({api:this.api, type: item.options.pivottype}).on({ + 'close': function() { + me.close(); + } + }); + else dlgDigitalFilter = new SSE.Views.DigitalFilterDialog({api:this.api, type: 'text'}).on({ 'close': function() { me.close(); } }); - this.close(); dlgDigitalFilter.setSettings(this.configTo); @@ -956,9 +1522,9 @@ define([ this.close(); }, - onTop10FilterItemClick: function(menu, item) { + onTop10FilterItemClick: function(item) { var me = this, - dlgTop10Filter = new SSE.Views.Top10FilterDialog({api:this.api}).on({ + dlgTop10Filter = new SSE.Views.Top10FilterDialog({api:this.api, type: item.options.pivottype}).on({ 'close': function() { me.close(); } @@ -969,6 +1535,35 @@ define([ dlgTop10Filter.show(); }, + onLabelFilterMenuClick: function(menu, item) { + if (item.value == Asc.c_oAscCustomAutoFilter.isGreaterThan || item.value == Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo || item.value == Asc.c_oAscCustomAutoFilter.isLessThan || + item.value == Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo || item.value == -2 || item.value == -3) + this.onNumCustomFilterItemClick(item); + else + this.onTextFilterMenuClick(menu, item); + }, + + onValueFilterMenuClick: function(menu, item) { + var me = this; + var pivotObj = this.configTo.asc_getPivotObj(), + fields = pivotObj.asc_getDataFields(); + if (fields.length<2) { + Common.UI.warning({title: this.textWarning, + msg: this.warnFilterError, + callback: function() { + _.delay(function () { + me.close(); + }, 10); + } + }); + } else { + if (item.options.type == Asc.c_oAscAutoFilterTypes.CustomFilters) + this.onNumCustomFilterItemClick(item); + else + this.onTop10FilterItemClick(item); + } + }, + onFilterColorSelect: function(isCellColor, picker, color) { var filterObj = this.configTo.asc_getFilterObj(); if (filterObj.asc_getType() !== Asc.c_oAscAutoFilterTypes.ColorFilter) { @@ -1098,6 +1693,34 @@ define([ _setDefaults: function() { this.initialFilterType = this.configTo.asc_getFilterObj().asc_getType(); + var menuPanel = this.$window.find('.menu-panel'); + this.menuPanelWidth = menuPanel.innerWidth(); + var width = this.getWidth(); + if (Common.Utils.InternalSettings.get('sse-settings-size-filter-window')) { + width = Common.Utils.InternalSettings.get('sse-settings-size-filter-window')[0] + this.menuPanelWidth; + } + + var pivotObj = this.configTo.asc_getPivotObj(), + isPivot = !!pivotObj, + isValueFilter = false; + + this.miValueFilter.setVisible(isPivot); + this.miLabelFilter.setVisible(isPivot); + this.miSortOptions.setVisible(isPivot); + + if (isPivot) { + if (pivotObj.asc_getIsPageFilter()) { + this.setResizable(true, [this.initConfig.minwidth - this.menuPanelWidth, this.initConfig.minheight]); + menuPanel.addClass('hidden'); + width -= this.menuPanelWidth; + this.menuPanelWidth = 0; + } + this.miReapplySeparator.setVisible(false); + this.miReapply.setVisible(false); + + isValueFilter = (pivotObj.asc_getDataFieldIndexFilter()!==0); + } + this.setSize(width, this.getHeight()); var filterObj = this.configTo.asc_getFilterObj(), isCustomFilter = (this.initialFilterType === Asc.c_oAscAutoFilterTypes.CustomFilters), @@ -1111,17 +1734,20 @@ define([ if (sortColor) sortColor = Common.Utils.ThemeColor.getHexColor(sortColor.get_r(), sortColor.get_g(), sortColor.get_b()).toLocaleUpperCase(); - this.miTextFilter.setVisible(isTextFilter); - this.miNumFilter.setVisible(!isTextFilter); + this.miTextFilter.setVisible(!isPivot && isTextFilter); + this.miNumFilter.setVisible(!isPivot && !isTextFilter); this.miTextFilter.setChecked(isCustomFilter && isTextFilter, true); this.miNumFilter.setChecked((isCustomFilter || isDynamicFilter || isTop10) && !isTextFilter, true); + this.miValueFilter.setChecked(isPivot && isValueFilter, true); + this.miLabelFilter.setChecked(isPivot && !isValueFilter && (isCustomFilter || isTop10), true); + this.miSortLow2High.setChecked(sort == Asc.c_oAscSortOptions.Ascending, true); this.miSortHigh2Low.setChecked(sort == Asc.c_oAscSortOptions.Descending, true); var hasColors = (colorsFont && colorsFont.length>0); this.miSortFontColor.setVisible(hasColors); - this.miFilterFontColor.setVisible(hasColors); + this.miFilterFontColor.setVisible(!isPivot && hasColors); if (hasColors) { var colors = []; colorsFont.forEach(function(item, index) { @@ -1141,7 +1767,7 @@ define([ hasColors = (colorsFill && colorsFill.length>0); this.miSortCellColor.setVisible(hasColors); - this.miFilterCellColor.setVisible(hasColors); + this.miFilterCellColor.setVisible(!isPivot && hasColors); if (hasColors) { var colors = []; colorsFill.forEach(function(item, index) { @@ -1165,7 +1791,7 @@ define([ isAnd = (customFilter.asc_getAnd()), cond1 = customFilters[0].asc_getOperator(), cond2 = ((customFilters.length>1) ? (customFilters[1].asc_getOperator() || 0) : 0), - items = (isTextFilter) ? this.miTextFilter.menu.items : this.miNumFilter.menu.items, + items = isPivot ? (isValueFilter ? this.miValueFilter.menu.items : this.miLabelFilter.menu.items) : ((isTextFilter) ? this.miTextFilter.menu.items : this.miNumFilter.menu.items), isCustomConditions = true; if (customFilters.length==1) @@ -1174,7 +1800,7 @@ define([ item.setChecked(checked, true); if (checked) isCustomConditions = false; }); - else if (!isTextFilter && (cond1 == Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo && cond2 == Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo || + else if ((isPivot || !isTextFilter) && (cond1 == Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo && cond2 == Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo || cond1 == Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo && cond2 == Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo)){ items[6].setChecked(true, true); // between filter isCustomConditions = false; @@ -1195,7 +1821,7 @@ define([ } } else if (isDynamicFilter || isTop10) { var dynType = (isDynamicFilter) ? filterObj.asc_getFilter().asc_getType() : null, - items = this.miNumFilter.menu.items; + items = isPivot ? this.miValueFilter.menu.items : this.miNumFilter.menu.items; items.forEach(function(item){ item.setChecked(isDynamicFilter && (item.options.type == Asc.c_oAscAutoFilterTypes.DynamicFilter) && (item.value == dynType) || isTop10 && (item.options.type == Asc.c_oAscAutoFilterTypes.Top10), true); @@ -1360,6 +1986,9 @@ define([ isValid = true; } if (isValid) { + var pivotObj = this.configTo.asc_getPivotObj(); + if (pivotObj && pivotObj.asc_getIsPageFilter()) + pivotObj.asc_setIsMultipleItemSelectionAllowed(true); this.configTo.asc_getFilterObj().asc_setType(Asc.c_oAscAutoFilterTypes.Filters); this.api.asc_applyAutoFilter(this.configTo); } @@ -1394,6 +2023,7 @@ define([ this.$window.find('.combo-values').css({'height': size[1] - 100 + 'px'}); this.curSize.height = size[1]; } + size[0] -= this.menuPanelWidth; Common.Utils.InternalSettings.set('sse-settings-size-filter-window', size); }, @@ -1438,7 +2068,12 @@ define([ txtContains : "Contains...", txtNotContains : "Does not contain...", textSelectAllResults: 'Select All Search Results', - textAddSelection : 'Add current selection to filter' + textAddSelection : 'Add current selection to filter', + txtValueFilter: 'Value filter', + txtLabelFilter: 'Label filter', + warnFilterError: 'You need at least one field in the Values area in order to apply a value filter.', + txtNotBetween: 'Not between...', + txtSortOption: 'More sort options...' }, SSE.Views.AutoFilterDialog || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/view/ChartDataDialog.js b/apps/spreadsheeteditor/main/app/view/ChartDataDialog.js new file mode 100644 index 000000000..496d0007c --- /dev/null +++ b/apps/spreadsheeteditor/main/app/view/ChartDataDialog.js @@ -0,0 +1,565 @@ +/* + * + * (c) Copyright Ascensio System SIA 2010-2020 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +/** + * ChartDataDialog.js + * + * Created by Julia Radzhabova on 06.07.2020 + * Copyright (c) 2020 Ascensio System SIA. All rights reserved. + * + */ + +define([ + 'common/main/lib/util/utils', + 'common/main/lib/component/MetricSpinner', + 'common/main/lib/component/ComboBox', + 'common/main/lib/component/ListView', + 'common/main/lib/view/AdvancedSettingsWindow' +], function () { 'use strict'; + + SSE.Views.ChartDataDialog = Common.Views.AdvancedSettingsWindow.extend(_.extend({ + options: { + contentWidth: 370, + height: 490 + }, + + initialize : function(options) { + var me = this; + + _.extend(this.options, { + title: this.textTitle, + template: [ + '
', + '
', + '
', + '
+
- +
- +
+
+
- +
', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '
', + '', + '
', + '
', + '
', + '', + '
', + '
', + '', + '', + '', + '
', + '
', + '
', + '
', + '
', + '', + '
', + '', + '
', + '
', + '', + '
', + '
', + '', + '', + '
' + ].join('') + }, options); + + this.handler = options.handler; + + Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options); + + this._noApply = true; + this._changedProps = null; + + this.api = this.options.api; + this.chartSettings = this.options.chartSettings; + this.currentChartType = Asc.c_oAscChartTypeSettings.barNormal; + }, + + render: function() { + Common.Views.AdvancedSettingsWindow.prototype.render.call(this); + var me = this; + + this.txtDataRange = new Common.UI.InputFieldBtn({ + el : $('#chart-dlg-txt-range'), + name : 'range', + style : 'width: 100%;', + btnHint : this.textSelectData, + allowBlank : true + // validateOnChange: true + }); + this.txtDataRange.on('button:click', _.bind(this.onSelectData, this)); + this.txtDataRange.on('changed:after', function(input, newValue, oldValue, e) { + if (newValue == oldValue) return; + me.changeChartRange(newValue); + }); + + // Chart data + this.seriesList = new Common.UI.ListView({ + el: $('#chart-dlg-series-list', this.$window), + store: new Common.UI.DataViewStore(), + emptyText: '', + scrollAlwaysVisible: true, + itemTemplate: _.template('
<%= value %>
') + }); + this.seriesList.onKeyDown = _.bind(this.onListKeyDown, this, 'series'); + this.seriesList.on('item:select', _.bind(this.onSelectSeries, this)); + this.seriesList.store.comparator = function(rec) { + return rec.get("order"); + }; + + this.btnAdd = new Common.UI.Button({ + el: $('#chart-dlg-btn-add') + }); + this.btnAdd.on('click', _.bind(this.onAddSeries, this, false)); + + this.btnDelete = new Common.UI.Button({ + el: $('#chart-dlg-btn-delete') + }); + this.btnDelete.on('click', _.bind(this.onDeleteSeries, this)); + + this.btnEdit = new Common.UI.Button({ + el: $('#chart-dlg-btn-edit') + }); + this.btnEdit.on('click', _.bind(this.onEditSeries, this, false)); + + this.btnUp = new Common.UI.Button({ + parentEl: $('#chart-dlg-btn-up'), + cls: 'btn-toolbar', + iconCls: 'caret-up', + hint: this.textUp + }); + this.btnUp.on('click', _.bind(this.onMoveClick, this, true)); + + this.btnDown = new Common.UI.Button({ + parentEl: $('#chart-dlg-btn-down'), + cls: 'btn-toolbar', + iconCls: 'caret-down', + hint: this.textDown + }); + this.btnDown.on('click', _.bind(this.onMoveClick, this, false)); + + this.btnSwitch = new Common.UI.Button({ + el: $('#chart-dlg-btn-switch') + }); + this.btnSwitch.on('click', _.bind(this.onSwitch, this)); + + this.categoryList = new Common.UI.ListView({ + el: $('#chart-dlg-category-list', this.$window), + store: new Common.UI.DataViewStore(), + emptyText: '', + scrollAlwaysVisible: true, + itemTemplate: _.template('
<%= value %>
') + }); + + this.btnEditCategory = new Common.UI.Button({ + el: $('#chart-dlg-btn-category-edit') + }); + this.btnEditCategory.on('click', _.bind(this.onEditCategory, this, false)); + + this.afterRender(); + }, + + afterRender: function() { + this._setDefaults(this.chartSettings); + }, + + show: function() { + Common.Views.AdvancedSettingsWindow.prototype.show.apply(this, arguments); + + var me = this; + _.delay(function(){ + me.txtDataRange.cmpEl.find('input').focus(); + },50); + }, + + close: function () { + this.api.asc_onCloseChartFrame(); + Common.Views.AdvancedSettingsWindow.prototype.close.apply(this, arguments); + }, + + _setDefaults: function (props) { + var me = this; + if (props ){ + this.chartSettings = props; + + this.currentChartType = props.getType(); + + var value = props.getRange(); + this.txtDataRange.setValue((value) ? value : ''); + + this.txtDataRange.validation = function(value) { + return true; + }; + + this.updateSeriesList(props.getSeries(), 0); + this.updateCategoryList(props.getCatValues()); + } + this.updateButtons(); + }, + + getSettings: function () { + return { chartSettings: this.chartSettings}; + }, + + onDlgBtnClick: function(event) { + var state = (typeof(event) == 'object') ? event.currentTarget.attributes['result'].value : event; + if (state == 'ok') { + if (!this.isRangeValid()) return; + this.handler && this.handler.call(this, state, (state == 'ok') ? this.getSettings() : undefined); + } + + this.close(); + }, + + onPrimary: function() { + this.onDlgBtnClick('ok'); + return false; + }, + + isRangeValid: function() { + var isvalid; + isvalid = this.chartSettings.isValidRange(this.txtDataRange.getValue()); + if (isvalid === true || isvalid == Asc.c_oAscError.ID.No) + return true; + + var error = this.textInvalidRange; + switch (isvalid) { + case Asc.c_oAscError.ID.StockChartError: + error = this.errorStockChart; + break; + case Asc.c_oAscError.ID.MaxDataSeriesError: + error = this.errorMaxRows; + break; + case Asc.c_oAscError.ID.MaxDataPointsError: + error = this.errorMaxPoints; + break; + case Asc.c_oAscError.ID.ErrorInFormula: + error = this.errorInFormula; + break; + case Asc.c_oAscError.ID.InvalidReference: + error = this.errorInvalidReference; + break; + case Asc.c_oAscError.ID.NoSingleRowCol: + error = this.errorNoSingleRowCol; + break; + case Asc.c_oAscError.ID.NoValues: + error = this.errorNoValues; + break; + } + Common.UI.warning({msg: error, maxwidth: 600}); + return false; + }, + + changeChartRange: function(settings) { + var me = this; + if (me.isRangeValid(settings)) { + me.txtDataRange.checkValidate(); + me.chartSettings.setRange(settings); + + me.updateSeriesList(me.chartSettings.getSeries(), 0); + me.updateCategoryList(me.chartSettings.getCatValues()); + me.updateButtons(); + } + }, + + onSelectData: function(input) { + var me = this; + if (me.api) { + var handlerDlg = function(dlg, result) { + if (result == 'ok') { + input.setValue(dlg.getSettings()); + _.delay(function(){ + me.changeChartRange(dlg.getSettings()); + },10); + } + }; + + var win = new SSE.Views.CellRangeDialog({ + handler: handlerDlg + }).on('close', function() { + me.show(); + }); + + var xy = me.$window.offset(); + me.hide(); + win.show(xy.left + 160, xy.top + 125); + win.setSettings({ + api : me.api, + range : me.txtDataRange.getValue(), + type : Asc.c_oAscSelectionDialogType.Chart, + validation: function() {return true;} + }); + } + }, + + onListKeyDown: function (type, e, data) { + var record = null, listView = this.seriesList; + + if (listView.disabled) return; + if (_.isUndefined(undefined)) data = e; + + if (data.keyCode==Common.UI.Keys.DELETE && !this.btnDelete.isDisabled()) { + // this.onDeleteSeries(); + } else { + Common.UI.DataView.prototype.onKeyDown.call(listView, e, data); + } + }, + + onSelectSeries: function(lisvView, itemView, record) { + this.updateMoveButtons(); + }, + + updateRange: function() { + this.txtDataRange.setValue(this.chartSettings.getRange() || ''); + }, + + updateButtons: function() { + this.btnEdit.setDisabled(this.seriesList.store.length<1); + this.btnDelete.setDisabled(this.seriesList.store.length<1); + this.btnSwitch.setDisabled(this.seriesList.store.length<1 || !this.chartSettings.getRange()); + this.updateMoveButtons(); + }, + + updateMoveButtons: function() { + var rec = this.seriesList.getSelectedRec(), + index = rec ? this.seriesList.store.indexOf(rec) : -1; + this.btnUp.setDisabled(index<1); + this.btnDown.setDisabled(index<0 || index==this.seriesList.store.length-1); + }, + + onAddSeries: function() { + var rec = (this.seriesList.store.length>0) ? this.seriesList.store.at(this.seriesList.store.length-1) : null, + isScatter = false, + me = this; + rec && (isScatter = rec.get('series').asc_IsScatter()); + me.chartSettings.startEditData(); + var series; + if (isScatter) { + series = me.chartSettings.addScatterSeries(); + } else { + series = me.chartSettings.addSeries(); + } + var handlerDlg = function(dlg, result) { + if (result == 'ok') { + me.updateRange(); + me.updateSeriesList(me.chartSettings.getSeries(), me.seriesList.store.length-1); + me.updateCategoryList(me.chartSettings.getCatValues()); + me.updateButtons(); + me.chartSettings.endEditData(); + me._isEditRanges = false; + } + }; + this.changeDataRange(1, {series: series, isScatter: isScatter}, handlerDlg); + }, + + onDeleteSeries: function() { + var rec = this.seriesList.getSelectedRec(); + if (rec) { + var order = rec.get('order'); + rec.get('series').asc_Remove(); + this.updateRange(); + this.updateSeriesList(this.chartSettings.getSeries(), order); + this.updateCategoryList(this.chartSettings.getCatValues()); + this.updateButtons(); + } + }, + + onEditSeries: function() { + var rec = this.seriesList.getSelectedRec(); + if (rec) { + var series = rec.get('series'), + isScatter = series.asc_IsScatter(), + me = this; + var handlerDlg = function(dlg, result) { + if (result == 'ok') { + rec.set('value', series.asc_getSeriesName()); + me.updateRange(); + me.updateCategoryList(me.chartSettings.getCatValues()); + me.updateButtons(); + me.chartSettings.endEditData(); + me._isEditRanges = false; + } + }; + me.chartSettings.startEditData(); + this.changeDataRange(1, {series: series, isScatter: isScatter }, handlerDlg); + } + }, + + onEditCategory: function() { + var me = this; + var handlerDlg = function(dlg, result) { + if (result == 'ok') { + me.updateCategoryList(me.chartSettings.getCatValues()); + me.updateRange(); + me.updateButtons(); + me.chartSettings.endEditData(); + me._isEditRanges = false; + } + }; + me.chartSettings.startEditData(); + this.changeDataRange(0, {category: this.chartSettings.getCatFormula(), values: this.chartSettings.getCatValues()}, handlerDlg); + }, + + changeDataRange: function(type, props, handlerDlg) { + var me = this; + var win = new SSE.Views.ChartDataRangeDialog({ + type: type, //series + isScatter: !!props.isScatter, + handler: handlerDlg + }).on('close', function() { + me._isEditRanges && me.chartSettings.cancelEditData(); + me._isEditRanges = false; + me.show(); + }); + + me._isEditRanges = true; + var xy = me.$window.offset(); + me.hide(); + win.show(xy.left + 160, xy.top + 125); + win.setSettings({ + api : me.api, + props : props, + chartSettings: me.chartSettings + }); + }, + + onMoveClick: function(up) { + var store = this.seriesList.store, + length = store.length, + rec = this.seriesList.getSelectedRec(); + if (rec) { + var index = store.indexOf(rec), + order = rec.get('order'), + newindex = up ? Math.max(0, index-1) : Math.min(length-1, index+1), + newrec = store.at(newindex), + neworder = newrec.get('order'); + store.add(store.remove(rec), {at: newindex}); + rec.set('order', neworder); + newrec.set('order', order); + up ? rec.get('series').asc_MoveUp() : rec.get('series').asc_MoveDown(); + this.seriesList.selectRecord(rec); + this.seriesList.scrollToRecord(rec); + this.updateRange(); + this.updateCategoryList(this.chartSettings.getCatValues()); + this.updateButtons(); + } + }, + + updateSeriesList: function(series, index) { + this.btnEditCategory.setDisabled(series && series.length>0 ? series[0].asc_IsScatter() : false); + + var arr = []; + var store = this.seriesList.store; + for (var i = 0, len = series.length; i < len; i++) + { + var item = series[i], + rec = new Common.UI.DataViewModel(); + rec.set({ + value: item.asc_getSeriesName(), + index: item.asc_getIdx(), + order: item.asc_getOrder(), + series: item + }); + arr.push(rec); + } + store.reset(arr); + (len>0) && this.seriesList.selectByIndex(Math.min(index || 0, store.length-1)); + }, + + updateCategoryList: function(categories) { + var arr = []; + var store = this.categoryList.store; + for (var i = 0, len = categories.length; i < len; i++) + { + var item = categories[i], + rec = new Common.UI.DataViewModel(); + rec.set({ + value: item + }); + arr.push(rec); + } + store.reset(arr); + (len>0) && this.categoryList.selectByIndex(0); + }, + + onSwitch: function() { + this.chartSettings.switchRowCol(); + this.updateSeriesList(this.chartSettings.getSeries(), 0); + this.updateCategoryList(this.chartSettings.getCatValues()); + this.updateRange(); + this.updateButtons(); + }, + + textTitle: 'Chart Data', + textInvalidRange: 'Invalid cells range', + textSelectData: 'Select data', + errorMaxRows: 'The maximum number of data series per chart is 255.', + errorStockChart: 'Incorrect row order. To build a stock chart place the data on the sheet in the following order:
opening price, max price, min price, closing price.', + errorMaxPoints: 'The maximum number of points in series per chart is 4096.', + textSeries: 'Legend Entries (Series)', + textAdd: 'Add', + textEdit: 'Edit', + textDelete: 'Remove', + textSwitch: 'Switch Row/Column', + textCategory: 'Horizontal (Category) Axis Labels', + textUp: 'Up', + textDown: 'Down', + textData: 'Chart data range', + errorInFormula: "There's an error in formula you entered.", + errorInvalidReference: 'The reference is not valid. Reference must be to an open worksheet.', + errorNoSingleRowCol: 'The reference is not valid. References for titles, values, sizes, or data labels must be a single cell, row, or column.', + errorNoValues: 'To create a chart, the series must contain at least one value.' + +}, SSE.Views.ChartDataDialog || {})) +}); diff --git a/apps/spreadsheeteditor/main/app/view/ChartDataRangeDialog.js b/apps/spreadsheeteditor/main/app/view/ChartDataRangeDialog.js new file mode 100644 index 000000000..8fe5b5db2 --- /dev/null +++ b/apps/spreadsheeteditor/main/app/view/ChartDataRangeDialog.js @@ -0,0 +1,380 @@ +/* + * + * (c) Copyright Ascensio System SIA 2010-2020 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +/** + * ChartDataRangeDialog.js + * + * Created by Julia Radzhabova on 02.07.2020 + * Copyright (c) 2020 Ascensio System SIA. All rights reserved. + * + */ + + +if (Common === undefined) + var Common = {}; + +define([ + 'common/main/lib/component/InputField', + 'common/main/lib/component/Window' +], function () { 'use strict'; + + SSE.Views.ChartDataRangeDialog = Common.UI.Window.extend(_.extend({ + options: { + type: 0, // 0 - category, 1 - series + width : 350, + cls : 'modal-dlg', + buttons: ['ok', 'cancel'] + }, + + initialize : function(options) { + this.type = options.type || 0; + this.isScatter = options.isScatter; + + _.extend(this.options, { + title: this.type==1 ? this.txtTitleSeries : this.txtTitleCategory + }, options); + + this.template = [ + '
', + '', + '', + '', + '', + '', + '', + '', + '', + '<% if (type==1) { %>', + '', + '', + '', + '', + '', + '', + '', + '<% if (isScatter) { %>', + '', + '', + '', + '', + '', + '', + '', + '<% } %>', + '<% } %>', + '
', + '', + '
', + '
', + '
', + '', + '
', + '', + '
', + '
', + '
', + '', + '
', + '', + '
', + '
', + '
', + '', + '
', + '
' + ].join(''); + + this.options.tpl = _.template(this.template)(this.options); + + Common.UI.Window.prototype.initialize.call(this, this.options); + }, + + render: function() { + Common.UI.Window.prototype.render.call(this); + + var $window = this.getChild(), + me = this; + + me.inputRange1 = new Common.UI.InputFieldBtn({ + el: $('#id-dlg-chart-range-range1'), + style: '100%', + textSelectData: 'Select data', + // validateOnChange: true, + validateOnBlur: false + }).on('changed:after', function(input, newValue, oldValue, e) { + if (newValue == oldValue) return; + me.updateRangeData(1, newValue); + }).on('changing', function(input, newValue, oldValue, e) { + if (newValue == oldValue) return; + // me.onInputChanging(input, newValue, oldValue); + }).on('button:click', _.bind(this.onSelectData, this, 1)); + this.lblRange1 = $window.find('#id-dlg-chart-range-lbl1'); + + me.inputRange2 = new Common.UI.InputFieldBtn({ + el: $('#id-dlg-chart-range-range2'), + style: '100%', + textSelectData: 'Select data', + // validateOnChange: true, + validateOnBlur: false + }).on('changed:after', function(input, newValue, oldValue, e) { + if (newValue == oldValue) return; + me.updateRangeData(2, newValue); + }).on('changing', function(input, newValue, oldValue, e) { + if (newValue == oldValue) return; + // me.onInputChanging(input, newValue, oldValue); + }).on('button:click', _.bind(this.onSelectData, this, 2)); + this.lblRange2 = $window.find('#id-dlg-chart-range-lbl2'); + + me.inputRange3 = new Common.UI.InputFieldBtn({ + el: $('#id-dlg-chart-range-range3'), + style: '100%', + textSelectData: 'Select data', + // validateOnChange: true, + validateOnBlur: false + }).on('changed:after', function(input, newValue, oldValue, e) { + if (newValue == oldValue) return; + me.updateRangeData(3, newValue); + }).on('changing', function(input, newValue, oldValue, e) { + if (newValue == oldValue) return; + // me.onInputChanging(input, newValue, oldValue); + }).on('button:click', _.bind(this.onSelectData, this, 3)); + this.lblRange3 = $window.find('#id-dlg-chart-range-lbl3'); + + $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); + + _.defer(function(){ + me.inputRange1.cmpEl.find('input').focus(); + }, 10); + }, + + onPrimary: function() { + this._handleInput('ok'); + return false; + }, + + setSettings: function(settings) { + var me = this; + this.api = settings.api; + this.props = settings.props; + this.chartSettings = settings.chartSettings; + + if (this.type==1) { + if (this.props.series) { + var series = this.props.series; + this.inputRange1.setValue(series.asc_getName()); + this.lblRange1.html((this.inputRange1.getValue()!=='') ? ('= ' + (series.asc_getNameVal() || '')) : this.txtChoose); + if (this.props.isScatter) { + var arr = series.asc_getXValuesArr(); + this.inputRange2.setValue(series.asc_getXValues()); + this.lblRange2.html((this.inputRange2.getValue()!=='') ? ('= ' + (arr ? arr.join('; ') : '')) : this.txtChoose); + + this.inputRange3.setValue(series.asc_getYValues()); + arr = series.asc_getYValuesArr(); + this.lblRange3.html((this.inputRange3.getValue()!=='') ? ('= ' + (arr ? arr.join('; ') : '')) : this.txtChoose); + } else { + var arr = series.asc_getValuesArr(); + this.inputRange2.setValue(series.asc_getValues()); + this.lblRange2.html((this.inputRange2.getValue()!=='') ? ('= ' + (arr ? arr.join('; ') : '')) : this.txtChoose); + } + } + } else { + var arr = this.props.values; + this.inputRange1.setValue(this.props.category || ''); + this.lblRange1.html((this.inputRange1.getValue()!=='') ? ('= ' + (arr ? arr.join('; ') : '')) : this.txtChoose); + } + }, + + getSettings: function () { + return {name: this.inputRange1.getValue(), valuesX: this.inputRange2.getValue(), valuesY: this.inputRange3.getValue()}; + }, + + onSelectData: function(type, input) { + var me = this; + if (me.api) { + var handlerDlg = function(dlg, result) { + if (result == 'ok') { + input.setValue(dlg.getSettings()); + _.delay(function(){ + me.updateRangeData(type, dlg.getSettings()); + },10); + } + }; + + var win = new SSE.Views.CellRangeDialog({ + allowBlank: true, + handler: handlerDlg + }).on('close', function() { + // me.onInputChanging(input); + me.show(); + _.delay(function(){ + me._noApply = true; + input.cmpEl.find('input').focus(); + me._noApply = false; + },1); + }); + + var xy = me.$window.offset(); + me.hide(); + win.show(xy.left + 65, xy.top + 77); + win.setSettings({ + api : me.api, + range : !_.isEmpty(input.getValue()) ? input.getValue() : '', + type : Asc.c_oAscSelectionDialogType.Chart, + validation: function() {return true;} + }); + } + }, + + isRangeValid: function(type, value) { + var isvalid; + switch (type) { + case 1: + if (this.props.series) { + isvalid = this.props.series.asc_IsValidName(value); + } else { + isvalid = this.chartSettings.isValidCatFormula(value); + } + break; + case 2: + if (this.props.isScatter) { + isvalid = this.props.series.asc_IsValidXValues(value); + } else { + isvalid = this.props.series.asc_IsValidValues(value); + } + break; + case 3: + isvalid = this.props.series.asc_IsValidYValues(value); + break; + } + if (isvalid === true || isvalid == Asc.c_oAscError.ID.No) + return true; + + var error = this.textInvalidRange; + switch (isvalid) { + case Asc.c_oAscError.ID.StockChartError: + error = this.errorStockChart; + break; + case Asc.c_oAscError.ID.MaxDataSeriesError: + error = this.errorMaxRows; + break; + case Asc.c_oAscError.ID.MaxDataPointsError: + error = this.errorMaxPoints; + break; + case Asc.c_oAscError.ID.ErrorInFormula: + error = this.errorInFormula; + break; + case Asc.c_oAscError.ID.InvalidReference: + error = this.errorInvalidReference; + break; + case Asc.c_oAscError.ID.NoSingleRowCol: + error = this.errorNoSingleRowCol; + break; + case Asc.c_oAscError.ID.NoValues: + error = this.errorNoValues; + break; + } + Common.UI.warning({msg: error, maxwidth: 600}); + return false; + }, + + updateRangeData: function(type, value) { + if (!this.isRangeValid(type, value)) return; + + if (this.props.series) { + var series = this.props.series; + switch (type) { + case 1: + series.asc_setName(value); + this.lblRange1.html((this.inputRange1.getValue()!=='') ? ('= ' + (series.asc_getNameVal() || '')) : this.txtChoose); + break; + case 2: + if (this.isScatter) { + var arr = series.asc_getXValuesArr(); + series.asc_setXValues(value); + this.lblRange2.html((this.inputRange2.getValue()!=='') ? ('= ' + (arr ? arr.join('; ') : '')) : this.txtChoose); + } else { + var arr = series.asc_getValuesArr(); + series.asc_setValues(value); + this.lblRange2.html((this.inputRange2.getValue()!=='') ? ('= ' + (arr ? arr.join('; ') : '')) : this.txtChoose); + } + break; + case 3: + var arr = series.asc_getYValuesArr(); + series.asc_setYValues(value); + this.lblRange3.html((this.inputRange3.getValue()!=='') ? ('= ' + (arr ? arr.join('; ') : '')) : this.txtChoose); + break; + } + } else { + this.chartSettings.setCatFormula(value); + var arr = this.chartSettings.getCatValues(); + this.lblRange1.html((this.inputRange1.getValue()!=='') ? ('= ' + (arr ? arr.join('; ') : '')) : this.txtChoose); + } + }, + + onBtnClick: function(event) { + this._handleInput(event.currentTarget.attributes['result'].value); + }, + + _handleInput: function(state) { + if (this.options.handler) { + if (state == 'ok') { + if (!this.isRangeValid(1, this.inputRange1.getValue())) return; + if (this.type==1 && !this.isRangeValid(2, this.inputRange2.getValue())) return; + if (this.type==1 && this.isScatter && !this.isRangeValid(3, this.inputRange3.getValue())) return; + } + if (this.options.handler.call(this, this, state)) + return; + } + + this.close(); + }, + + txtTitleSeries: 'Edit Series', + txtTitleCategory: 'Axis Labels', + txtSeriesName: 'Series name', + txtValues: 'Values', + txtXValues: 'X Values', + txtYValues: 'Y Values', + txtAxisLabel: 'Axis label range', + txtChoose: 'Choose range', + textSelectData: 'Select data', + textInvalidRange: 'Invalid cells range', + errorMaxRows: 'The maximum number of data series per chart is 255.', + errorStockChart: 'Incorrect row order. To build a stock chart place the data on the sheet in the following order:
opening price, max price, min price, closing price.', + errorMaxPoints: 'The maximum number of points in series per chart is 4096.', + errorInFormula: "There's an error in formula you entered.", + errorInvalidReference: 'The reference is not valid. Reference must be to an open worksheet.', + errorNoSingleRowCol: 'The reference is not valid. References for titles, values, sizes, or data labels must be a single cell, row, or column.', + errorNoValues: 'To create a chart, the series must contain at least one value.' + + }, SSE.Views.ChartDataRangeDialog || {})) +}); diff --git a/apps/spreadsheeteditor/main/app/view/ChartSettings.js b/apps/spreadsheeteditor/main/app/view/ChartSettings.js index 831622d30..e205fb0de 100644 --- a/apps/spreadsheeteditor/main/app/view/ChartSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ChartSettings.js @@ -46,7 +46,8 @@ define([ 'common/main/lib/component/Button', 'common/main/lib/component/MetricSpinner', 'common/main/lib/component/ComboDataView', - 'spreadsheeteditor/main/app/view/ChartSettingsDlg' + 'spreadsheeteditor/main/app/view/ChartSettingsDlg', + 'spreadsheeteditor/main/app/view/ChartDataDialog' ], function (menuTemplate, $, _, Backbone) { 'use strict'; @@ -851,7 +852,7 @@ define([ } }, - onSelectData: function() { + onSelectData_simple: function() { var me = this; if (me.api) { var props = me.api.asc_getChartObject(), @@ -895,7 +896,34 @@ define([ }); } }, - + + onSelectData: function() { + var me = this; + var props; + if (me.api){ + props = me.api.asc_getChartObject(); + if (props) { + me._isEditRanges = true; + props.startEdit(); + var win = new SSE.Views.ChartDataDialog({ + chartSettings: props, + api: me.api, + handler: function(result, value) { + if (result == 'ok') { + props.endEdit(); + me._isEditRanges = false; + } + Common.NotificationCenter.trigger('edit:complete', me); + } + }).on('close', function() { + me._isEditRanges && props.cancelEdit(); + me._isEditRanges = false; + }); + win.show(); + } + } + }, + onSelectType: function(btn, picker, itemView, record) { if (this._noApply) return; diff --git a/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js b/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js index 4729d53c3..cbd4b42a7 100644 --- a/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js +++ b/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js @@ -42,7 +42,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' 'common/main/lib/view/AdvancedSettingsWindow', 'common/main/lib/component/CheckBox', 'common/main/lib/component/InputField', - 'spreadsheeteditor/main/app/view/CellRangeDialog' + 'spreadsheeteditor/main/app/view/CellRangeDialog', + 'spreadsheeteditor/main/app/view/ChartDataRangeDialog' ], function (contentTemplate) { 'use strict'; @@ -58,7 +59,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' _.extend(this.options, { title: this.textTitle, items: [ - {panelId: 'id-chart-settings-dlg-style', panelCaption: this.textTypeData}, + {panelId: 'id-chart-settings-dlg-style', panelCaption: this.textType}, {panelId: 'id-chart-settings-dlg-layout', panelCaption: this.textLayout}, {panelId: 'id-chart-settings-dlg-vert', panelCaption: this.textVertAxis}, {panelId: 'id-chart-settings-dlg-hor', panelCaption: this.textHorAxis}, @@ -137,26 +138,26 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' this.btnChartType.render($('#chart-dlg-button-type')); this.mnuChartTypePicker.on('item:click', _.bind(this.onSelectType, this, this.btnChartType)); - this.cmbDataDirect = new Common.UI.ComboBox({ - el : $('#chart-dlg-combo-range'), - menuStyle : 'min-width: 120px;', - editable : false, - cls : 'input-group-nr', - data : [ - { value: 0, displayValue: this.textDataRows }, - { value: 1, displayValue: this.textDataColumns } - ] - }); - - this.txtDataRange = new Common.UI.InputFieldBtn({ - el : $('#chart-dlg-txt-range'), - name : 'range', - style : 'width: 100%;', - btnHint : this.textSelectData, - allowBlank : true, - validateOnChange: true - }); - this.txtDataRange.on('button:click', _.bind(this.onSelectData, this)); + // this.cmbDataDirect = new Common.UI.ComboBox({ + // el : $('#chart-dlg-combo-range'), + // menuStyle : 'min-width: 120px;', + // editable : false, + // cls : 'input-group-nr', + // data : [ + // { value: 0, displayValue: this.textDataRows }, + // { value: 1, displayValue: this.textDataColumns } + // ] + // }); + // + // this.txtDataRange = new Common.UI.InputFieldBtn({ + // el : $('#chart-dlg-txt-range'), + // name : 'range', + // style : 'width: 100%;', + // btnHint : this.textSelectData, + // allowBlank : true, + // validateOnChange: true + // }); + // this.txtDataRange.on('button:click', _.bind(this.onSelectData, this)); this.cmbChartTitle = new Common.UI.ComboBox({ el : $('#chart-dlg-combo-chart-title'), @@ -1292,24 +1293,24 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' this._noApply = false; - var value = props.getRange(); - this.txtDataRange.setValue((value) ? value : ''); - this.dataRangeValid = value; - - this.txtDataRange.validation = function(value) { - if (_.isEmpty(value)) { - if (!me.cmbDataDirect.isDisabled()) me.cmbDataDirect.setDisabled(true); - return true; - } - - if (me.cmbDataDirect.isDisabled()) me.cmbDataDirect.setDisabled(false); - - var isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, value, false); - return (isvalid==Asc.c_oAscError.ID.DataRangeError) ? me.textInvalidRange : true; - }; - - this.cmbDataDirect.setDisabled(value===null); - this.cmbDataDirect.setValue(props.getInColumns() ? 1 : 0); + // var value = props.getRange(); + // this.txtDataRange.setValue((value) ? value : ''); + // this.dataRangeValid = value; + // + // this.txtDataRange.validation = function(value) { + // if (_.isEmpty(value)) { + // if (!me.cmbDataDirect.isDisabled()) me.cmbDataDirect.setDisabled(true); + // return true; + // } + // + // if (me.cmbDataDirect.isDisabled()) me.cmbDataDirect.setDisabled(false); + // + // var isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, value, false); + // return (isvalid==Asc.c_oAscError.ID.DataRangeError) ? me.textInvalidRange : true; + // }; + // + // this.cmbDataDirect.setDisabled(value===null); + // this.cmbDataDirect.setValue(props.getInColumns() ? 1 : 0); this.cmbChartTitle.setValue(props.getTitle()); this.cmbLegendPos.setValue(props.getLegendPos()); @@ -1320,7 +1321,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' this.chCategoryName.setValue(this.chartSettings.getShowCatName(), true); this.chValue.setValue(this.chartSettings.getShowVal(), true); - value = props.getSeparator(); + var value = props.getSeparator(); this.txtSeparator.setValue((value) ? value : ''); // Vertical Axis @@ -1422,8 +1423,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' this.chartSettings.putType(type); - this.chartSettings.putInColumns(this.cmbDataDirect.getValue()==1); - this.chartSettings.putRange(this.txtDataRange.getValue()); + // this.chartSettings.putInColumns(this.cmbDataDirect.getValue()==1); + // this.chartSettings.putRange(this.txtDataRange.getValue()); this.chartSettings.putTitle(this.cmbChartTitle.getValue()); this.chartSettings.putLegendPos(this.cmbLegendPos.getValue()); @@ -1484,12 +1485,13 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' isRangeValid: function() { if (this.isChart) { - var isvalid; - if (!_.isEmpty(this.txtDataRange.getValue())) { + var isvalid, + range = this.chartSettings.getRange(); + if (!_.isEmpty(range)) { var rec = this.mnuChartTypePicker.getSelectedRec(), type = (rec) ? rec.get('type') : this.currentChartType; - isvalid = this.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, this.txtDataRange.getValue(), true, this.cmbDataDirect.getValue()==0, type); + isvalid = this.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, range, true, !this.chartSettings.getInColumns(), type); if (isvalid == Asc.c_oAscError.ID.No) return true; } else @@ -1502,44 +1504,42 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' Common.UI.warning({msg: this.errorMaxRows}); } else if (isvalid == Asc.c_oAscError.ID.MaxDataPointsError) Common.UI.warning({msg: this.errorMaxPoints}); - else - this.txtDataRange.cmpEl.find('input').focus(); return false; } else return true; }, - onSelectData: function() { - var me = this; - if (me.api) { - me.btnChartType.menu.options.additionalAlign = me.menuAddAlign; - me.btnSparkType.menu.options.additionalAlign = me.menuAddAlign; - - var handlerDlg = function(dlg, result) { - if (result == 'ok') { - me.dataRangeValid = dlg.getSettings(); - me.txtDataRange.setValue(me.dataRangeValid); - me.txtDataRange.checkValidate(); - } - }; - - var win = new SSE.Views.CellRangeDialog({ - handler: handlerDlg - }).on('close', function() { - me.show(); - }); - - var xy = me.$window.offset(); - me.hide(); - win.show(xy.left + 160, xy.top + 125); - win.setSettings({ - api : me.api, - isRows : (me.cmbDataDirect.getValue()==0), - range : (!_.isEmpty(me.txtDataRange.getValue()) && (me.txtDataRange.checkValidate()==true)) ? me.txtDataRange.getValue() : me.dataRangeValid, - type : Asc.c_oAscSelectionDialogType.Chart - }); - } - }, + // onSelectData: function() { + // var me = this; + // if (me.api) { + // me.btnChartType.menu.options.additionalAlign = me.menuAddAlign; + // me.btnSparkType.menu.options.additionalAlign = me.menuAddAlign; + // + // var handlerDlg = function(dlg, result) { + // if (result == 'ok') { + // me.dataRangeValid = dlg.getSettings(); + // me.txtDataRange.setValue(me.dataRangeValid); + // me.txtDataRange.checkValidate(); + // } + // }; + // + // var win = new SSE.Views.CellRangeDialog({ + // handler: handlerDlg + // }).on('close', function() { + // me.show(); + // }); + // + // var xy = me.$window.offset(); + // me.hide(); + // win.show(xy.left + 160, xy.top + 125); + // win.setSettings({ + // api : me.api, + // isRows : (me.cmbDataDirect.getValue()==0), + // range : (!_.isEmpty(me.txtDataRange.getValue()) && (me.txtDataRange.checkValidate()==true)) ? me.txtDataRange.getValue() : me.dataRangeValid, + // type : Asc.c_oAscSelectionDialogType.Chart + // }); + // } + // }, onSelectDataLabels: function(obj, rec, e) { var disable = rec.value == Asc.c_oAscChartDataLabelsPos.none; @@ -1613,10 +1613,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' show: function() { Common.Views.AdvancedSettingsWindow.prototype.show.apply(this, arguments); - var me = this; - _.delay(function(){ - me.txtDataRange.cmpEl.find('input').focus(); - },50); + // var me = this; + // _.delay(function(){ + // me.txtDataRange.cmpEl.find('input').focus(); + // },50); }, close: function () { diff --git a/apps/spreadsheeteditor/main/app/view/DataTab.js b/apps/spreadsheeteditor/main/app/view/DataTab.js index 22a82ee58..f7bd1439f 100644 --- a/apps/spreadsheeteditor/main/app/view/DataTab.js +++ b/apps/spreadsheeteditor/main/app/view/DataTab.js @@ -190,17 +190,17 @@ define([ this.lockedControls.push(this.btnCustomSort); this.btnsSortDown = Common.Utils.injectButtons($host.find('.slot-sortdesc'), '', 'toolbar__icon btn-sort-down', '', - [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.editPivot, _set.cantModifyFilter, _set.sheetLock]); + [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.cantModifyFilter, _set.sheetLock]); this.btnsSortUp = Common.Utils.injectButtons($host.find('.slot-sortasc'), '', 'toolbar__icon btn-sort-up', '', - [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.editPivot, _set.cantModifyFilter, _set.sheetLock]); + [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.cantModifyFilter, _set.sheetLock]); this.btnsSetAutofilter = Common.Utils.injectButtons($host.find('.slot-btn-setfilter'), '', 'toolbar__icon btn-autofilter', '', [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.editPivot, _set.cantModifyFilter], false, false, true); this.btnsClearAutofilter = Common.Utils.injectButtons($host.find('.slot-btn-clear-filter'), '', 'toolbar__icon btn-clear-filter', '', - [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleDelFilter, _set.editPivot]); + [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleDelFilter]); Array.prototype.push.apply(this.lockedControls, this.btnsSortDown.concat(this.btnsSortUp, this.btnsSetAutofilter,this.btnsClearAutofilter)); diff --git a/apps/spreadsheeteditor/main/app/view/PivotTable.js b/apps/spreadsheeteditor/main/app/view/PivotTable.js index 4183a3340..34e292abd 100644 --- a/apps/spreadsheeteditor/main/app/view/PivotTable.js +++ b/apps/spreadsheeteditor/main/app/view/PivotTable.js @@ -180,7 +180,7 @@ define([ this.btnAddPivot = new Common.UI.Button({ cls: 'btn-toolbar x-huge icon-top', - iconCls: 'toolbar__icon btn-add-pivot', + iconCls: 'toolbar__icon btn-pivot-sum', caption: this.txtCreate, disabled : false, lock : [_set.lostConnect, _set.coAuth, _set.editPivot, _set.selRangeEdit, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer] diff --git a/apps/spreadsheeteditor/main/app/view/TableSettings.js b/apps/spreadsheeteditor/main/app/view/TableSettings.js index 563607dff..8943c8f61 100644 --- a/apps/spreadsheeteditor/main/app/view/TableSettings.js +++ b/apps/spreadsheeteditor/main/app/view/TableSettings.js @@ -294,8 +294,13 @@ define([ this.lockedControls.push(this.btnEdit); this.btnConvertRange = new Common.UI.Button({ - el: $('#table-btn-convert-range') + parentEl: $('#table-btn-convert-range'), + cls : 'btn-toolbar', + iconCls : 'toolbar__icon btn-convert-to-range', + caption : this.textConvertRange, + style : 'width: 100%;text-align: left;' }); + this.btnConvertRange.on('click', _.bind(function(btn){ if (this.api) this.api.asc_convertTableToRange(this._state.TableName); Common.NotificationCenter.trigger('edit:complete', this); @@ -303,7 +308,11 @@ define([ this.lockedControls.push(this.btnConvertRange); this.btnRemDuplicates = new Common.UI.Button({ - el: $('#table-btn-rem-duplicates') + parentEl: $('#table-btn-rem-duplicates'), + cls : 'btn-toolbar', + iconCls : 'toolbar__icon btn-remove-duplicates', + caption : this.textRemDuplicates, + style : 'width: 100%;text-align: left;' }); this.btnRemDuplicates.on('click', _.bind(function(btn){ Common.NotificationCenter.trigger('data:remduplicates', this); @@ -311,13 +320,21 @@ define([ this.lockedControls.push(this.btnRemDuplicates); this.btnSlicer = new Common.UI.Button({ - el: $('#table-btn-slicer') + parentEl: $('#table-btn-slicer'), + cls : 'btn-toolbar', + iconCls : 'toolbar__icon btn-slicer', + caption : this.textSlicer, + style : 'width: 100%;text-align: left;' }); this.btnSlicer.on('click', _.bind(this.onInsertSlicerClick, this)); this.lockedControls.push(this.btnSlicer); this.btnPivot = new Common.UI.Button({ - el: $('#table-btn-pivot') + parentEl: $('#table-btn-pivot'), + cls : 'btn-toolbar', + iconCls : 'toolbar__icon btn-pivot-sum', + caption : this.textPivot, + style : 'width: 100%;text-align: left;' }); this.btnPivot.on('click', _.bind(this.onInsertPivotClick, this)); this.lockedControls.push(this.btnPivot); @@ -626,7 +643,8 @@ define([ warnLongOperation: 'The operation you are about to perform might take rather much time to complete.
Are you sure you want to continue?', textRemDuplicates: 'Remove duplicates', textSlicer: 'Insert slicer', - textPivot: 'Insert pivot table' + textPivot: 'Insert pivot table', + textActions: 'Table actions' }, SSE.Views.TableSettings || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index a6bf897d7..fd18f39ac 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -1236,6 +1236,11 @@ "SSE.Views.AutoFilterDialog.txtTitle": "Filter", "SSE.Views.AutoFilterDialog.txtTop10": "Top 10", "SSE.Views.AutoFilterDialog.warnNoSelected": "You must choose at least one value", + "SSE.Views.AutoFilterDialog.txtValueFilter": "Value filter", + "SSE.Views.AutoFilterDialog.txtLabelFilter": "Label filter", + "SSE.Views.AutoFilterDialog.warnFilterError": "You need at least one field in the Values area in order to apply a value filter.", + "SSE.Views.AutoFilterDialog.txtNotBetween": "Not between...", + "SSE.Views.AutoFilterDialog.txtSortOption": "More sort options...", "SSE.Views.CellEditor.textManager": "Name Manager", "SSE.Views.CellEditor.tipFormula": "Insert function", "SSE.Views.CellRangeDialog.errorMaxRows": "ERROR! The maximum number of data series per chart is 255", @@ -1280,6 +1285,42 @@ "SSE.Views.CellSettings.textPosition": "Position", "SSE.Views.CellSettings.tipAddGradientPoint": "Add gradient point", "SSE.Views.CellSettings.tipRemoveGradientPoint": "Remove gradient point", + "SSE.Views.ChartDataDialog.textTitle": "Chart Data", + "SSE.Views.ChartDataDialog.textInvalidRange": "Invalid cells range", + "SSE.Views.ChartDataDialog.textSelectData": "Select data", + "SSE.Views.ChartDataDialog.errorMaxRows": "The maximum number of data series per chart is 255.", + "SSE.Views.ChartDataDialog.errorStockChart": "Incorrect row order. To build a stock chart place the data on the sheet in the following order:
opening price, max price, min price, closing price.", + "SSE.Views.ChartDataDialog.errorMaxPoints": "The maximum number of points in series per chart is 4096.", + "SSE.Views.ChartDataDialog.textSeries": "Legend Entries (Series)", + "SSE.Views.ChartDataDialog.textAdd": "Add", + "SSE.Views.ChartDataDialog.textEdit": "Edit", + "SSE.Views.ChartDataDialog.textDelete": "Remove", + "SSE.Views.ChartDataDialog.textSwitch": "Switch Row/Column", + "SSE.Views.ChartDataDialog.textCategory": "Horizontal (Category) Axis Labels", + "SSE.Views.ChartDataDialog.textUp": "Up", + "SSE.Views.ChartDataDialog.textDown": "Down", + "SSE.Views.ChartDataDialog.textData": "Chart data range", + "SSE.Views.ChartDataDialog.errorInFormula": "There's an error in formula you entered.", + "SSE.Views.ChartDataDialog.errorInvalidReference": "The reference is not valid. Reference must be to an open worksheet.", + "SSE.Views.ChartDataDialog.errorNoSingleRowCol": "The reference is not valid. References for titles, values, sizes, or data labels must be a single cell, row, or column.", + "SSE.Views.ChartDataDialog.errorNoValues": "To create a chart, the series must contain at least one value.", + "SSE.Views.ChartDataRangeDialog.txtTitleSeries": "Edit Series", + "SSE.Views.ChartDataRangeDialog.txtTitleCategory": "Axis Labels", + "SSE.Views.ChartDataRangeDialog.txtSeriesName": "Series name", + "SSE.Views.ChartDataRangeDialog.txtValues": "Values", + "SSE.Views.ChartDataRangeDialog.txtXValues": "X Values", + "SSE.Views.ChartDataRangeDialog.txtYValues": "Y Values", + "SSE.Views.ChartDataRangeDialog.txtAxisLabel": "Axis label range", + "SSE.Views.ChartDataRangeDialog.txtChoose": "Choose range", + "SSE.Views.ChartDataRangeDialog.textInvalidRange": "Invalid cells range", + "SSE.Views.ChartDataRangeDialog.textSelectData": "Select data", + "SSE.Views.ChartDataRangeDialog.errorMaxRows": "The maximum number of data series per chart is 255.", + "SSE.Views.ChartDataRangeDialog.errorStockChart": "Incorrect row order. To build a stock chart place the data on the sheet in the following order:
opening price, max price, min price, closing price.", + "SSE.Views.ChartDataRangeDialog.errorMaxPoints": "The maximum number of points in series per chart is 4096.", + "SSE.Views.ChartDataRangeDialog.errorInFormula": "There's an error in formula you entered.", + "SSE.Views.ChartDataRangeDialog.errorInvalidReference": "The reference is not valid. Reference must be to an open worksheet.", + "SSE.Views.ChartDataRangeDialog.errorNoSingleRowCol": "The reference is not valid. References for titles, values, sizes, or data labels must be a single cell, row, or column.", + "SSE.Views.ChartDataRangeDialog.errorNoValues": "To create a chart, the series must contain at least one value.", "SSE.Views.ChartSettings.strLineWeight": "Line Weight", "SSE.Views.ChartSettings.strSparkColor": "Color", "SSE.Views.ChartSettings.strTemplate": "Template", @@ -2019,6 +2060,27 @@ "SSE.Views.ParagraphSettingsAdvanced.textTabRight": "Right", "SSE.Views.ParagraphSettingsAdvanced.textTitle": "Paragraph - Advanced Settings", "SSE.Views.ParagraphSettingsAdvanced.txtAutoText": "Auto", + "SSE.Views.PivotDigitalFilterDialog.capCondition1": "equals", + "SSE.Views.PivotDigitalFilterDialog.capCondition10": "does not end with", + "SSE.Views.PivotDigitalFilterDialog.capCondition11": "contains", + "SSE.Views.PivotDigitalFilterDialog.capCondition12": "does not contain", + "SSE.Views.PivotDigitalFilterDialog.capCondition2": "does not equal", + "SSE.Views.PivotDigitalFilterDialog.capCondition3": "is greater than", + "SSE.Views.PivotDigitalFilterDialog.capCondition4": "is greater than or equal to", + "SSE.Views.PivotDigitalFilterDialog.capCondition5": "is less than", + "SSE.Views.PivotDigitalFilterDialog.capCondition6": "is less than or equal to", + "SSE.Views.PivotDigitalFilterDialog.capCondition7": "begins with", + "SSE.Views.PivotDigitalFilterDialog.capCondition8": "does not begin with", + "SSE.Views.PivotDigitalFilterDialog.capCondition9": "ends with", + "SSE.Views.PivotDigitalFilterDialog.textUse1": "Use ? to present any single character", + "SSE.Views.PivotDigitalFilterDialog.textUse2": "Use * to present any series of character", + "SSE.Views.PivotDigitalFilterDialog.textShowLabel": "Show items for which the label:", + "SSE.Views.PivotDigitalFilterDialog.textShowValue": "Show items for which:", + "SSE.Views.PivotDigitalFilterDialog.txtTitleValue": "Value Filter", + "SSE.Views.PivotDigitalFilterDialog.txtTitleLabel": "Label Filter", + "SSE.Views.PivotDigitalFilterDialog.capCondition13": "between", + "SSE.Views.PivotDigitalFilterDialog.capCondition14": "not between", + "SSE.Views.PivotDigitalFilterDialog.txtAnd": "and", "SSE.Views.PivotSettings.textAdvanced": "Show advanced settings", "SSE.Views.PivotSettings.textColumns": "Columns", "SSE.Views.PivotSettings.textFields": "Select Fields", @@ -2386,6 +2448,9 @@ "SSE.Views.SortDialog.textZA": "Z to A", "SSE.Views.SortDialog.txtInvalidRange": "Invalid cells range.", "SSE.Views.SortDialog.txtTitle": "Sort", + "SSE.Views.SortFilterDialog.txtTitle": "Sort", + "SSE.Views.SortFilterDialog.textAsc": "Ascenging (A to Z) by", + "SSE.Views.SortFilterDialog.textDesc": "Descending (Z to A) by", "SSE.Views.SortOptionsDialog.textCase": "Case sensitive", "SSE.Views.SortOptionsDialog.textHeaders": "My data has headers", "SSE.Views.SortOptionsDialog.textLeftRight": "Sort left to right", @@ -2510,6 +2575,7 @@ "SSE.Views.TableSettings.warnLongOperation": "The operation you are about to perform might take rather much time to complete.
Are you sure you want to continue?", "SSE.Views.TableSettings.textSlicer": "Insert slicer", "SSE.Views.TableSettings.textPivot": "Insert pivot table", + "SSE.Views.TableSettings.textActions": "Table actions", "SSE.Views.TableSettingsAdvanced.textAlt": "Alternative Text", "SSE.Views.TableSettingsAdvanced.textAltDescription": "Description", "SSE.Views.TableSettingsAdvanced.textAltTip": "The alternative text-based representation of the visual object information, which will be read to the people with vision or cognitive impairments to help them better understand what information there is in the image, autoshape, chart or table.", @@ -2796,6 +2862,9 @@ "SSE.Views.Top10FilterDialog.txtPercent": "Percent", "SSE.Views.Top10FilterDialog.txtTitle": "Top 10 AutoFilter", "SSE.Views.Top10FilterDialog.txtTop": "Top", + "SSE.Views.Top10FilterDialog.txtValueTitle": "Top 10 Filter", + "SSE.Views.Top10FilterDialog.txtSum": "Sum", + "SSE.Views.Top10FilterDialog.txtBy": "by", "SSE.Views.ValueFieldSettingsDialog.textTitle": "Value Field Settings", "SSE.Views.ValueFieldSettingsDialog.txtAverage": "Average", "SSE.Views.ValueFieldSettingsDialog.txtBaseField": "Base field", diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/big/btn-add-pivot.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/big/btn-add-pivot.png deleted file mode 100644 index f1c73e7e2..000000000 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/big/btn-add-pivot.png and /dev/null differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/big/btn-freeze-panes.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/big/btn-freeze-panes.png new file mode 100644 index 000000000..afbd464a7 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/big/btn-freeze-panes.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/big/btn-pivot-sum.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/big/btn-pivot-sum.png new file mode 100644 index 000000000..4b576563a Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/big/btn-pivot-sum.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/big/btn-sheet-view.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/big/btn-sheet-view.png new file mode 100644 index 000000000..cd44867e1 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/big/btn-sheet-view.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-convert-to-range.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-convert-to-range.png new file mode 100644 index 000000000..28e0aec7a Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-convert-to-range.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-menu-pivot.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-menu-pivot.png deleted file mode 100644 index 64d7d49e5..000000000 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-menu-pivot.png and /dev/null differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-pivot-sum.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-pivot-sum.png new file mode 100644 index 000000000..af1e3f881 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-pivot-sum.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-remove-duplicates.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-remove-duplicates.png new file mode 100644 index 000000000..3f2d3b58d Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-remove-duplicates.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-sheet-view-close.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-sheet-view-close.png new file mode 100644 index 000000000..cd7c8f7b2 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-sheet-view-close.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-sheet-view-new.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-sheet-view-new.png new file mode 100644 index 000000000..dd9ac55fa Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/btn-sheet-view-new.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-add-pivot.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-add-pivot.png deleted file mode 100644 index 7567aa366..000000000 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-add-pivot.png and /dev/null differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-freeze-panes.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-freeze-panes.png new file mode 100644 index 000000000..124efafe1 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-freeze-panes.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-pivot-sum.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-pivot-sum.png new file mode 100644 index 000000000..cd76fa3b1 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-pivot-sum.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-sheet-view.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-sheet-view.png new file mode 100644 index 000000000..45f71af0e Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-sheet-view.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-convert-to-range.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-convert-to-range.png new file mode 100644 index 000000000..ecd300e59 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-convert-to-range.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-menu-pivot.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-menu-pivot.png deleted file mode 100644 index f6c036890..000000000 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-menu-pivot.png and /dev/null differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-pivot-sum.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-pivot-sum.png new file mode 100644 index 000000000..8d61fed3f Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-pivot-sum.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-remove-duplicates.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-remove-duplicates.png new file mode 100644 index 000000000..74e97eb0b Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-remove-duplicates.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-sheet-view-close.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-sheet-view-close.png new file mode 100644 index 000000000..2c25f873b Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-sheet-view-close.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-sheet-view-new.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-sheet-view-new.png new file mode 100644 index 000000000..4713370df Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/btn-sheet-view-new.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/big/btn-add-pivot.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/big/btn-add-pivot.png deleted file mode 100644 index d93aba848..000000000 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/big/btn-add-pivot.png and /dev/null differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/big/btn-freeze-panes.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/big/btn-freeze-panes.png new file mode 100644 index 000000000..5688d5beb Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/big/btn-freeze-panes.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/big/btn-pivot-sum.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/big/btn-pivot-sum.png new file mode 100644 index 000000000..cd76fa3b1 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/big/btn-pivot-sum.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/big/btn-sheet-view.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/big/btn-sheet-view.png new file mode 100644 index 000000000..05dedd7a9 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/big/btn-sheet-view.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-convert-to-range.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-convert-to-range.png new file mode 100644 index 000000000..cf6fd21b2 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-convert-to-range.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-menu-pivot.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-menu-pivot.png deleted file mode 100644 index f1c73e7e2..000000000 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-menu-pivot.png and /dev/null differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-pivot-sum.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-pivot-sum.png new file mode 100644 index 000000000..4b576563a Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-pivot-sum.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-remove-duplicates.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-remove-duplicates.png new file mode 100644 index 000000000..882e24c7d Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-remove-duplicates.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sheet-view-close.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sheet-view-close.png new file mode 100644 index 000000000..bcd390427 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sheet-view-close.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sheet-view-new.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sheet-view-new.png new file mode 100644 index 000000000..07c0da641 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/btn-sheet-view-new.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-add-pivot.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-add-pivot.png deleted file mode 100644 index 1dcd2ac7a..000000000 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-add-pivot.png and /dev/null differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-freeze-panes.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-freeze-panes.png new file mode 100644 index 000000000..625e42c03 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-freeze-panes.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-pivot-sum.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-pivot-sum.png new file mode 100644 index 000000000..bca73b1e4 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-pivot-sum.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-sheet-view.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-sheet-view.png new file mode 100644 index 000000000..ba8c1b279 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-sheet-view.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-convert-to-range.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-convert-to-range.png new file mode 100644 index 000000000..79baa7650 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-convert-to-range.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-menu-pivot.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-menu-pivot.png deleted file mode 100644 index bef97afe1..000000000 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-menu-pivot.png and /dev/null differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-pivot-sum.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-pivot-sum.png new file mode 100644 index 000000000..c91adc8c5 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-pivot-sum.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-remove-duplicates.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-remove-duplicates.png new file mode 100644 index 000000000..9d852ccee Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-remove-duplicates.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-sheet-view-close.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-sheet-view-close.png new file mode 100644 index 000000000..ad135aa8d Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-sheet-view-close.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-sheet-view-new.png b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-sheet-view-new.png new file mode 100644 index 000000000..9b7b8fd42 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/1x/btn-sheet-view-new.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-add-pivot.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-add-pivot.png deleted file mode 100644 index 1ad261ba6..000000000 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-add-pivot.png and /dev/null differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-freeze-panes.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-freeze-panes.png new file mode 100644 index 000000000..495f5e06a Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-freeze-panes.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-pivot-sum.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-pivot-sum.png new file mode 100644 index 000000000..aecfe8328 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-pivot-sum.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-sheet-view.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-sheet-view.png new file mode 100644 index 000000000..7f81c5325 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-sheet-view.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-convert-to-range.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-convert-to-range.png new file mode 100644 index 000000000..0e531af50 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-convert-to-range.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-menu-pivot.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-menu-pivot.png deleted file mode 100644 index 5a0b396ac..000000000 Binary files a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-menu-pivot.png and /dev/null differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-pivot-sum.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-pivot-sum.png new file mode 100644 index 000000000..67d622242 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-pivot-sum.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-remove-duplicates.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-remove-duplicates.png new file mode 100644 index 000000000..58f075d2f Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-remove-duplicates.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-sheet-view-close.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-sheet-view-close.png new file mode 100644 index 000000000..075c8369d Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-sheet-view-close.png differ diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-sheet-view-new.png b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-sheet-view-new.png new file mode 100644 index 000000000..3afec8a12 Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/2x/btn-sheet-view-new.png differ diff --git a/apps/spreadsheeteditor/main/resources/less/statusbar.less b/apps/spreadsheeteditor/main/resources/less/statusbar.less index f1afb8293..3d03bc64e 100644 --- a/apps/spreadsheeteditor/main/resources/less/statusbar.less +++ b/apps/spreadsheeteditor/main/resources/less/statusbar.less @@ -194,6 +194,7 @@ box-shadow: 0px 4px 0 #49795d inset; border-top-width: 0; + padding-top: 1px; font-weight: bold; } } @@ -207,14 +208,14 @@ } &.coauth-locked { - vertical-align: top; &.active { > span { - border-top-width: 1px; + border-top-width: 0px; } } > span { outline: none; + position: relative; } > span:after { position: absolute;