[DE] Fix Bug 48094
This commit is contained in:
parent
35b7ff277f
commit
240676e08e
|
@ -2515,6 +2515,21 @@ define([
|
|||
})
|
||||
});
|
||||
|
||||
var menuImgRemoveControl = new Common.UI.MenuItem({
|
||||
iconCls: 'menu__icon cc-remove',
|
||||
caption: me.textRemoveControl,
|
||||
value: 'remove'
|
||||
}).on('click', _.bind(me.onControlsSelect, me));
|
||||
|
||||
var menuImgControlSettings = new Common.UI.MenuItem({
|
||||
caption: me.textEditControls,
|
||||
value: 'settings'
|
||||
}).on('click', _.bind(me.onControlsSelect, me));
|
||||
|
||||
var menuImgControlSeparator = new Common.UI.MenuItem({
|
||||
caption : '--'
|
||||
});
|
||||
|
||||
this.pictureMenu = new Common.UI.Menu({
|
||||
cls: 'shifted-right',
|
||||
initMenu: function(value){
|
||||
|
@ -2589,9 +2604,19 @@ define([
|
|||
|
||||
me.menuOriginalSize.setVisible(value.imgProps.isOnlyImg || !value.imgProps.isChart && !value.imgProps.isShape);
|
||||
|
||||
var control_props = me.api.asc_IsContentControl() ? me.api.asc_GetContentControlProperties() : null,
|
||||
var in_control = me.api.asc_IsContentControl(),
|
||||
control_props = in_control ? me.api.asc_GetContentControlProperties() : null,
|
||||
lock_type = (control_props) ? control_props.get_Lock() : Asc.c_oAscSdtLockType.Unlocked,
|
||||
content_locked = lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.ContentLocked;
|
||||
content_locked = lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.ContentLocked,
|
||||
is_form = control_props && control_props.get_FormPr();
|
||||
|
||||
menuImgRemoveControl.setVisible(in_control);
|
||||
menuImgControlSettings.setVisible(in_control && me.mode.canEditContentControl && !is_form);
|
||||
menuImgControlSeparator.setVisible(in_control);
|
||||
if (in_control) {
|
||||
menuImgRemoveControl.setDisabled(lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.SdtLocked);
|
||||
menuImgRemoveControl.setCaption(is_form ? me.getControlLabel(control_props) : me.textRemoveControl);
|
||||
}
|
||||
|
||||
var islocked = value.imgProps.locked || (value.headerProps!==undefined && value.headerProps.locked) || content_locked;
|
||||
var pluginGuid = value.imgProps.value.asc_getPluginGuid();
|
||||
|
@ -2611,7 +2636,7 @@ define([
|
|||
if (menuChartEdit.isVisible())
|
||||
menuChartEdit.setDisabled(islocked || value.imgProps.value.get_SeveralCharts());
|
||||
|
||||
me.pictureMenu.items[19].setVisible(menuChartEdit.isVisible());
|
||||
me.pictureMenu.items[22].setVisible(menuChartEdit.isVisible());
|
||||
|
||||
me.menuOriginalSize.setDisabled(islocked || value.imgProps.value.get_ImageUrl()===null || value.imgProps.value.get_ImageUrl()===undefined);
|
||||
menuImageAdvanced.setDisabled(islocked);
|
||||
|
@ -2660,6 +2685,9 @@ define([
|
|||
menuSignatureEditSign,
|
||||
menuSignatureEditSetup,
|
||||
menuEditSignSeparator,
|
||||
menuImgRemoveControl,
|
||||
menuImgControlSettings,
|
||||
menuImgControlSeparator,
|
||||
menuImageArrange,
|
||||
menuImageAlign,
|
||||
me.menuImageWrap,
|
||||
|
|
Loading…
Reference in a new issue