mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-02-10 18:05:32 +08:00
Fix updating status for sheet view
This commit is contained in:
@ -64,7 +64,7 @@ define([
|
||||
if (api) {
|
||||
this.api = api;
|
||||
this.api.asc_registerCallback('asc_onZoomChanged', this.onApiZoomChange.bind(this));
|
||||
this.api.asc_registerCallback('asc_onSelectionChanged', _.bind(this.onSelectionChanged, this));
|
||||
this.api.asc_registerCallback('asc_onChangeActiveNamedSheetView', _.bind(this.onChangeActiveNamedSheetView, this));
|
||||
this.api.asc_registerCallback('asc_onWorksheetLocked', _.bind(this.onWorksheetLocked, this));
|
||||
this.api.asc_registerCallback('asc_onSheetsChanged', this.onApiSheetChanged.bind(this));
|
||||
this.api.asc_registerCallback('asc_onUpdateSheetViewSettings', this.onApiSheetChanged.bind(this));
|
||||
@ -144,7 +144,7 @@ define([
|
||||
this.SetDisabled(true);
|
||||
},
|
||||
|
||||
onSelectionChanged: function(info) {
|
||||
onChangeActiveNamedSheetView: function() {
|
||||
if (!this.toolbar.editMode || !this.view) return;
|
||||
|
||||
Common.Utils.lockControls(Common.enumLock.sheetView, this.api.asc_getActiveNamedSheetView && !this.api.asc_getActiveNamedSheetView(this.api.asc_getActiveWorksheetIndex()),
|
||||
|
||||
@ -412,6 +412,7 @@ define([
|
||||
this.api = api;
|
||||
this.api.asc_registerCallback('asc_onSheetsChanged', _.bind(this.update, this));
|
||||
this.api.asc_registerCallback('asc_onUpdateSheetViewSettings', _.bind(this.onUpdateSheetViewSettings, this));
|
||||
this.api.asc_registerCallback('asc_onChangeActiveNamedSheetView', _.bind(this.update, this));
|
||||
return this;
|
||||
},
|
||||
|
||||
|
||||
@ -448,6 +448,8 @@ define([
|
||||
|
||||
me.btnCreateView.updateHint(me.tipCreate);
|
||||
me.btnCloseView.updateHint(me.tipClose);
|
||||
Common.Utils.lockControls(Common.enumLock.sheetView, me.toolbar && me.toolbar.api && me.toolbar.api.asc_getActiveNamedSheetView &&
|
||||
!me.toolbar.api.asc_getActiveNamedSheetView(me.toolbar.api.asc_getActiveWorksheetIndex()), {array: [me.btnCloseView]});
|
||||
}
|
||||
me.btnMacros && me.btnMacros.updateHint(me.tipMacros);
|
||||
me.btnInterfaceTheme.updateHint(me.tipInterfaceTheme);
|
||||
|
||||
Reference in New Issue
Block a user