[SSE] Lock data group buttons
This commit is contained in:
parent
0c5a5e890c
commit
2b0fc8af7b
|
@ -78,6 +78,7 @@ define([
|
||||||
if (api) {
|
if (api) {
|
||||||
this.api = api;
|
this.api = api;
|
||||||
this.api.asc_registerCallback('asc_onSelectionChanged', _.bind(this.onSelectionChanged, this));
|
this.api.asc_registerCallback('asc_onSelectionChanged', _.bind(this.onSelectionChanged, this));
|
||||||
|
this.api.asc_registerCallback('asc_onWorksheetLocked', _.bind(this.onWorksheetLocked, this));
|
||||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onCoAuthoringDisconnect, this));
|
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onCoAuthoringDisconnect, this));
|
||||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||||
}
|
}
|
||||||
|
@ -192,6 +193,12 @@ define([
|
||||||
this.api.asc_changeGroupDetails(false);
|
this.api.asc_changeGroupDetails(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onWorksheetLocked: function(index,locked) {
|
||||||
|
if (index == this.api.asc_getActiveWorksheetIndex()) {
|
||||||
|
Common.Utils.lockControls(SSE.enumLock.sheetLock, locked, {array: [this.view.btnGroup, this.view.btnUngroup]});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
textWizard: 'Text to Columns Wizard'
|
textWizard: 'Text to Columns Wizard'
|
||||||
|
|
||||||
}, SSE.Controllers.DataTab || {}));
|
}, SSE.Controllers.DataTab || {}));
|
||||||
|
|
|
@ -107,7 +107,7 @@ define([
|
||||||
caption: this.capBtnGroup,
|
caption: this.capBtnGroup,
|
||||||
split: false,
|
split: false,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth]
|
lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.sheetLock, _set.lostConnect, _set.coAuth]
|
||||||
});
|
});
|
||||||
Common.Utils.injectComponent($host.find('#slot-btn-group'), this.btnGroup);
|
Common.Utils.injectComponent($host.find('#slot-btn-group'), this.btnGroup);
|
||||||
this.lockedControls.push(this.btnGroup);
|
this.lockedControls.push(this.btnGroup);
|
||||||
|
@ -119,7 +119,7 @@ define([
|
||||||
split: true,
|
split: true,
|
||||||
menu: true,
|
menu: true,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth]
|
lock: [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.sheetLock, _set.lostConnect, _set.coAuth]
|
||||||
});
|
});
|
||||||
Common.Utils.injectComponent($host.find('#slot-btn-ungroup'), this.btnUngroup);
|
Common.Utils.injectComponent($host.find('#slot-btn-ungroup'), this.btnUngroup);
|
||||||
this.lockedControls.push(this.btnUngroup);
|
this.lockedControls.push(this.btnUngroup);
|
||||||
|
|
|
@ -89,7 +89,8 @@ define([
|
||||||
printAreaLock: 'print-area-lock',
|
printAreaLock: 'print-area-lock',
|
||||||
namedRangeLock: 'named-range-lock',
|
namedRangeLock: 'named-range-lock',
|
||||||
multiselectCols:'is-multiselect-cols',
|
multiselectCols:'is-multiselect-cols',
|
||||||
headerLock: 'header-lock'
|
headerLock: 'header-lock',
|
||||||
|
sheetLock: 'sheet-lock'
|
||||||
};
|
};
|
||||||
|
|
||||||
SSE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend({
|
SSE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend({
|
||||||
|
|
Loading…
Reference in a new issue