Merge sse-zeros feature into develop

This commit is contained in:
Julia Radzhabova 2021-05-24 12:48:52 +03:00
commit 10dc794e84
4 changed files with 19 additions and 3 deletions

View file

@ -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));

View file

@ -275,6 +275,7 @@
<span class="btn-slot text" id="slot-chk-gridlines"></span>
</div>
<div class="elset">
<span class="btn-slot text" id="slot-chk-zeros"></span>
</div>
</div>
</section>

View file

@ -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 || {}));
});

View file

@ -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"
}