[SSE] Bug 53916
This commit is contained in:
parent
4c26c97ef7
commit
25a4368e59
|
@ -193,7 +193,9 @@ define([
|
||||||
cf_locked: [],
|
cf_locked: [],
|
||||||
selectedCells: 0,
|
selectedCells: 0,
|
||||||
wsLock: false,
|
wsLock: false,
|
||||||
wsProps: []
|
wsProps: [],
|
||||||
|
is_lockText: false,
|
||||||
|
is_lockShape: false
|
||||||
};
|
};
|
||||||
this.binding = {};
|
this.binding = {};
|
||||||
|
|
||||||
|
@ -2544,7 +2546,8 @@ define([
|
||||||
// lock formatting controls in cell with FormatCells protection or in shape and Objects protection
|
// lock formatting controls in cell with FormatCells protection or in shape and Objects protection
|
||||||
need_disable = (selectionType === Asc.c_oAscSelectionType.RangeImage || selectionType === Asc.c_oAscSelectionType.RangeChart || selectionType === Asc.c_oAscSelectionType.RangeChartText ||
|
need_disable = (selectionType === Asc.c_oAscSelectionType.RangeImage || selectionType === Asc.c_oAscSelectionType.RangeChart || selectionType === Asc.c_oAscSelectionType.RangeChartText ||
|
||||||
selectionType === Asc.c_oAscSelectionType.RangeShape || selectionType === Asc.c_oAscSelectionType.RangeShapeText || selectionType === Asc.c_oAscSelectionType.RangeSlicer);
|
selectionType === Asc.c_oAscSelectionType.RangeShape || selectionType === Asc.c_oAscSelectionType.RangeShapeText || selectionType === Asc.c_oAscSelectionType.RangeSlicer);
|
||||||
toolbar.lockToolbar(SSE.enumLock.wsLockFormat, need_disable && !!this._state.wsProps['Objects'] || !need_disable && !!this._state.wsProps['FormatCells']);
|
toolbar.lockToolbar(SSE.enumLock.wsLockFormat, need_disable && !!this._state.wsProps['Objects'] && !!this._state.is_lockText || !need_disable && !!this._state.wsProps['FormatCells']);
|
||||||
|
toolbar.lockToolbar(SSE.enumLock.wsLockFormatFill, need_disable && !!this._state.wsProps['Objects'] && !!this._state.is_lockShape || !need_disable && !!this._state.wsProps['FormatCells']);
|
||||||
|
|
||||||
toolbar.lockToolbar(SSE.enumLock['Objects'], !!this._state.wsProps['Objects']);
|
toolbar.lockToolbar(SSE.enumLock['Objects'], !!this._state.wsProps['Objects']);
|
||||||
toolbar.lockToolbar(SSE.enumLock['FormatCells'], !!this._state.wsProps['FormatCells']);
|
toolbar.lockToolbar(SSE.enumLock['FormatCells'], !!this._state.wsProps['FormatCells']);
|
||||||
|
@ -3466,7 +3469,9 @@ define([
|
||||||
is_image = seltype == Asc.c_oAscSelectionType.RangeImage,
|
is_image = seltype == Asc.c_oAscSelectionType.RangeImage,
|
||||||
is_slicer = seltype == Asc.c_oAscSelectionType.RangeSlicer,
|
is_slicer = seltype == Asc.c_oAscSelectionType.RangeSlicer,
|
||||||
is_mode_2 = is_shape_text || is_shape || is_chart_text || is_chart || is_slicer,
|
is_mode_2 = is_shape_text || is_shape || is_chart_text || is_chart || is_slicer,
|
||||||
is_objLocked = false;
|
is_objLocked = false,
|
||||||
|
is_lockShape = false,
|
||||||
|
is_lockText = false;
|
||||||
|
|
||||||
if (!(is_mode_2 || is_image) && this._state.selection_type===seltype && this._state.coauthdisable===coauth_disable) return (seltype===Asc.c_oAscSelectionType.RangeImage);
|
if (!(is_mode_2 || is_image) && this._state.selection_type===seltype && this._state.coauthdisable===coauth_disable) return (seltype===Asc.c_oAscSelectionType.RangeImage);
|
||||||
|
|
||||||
|
@ -3474,9 +3479,14 @@ define([
|
||||||
var SelectedObjects = this.api.asc_getGraphicObjectProps();
|
var SelectedObjects = this.api.asc_getGraphicObjectProps();
|
||||||
for (var i=0; i<SelectedObjects.length; ++i)
|
for (var i=0; i<SelectedObjects.length; ++i)
|
||||||
{
|
{
|
||||||
if (SelectedObjects[i].asc_getObjectType() == Asc.c_oAscTypeSelectElement.Image)
|
if (SelectedObjects[i].asc_getObjectType() == Asc.c_oAscTypeSelectElement.Image) {
|
||||||
is_objLocked = is_objLocked || SelectedObjects[i].asc_getObjectValue().asc_getLocked();
|
is_objLocked = is_objLocked || SelectedObjects[i].asc_getObjectValue().asc_getLocked();
|
||||||
|
is_lockText = is_lockText || SelectedObjects[i].asc_getObjectValue().asc_getProtectionLockText();
|
||||||
|
is_lockShape = is_lockShape || SelectedObjects[i].asc_getObjectValue().asc_getProtectionLocked();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
this._state.is_lockText = is_lockText;
|
||||||
|
this._state.is_lockShape = is_lockShape;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( coauth_disable ) {
|
if ( coauth_disable ) {
|
||||||
|
|
|
@ -104,7 +104,8 @@ define([
|
||||||
itemsDisabled: 'all-items-disabled',
|
itemsDisabled: 'all-items-disabled',
|
||||||
wsLockText: 'worksheet-lock-text',
|
wsLockText: 'worksheet-lock-text',
|
||||||
wsLockShape: 'worksheet-lock-shape',
|
wsLockShape: 'worksheet-lock-shape',
|
||||||
wsLockFormat: 'worksheet-lock-format'
|
wsLockFormat: 'worksheet-lock-format',
|
||||||
|
wsLockFormatFill: 'worksheet-lock-format-fill'
|
||||||
};
|
};
|
||||||
|
|
||||||
SSE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend({
|
SSE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend({
|
||||||
|
@ -563,7 +564,7 @@ define([
|
||||||
cls : 'btn-toolbar',
|
cls : 'btn-toolbar',
|
||||||
iconCls : 'toolbar__icon btn-paracolor',
|
iconCls : 'toolbar__icon btn-paracolor',
|
||||||
split : true,
|
split : true,
|
||||||
lock : [_set.selImage, _set.editCell, _set.selSlicer, _set.coAuth, _set.coAuthText, _set.lostConnect, _set.wsLockFormat],
|
lock : [_set.selImage, _set.editCell, _set.selSlicer, _set.coAuth, _set.coAuthText, _set.lostConnect, _set.wsLockFormatFill],
|
||||||
transparent: true,
|
transparent: true,
|
||||||
menu: true,
|
menu: true,
|
||||||
dataHint: '1',
|
dataHint: '1',
|
||||||
|
|
Loading…
Reference in a new issue