diff --git a/apps/spreadsheeteditor/main/app/controller/ViewTab.js b/apps/spreadsheeteditor/main/app/controller/ViewTab.js index 343aae72a..8aeffa90a 100644 --- a/apps/spreadsheeteditor/main/app/controller/ViewTab.js +++ b/apps/spreadsheeteditor/main/app/controller/ViewTab.js @@ -87,6 +87,7 @@ define([ 'viewtab:formula': this.onViewSettings, 'viewtab:headings': this.onViewSettings, 'viewtab:gridlines': this.onViewSettings, + 'viewtab:zeros': this.onViewSettings, 'viewtab:zoom': this.onZoom, 'viewtab:showview': this.onShowView, 'viewtab:openview': this.onOpenView, @@ -140,6 +141,7 @@ define([ case 0: this.getApplication().getController('Viewport').header.fireEvent('formulabar:hide', [ value!=='checked']); break; case 1: this.api.asc_setDisplayHeadings(value=='checked'); break; case 2: this.api.asc_setDisplayGridlines( value=='checked'); break; + case 3: this.api.asc_setShowZeros( value=='checked'); break; } } Common.NotificationCenter.trigger('edit:complete', this.view); @@ -196,7 +198,7 @@ define([ onWorksheetLocked: function(index,locked) { if (index == this.api.asc_getActiveWorksheetIndex()) { - Common.Utils.lockControls(SSE.enumLock.sheetLock, locked, {array: [this.view.chHeadings, this.view.chGridlines, this.view.btnFreezePanes]}); + Common.Utils.lockControls(SSE.enumLock.sheetLock, locked, {array: [this.view.chHeadings, this.view.chGridlines, this.view.btnFreezePanes, this.view.chZeros]}); } }, @@ -207,6 +209,7 @@ define([ this.view.chHeadings.setValue(!!params.asc_getShowRowColHeaders(), true); this.view.chGridlines.setValue(!!params.asc_getShowGridLines(), true); this.view.btnFreezePanes.menu.items && this.view.btnFreezePanes.menu.items[0].setCaption(!!params.asc_getIsFreezePane() ? this.view.textUnFreeze : this.view.capBtnFreeze); + this.view.chZeros.setValue(!!params.asc_getShowZeros(), true); var currentSheet = this.api.asc_getActiveWorksheetIndex(); this.onWorksheetLocked(currentSheet, this.api.asc_isWorksheetLockedOrDeleted(currentSheet)); diff --git a/apps/spreadsheeteditor/main/app/template/Toolbar.template b/apps/spreadsheeteditor/main/app/template/Toolbar.template index d78278a2d..c76a111d3 100644 --- a/apps/spreadsheeteditor/main/app/template/Toolbar.template +++ b/apps/spreadsheeteditor/main/app/template/Toolbar.template @@ -275,6 +275,7 @@
+
diff --git a/apps/spreadsheeteditor/main/app/view/ViewTab.js b/apps/spreadsheeteditor/main/app/view/ViewTab.js index 95586474d..c49649694 100644 --- a/apps/spreadsheeteditor/main/app/view/ViewTab.js +++ b/apps/spreadsheeteditor/main/app/view/ViewTab.js @@ -69,6 +69,9 @@ define([ this.chGridlines.on('change', function (field, value) { me.fireEvent('viewtab:gridlines', [2, value]); }); + this.chZeros.on('change', function (field, value) { + me.fireEvent('viewtab:zeros', [3, value]); + }); this.cmbZoom.on('selected', function(combo, record) { me.fireEvent('viewtab:zoom', [record.value]); }); @@ -171,6 +174,13 @@ define([ }); this.lockedControls.push(this.chGridlines); + this.chZeros = new Common.UI.CheckBox({ + el: $host.findById('#slot-chk-zeros'), + labelText: this.textZeros, + lock : [_set.sheetLock, _set.lostConnect, _set.coAuth] + }); + this.lockedControls.push(this.chZeros); + $host.find('#slot-lbl-zoom').text(this.textZoom); Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this)); @@ -333,7 +343,8 @@ define([ textGridlines: 'Gridlines', textFreezeRow: 'Freeze Top Row', textFreezeCol: 'Freeze Top Column', - textUnFreeze: 'Unfreeze Panes' + textUnFreeze: 'Unfreeze Panes', + textZeros: 'Show zeros' } }()), SSE.Views.ViewTab || {})); }); diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 843d560c9..466e76f76 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -3414,5 +3414,6 @@ "SSE.Views.ViewTab.tipSheetView": "Sheet view", "SSE.Views.ViewTab.textFreezeRow": "Freeze Top Row", "SSE.Views.ViewTab.textFreezeCol": "Freeze Top Column", - "SSE.Views.ViewTab.textUnFreeze": "Unfreeze Panes" + "SSE.Views.ViewTab.textUnFreeze": "Unfreeze Panes", + "SSE.Views.ViewTab.textZeros": "Show zeros" } \ No newline at end of file