[SSE] Check clear cell on protected sheet
This commit is contained in:
parent
0d666fe210
commit
de3786afae
|
@ -526,7 +526,11 @@ define([
|
||||||
win.setSettings(rangePr, dateTypes, defRangePr);
|
win.setSettings(rangePr, dateTypes, defRangePr);
|
||||||
},
|
},
|
||||||
|
|
||||||
onClear: function(menu, item) {
|
onClear: function(menu, item, e) {
|
||||||
|
Common.NotificationCenter.trigger('protect:check', this.onClearCallback, this, [menu, item]);
|
||||||
|
},
|
||||||
|
|
||||||
|
onClearCallback: function(menu, item) {
|
||||||
if (this.api) {
|
if (this.api) {
|
||||||
if (item.value == Asc.c_oAscCleanOptions.Comments) {
|
if (item.value == Asc.c_oAscCleanOptions.Comments) {
|
||||||
this.api.asc_RemoveAllComments(!this.permissions.canDeleteComments, true);// 1 param = true if remove only my comments, 2 param - remove current comments
|
this.api.asc_RemoveAllComments(!this.permissions.canDeleteComments, true);// 1 param = true if remove only my comments, 2 param - remove current comments
|
||||||
|
|
|
@ -1478,6 +1478,10 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onClearStyleMenu: function(menu, item, e) {
|
onClearStyleMenu: function(menu, item, e) {
|
||||||
|
Common.NotificationCenter.trigger('protect:check', this.onClearStyleMenuCallback, this, [menu, item]);
|
||||||
|
},
|
||||||
|
|
||||||
|
onClearStyleMenuCallback: function(menu, item, e) {
|
||||||
if (this.api) {
|
if (this.api) {
|
||||||
if (item.value == Asc.c_oAscCleanOptions.Comments) {
|
if (item.value == Asc.c_oAscCleanOptions.Comments) {
|
||||||
this.api.asc_RemoveAllComments(!this.mode.canDeleteComments, true);// 1 param = true if remove only my comments, 2 param - remove current comments
|
this.api.asc_RemoveAllComments(!this.mode.canDeleteComments, true);// 1 param = true if remove only my comments, 2 param - remove current comments
|
||||||
|
|
|
@ -251,7 +251,7 @@ define([
|
||||||
onLockOptionClick: function(type, value) {
|
onLockOptionClick: function(type, value) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0: // cell
|
case 0: // cell
|
||||||
// this._originalProps.asc_getStyleInfo().asc_setShowRowHeaders(this.api, this._originalProps, value=='checked');
|
this.api.asc_setCellLocked(value=='checked');
|
||||||
break;
|
break;
|
||||||
case 1: // shape
|
case 1: // shape
|
||||||
break;
|
break;
|
||||||
|
@ -319,6 +319,10 @@ define([
|
||||||
var need_disable = (selectionType === Asc.c_oAscSelectionType.RangeCells || selectionType === Asc.c_oAscSelectionType.RangeCol ||
|
var need_disable = (selectionType === Asc.c_oAscSelectionType.RangeCells || selectionType === Asc.c_oAscSelectionType.RangeCol ||
|
||||||
selectionType === Asc.c_oAscSelectionType.RangeRow || selectionType === Asc.c_oAscSelectionType.RangeMax);
|
selectionType === Asc.c_oAscSelectionType.RangeRow || selectionType === Asc.c_oAscSelectionType.RangeMax);
|
||||||
Common.Utils.lockControls(SSE.enumLock.selRange, need_disable, { array: [this.view.chLockedText, this.view.chLockedShape]});
|
Common.Utils.lockControls(SSE.enumLock.selRange, need_disable, { array: [this.view.chLockedText, this.view.chLockedShape]});
|
||||||
|
|
||||||
|
var xfs = info.asc_getXfs();
|
||||||
|
this.view.chLockedCell.setValue(!!xfs.asc_getLocked(), true);
|
||||||
|
this.view.chHiddenFormula.setValue(!!xfs.asc_getHidden(), true);
|
||||||
},
|
},
|
||||||
|
|
||||||
onCoAuthoringDisconnect: function() {
|
onCoAuthoringDisconnect: function() {
|
||||||
|
|
Loading…
Reference in a new issue