[SSE] Add/Close views
This commit is contained in:
parent
026e17cc13
commit
205094da86
|
@ -86,7 +86,8 @@ define([
|
|||
'viewtab:gridlines': this.onViewSettings,
|
||||
'viewtab:zoom': this.onZoom,
|
||||
'viewtab:showview': this.onShowView,
|
||||
'viewtab:openview': this.onOpenView
|
||||
'viewtab:openview': this.onOpenView,
|
||||
'viewtab:createview': this.onCreateView
|
||||
// 'viewtab:manager': this.onOpenManager
|
||||
},
|
||||
'Statusbar': {
|
||||
|
@ -161,6 +162,10 @@ define([
|
|||
this.api && this.api.asc_setActiveNamedSheetView((item.value == 'default') ? null : item.name);
|
||||
},
|
||||
|
||||
onCreateView: function(item) {
|
||||
this.api && this.api.asc_addNamedSheetView();
|
||||
},
|
||||
|
||||
// onWorksheetLocked: function(index,locked) {
|
||||
// if (index == this.api.asc_getActiveWorksheetIndex()) {
|
||||
// Common.Utils.lockControls(SSE.enumLock.sheetLock, locked, {array: this.view.btnsSortDown.concat(this.view.btnsSortUp, this.view.btnCustomSort, this.view.btnGroup, this.view.btnUngroup)});
|
||||
|
|
|
@ -51,6 +51,12 @@ define([
|
|||
me.btnFreezePanes.on('click', function (btn, e) {
|
||||
me.fireEvent('viewtab:freeze', [btn.pressed]);
|
||||
});
|
||||
me.btnCloseView.on('click', function (btn, e) {
|
||||
me.fireEvent('viewtab:openview', [{name: 'default', value: 'default'}]);
|
||||
});
|
||||
me.btnCreateView.on('click', function (btn, e) {
|
||||
me.fireEvent('viewtab:createview');
|
||||
});
|
||||
this.chFormula.on('change', function (field, value) {
|
||||
me.fireEvent('viewtab:formula', [0, value]);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue