[SSE] Fix Bug 36982 + disable cut/paste/insert function from context menu in the pivot table.
This commit is contained in:
parent
fe68423a70
commit
107a2b377e
|
@ -1475,6 +1475,8 @@ define([
|
|||
item.setDisabled(isCellLocked);
|
||||
});
|
||||
documentHolder.pmiCopy.setDisabled(false);
|
||||
documentHolder.pmiCut.setDisabled(isCellLocked || inPivot); // can't edit pivot cells
|
||||
documentHolder.pmiPaste.setDisabled(isCellLocked || inPivot);
|
||||
documentHolder.pmiInsertEntire.setDisabled(isCellLocked || isTableLocked);
|
||||
documentHolder.pmiInsertCells.setDisabled(isCellLocked || isTableLocked || inPivot);
|
||||
documentHolder.pmiInsertTable.setDisabled(isCellLocked || isTableLocked);
|
||||
|
@ -1487,6 +1489,7 @@ define([
|
|||
documentHolder.pmiReapply.setDisabled(isCellLocked || isTableLocked|| (isApplyAutoFilter!==true));
|
||||
documentHolder.menuHyperlink.setDisabled(isCellLocked || inPivot);
|
||||
documentHolder.menuAddHyperlink.setDisabled(isCellLocked || inPivot);
|
||||
documentHolder.pmiInsFunction.setDisabled(isCellLocked || inPivot);
|
||||
|
||||
if (showMenu) this.showPopupMenu(documentHolder.ssMenu, {}, event);
|
||||
} else if (this.permissions.isEditDiagram && seltype == Asc.c_oAscSelectionType.RangeChartText) {
|
||||
|
|
|
@ -328,9 +328,7 @@ define([
|
|||
var selectType = info.asc_getFlags().asc_getSelectionType(),
|
||||
pivotInfo = info.asc_getPivotTableInfo();
|
||||
|
||||
var need_disable = info.asc_getLocked();
|
||||
|
||||
this.view.SetDisabled(!pivotInfo);
|
||||
this.view.SetDisabled(!pivotInfo || info.asc_getLockedPivotTable());
|
||||
if (pivotInfo)
|
||||
this.ChangeSettings(pivotInfo);
|
||||
},
|
||||
|
|
|
@ -133,12 +133,13 @@ define([
|
|||
|
||||
var need_disable = info.asc_getLocked(),
|
||||
need_disable_table = (info.asc_getLockedTable()===true || !this.rightmenu.mode.canModifyFilter),
|
||||
need_disable_spark = (info.asc_getLockedSparkline()===true);
|
||||
need_disable_spark = (info.asc_getLockedSparkline()===true),
|
||||
need_disable_pivot = (info.asc_getLockedPivotTable()===true);
|
||||
|
||||
this.onFocusObject(SelectedObjects, formatTableInfo, sparkLineInfo, pivotInfo, need_disable, need_disable_table, need_disable_spark);
|
||||
this.onFocusObject(SelectedObjects, formatTableInfo, sparkLineInfo, pivotInfo, need_disable, need_disable_table, need_disable_spark, need_disable_pivot);
|
||||
},
|
||||
|
||||
onFocusObject: function(SelectedObjects, formatTableInfo, sparkLineInfo, pivotInfo, isCellLocked, isTableLocked, isSparkLocked) {
|
||||
onFocusObject: function(SelectedObjects, formatTableInfo, sparkLineInfo, pivotInfo, isCellLocked, isTableLocked, isSparkLocked, isPivotLocked) {
|
||||
if (!this.editMode)
|
||||
return;
|
||||
|
||||
|
@ -199,7 +200,7 @@ define([
|
|||
// if (pivotInfo) {
|
||||
// settingsType = Common.Utils.documentSettingsType.Pivot;
|
||||
// this._settings[settingsType].props = pivotInfo;
|
||||
// this._settings[settingsType].locked = isCellLocked || true; // disable pivot settings
|
||||
// this._settings[settingsType].locked = isPivotLocked || true; // disable pivot settings
|
||||
// this._settings[settingsType].hidden = 0;
|
||||
// }
|
||||
|
||||
|
|
Loading…
Reference in a new issue