[DE] Fix Bug 43918
This commit is contained in:
parent
e7cec07aad
commit
3bc5600976
|
@ -140,10 +140,14 @@ define([
|
||||||
item.setDisabled(notflow);
|
item.setDisabled(notflow);
|
||||||
});
|
});
|
||||||
|
|
||||||
disable.align = islocked || wrapping == Asc.c_oAscWrapStyle2.Inline;
|
var control_props = me.api.asc_IsContentControl() ? this.api.asc_GetContentControlProperties() : null,
|
||||||
disable.group = islocked || wrapping == Asc.c_oAscWrapStyle2.Inline;
|
lock_type = (control_props) ? control_props.get_Lock() : Asc.c_oAscSdtLockType.Unlocked,
|
||||||
disable.arrange = wrapping == Asc.c_oAscWrapStyle2.Inline;
|
content_locked = lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.ContentLocked;
|
||||||
disable.wrapping = islocked || props.get_FromGroup() || (notflow && !me.api.CanChangeWrapPolygon());
|
|
||||||
|
disable.align = islocked || wrapping == Asc.c_oAscWrapStyle2.Inline || content_locked;
|
||||||
|
disable.group = islocked || wrapping == Asc.c_oAscWrapStyle2.Inline || content_locked;
|
||||||
|
disable.arrange = wrapping == Asc.c_oAscWrapStyle2.Inline || content_locked;
|
||||||
|
disable.wrapping = islocked || props.get_FromGroup() || (notflow && !me.api.CanChangeWrapPolygon()) || content_locked;
|
||||||
|
|
||||||
if ( !disable.group ) {
|
if ( !disable.group ) {
|
||||||
if (me.api.CanGroup() || me.api.CanUnGroup()) {
|
if (me.api.CanGroup() || me.api.CanUnGroup()) {
|
||||||
|
|
|
@ -126,6 +126,7 @@ define([
|
||||||
var isChart = false;
|
var isChart = false;
|
||||||
for (i=0; i<SelectedObjects.length; i++)
|
for (i=0; i<SelectedObjects.length; i++)
|
||||||
{
|
{
|
||||||
|
var content_locked = false;
|
||||||
var eltype = SelectedObjects[i].get_ObjectType(),
|
var eltype = SelectedObjects[i].get_ObjectType(),
|
||||||
settingsType = this.getDocumentSettingsType(eltype);
|
settingsType = this.getDocumentSettingsType(eltype);
|
||||||
if (eltype === Asc.c_oAscTypeSelectElement.Math)
|
if (eltype === Asc.c_oAscTypeSelectElement.Math)
|
||||||
|
@ -136,6 +137,10 @@ define([
|
||||||
|
|
||||||
var value = SelectedObjects[i].get_ObjectValue();
|
var value = SelectedObjects[i].get_ObjectValue();
|
||||||
if (settingsType == Common.Utils.documentSettingsType.Image) {
|
if (settingsType == Common.Utils.documentSettingsType.Image) {
|
||||||
|
var control_props = this.api.asc_IsContentControl() ? this.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;
|
||||||
|
|
||||||
if (value.get_ChartProperties() !== null) {
|
if (value.get_ChartProperties() !== null) {
|
||||||
isChart = true;
|
isChart = true;
|
||||||
settingsType = Common.Utils.documentSettingsType.Chart;
|
settingsType = Common.Utils.documentSettingsType.Chart;
|
||||||
|
@ -145,7 +150,7 @@ define([
|
||||||
if (value.get_ShapeProperties().asc_getTextArtProperties()) {
|
if (value.get_ShapeProperties().asc_getTextArtProperties()) {
|
||||||
this._settings[Common.Utils.documentSettingsType.TextArt].props = value;
|
this._settings[Common.Utils.documentSettingsType.TextArt].props = value;
|
||||||
this._settings[Common.Utils.documentSettingsType.TextArt].hidden = 0;
|
this._settings[Common.Utils.documentSettingsType.TextArt].hidden = 0;
|
||||||
this._settings[Common.Utils.documentSettingsType.TextArt].locked = value.get_Locked();
|
this._settings[Common.Utils.documentSettingsType.TextArt].locked = value.get_Locked() || content_locked;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (settingsType == Common.Utils.documentSettingsType.Paragraph) {
|
} else if (settingsType == Common.Utils.documentSettingsType.Paragraph) {
|
||||||
|
@ -154,7 +159,7 @@ define([
|
||||||
}
|
}
|
||||||
this._settings[settingsType].props = value;
|
this._settings[settingsType].props = value;
|
||||||
this._settings[settingsType].hidden = 0;
|
this._settings[settingsType].hidden = 0;
|
||||||
this._settings[settingsType].locked = value.get_Locked();
|
this._settings[settingsType].locked = value.get_Locked() || content_locked;
|
||||||
if (!this._settings[Common.Utils.documentSettingsType.MailMerge].locked) // lock MailMerge-InsertField, если хотя бы один объект locked
|
if (!this._settings[Common.Utils.documentSettingsType.MailMerge].locked) // lock MailMerge-InsertField, если хотя бы один объект locked
|
||||||
this._settings[Common.Utils.documentSettingsType.MailMerge].locked = value.get_Locked();
|
this._settings[Common.Utils.documentSettingsType.MailMerge].locked = value.get_Locked();
|
||||||
if (!this._settings[Common.Utils.documentSettingsType.Signature].locked) // lock Signature, если хотя бы один объект locked
|
if (!this._settings[Common.Utils.documentSettingsType.Signature].locked) // lock Signature, если хотя бы один объект locked
|
||||||
|
|
|
@ -2541,7 +2541,11 @@ define([
|
||||||
|
|
||||||
me.menuOriginalSize.setVisible(value.imgProps.isOnlyImg || !value.imgProps.isChart && !value.imgProps.isShape);
|
me.menuOriginalSize.setVisible(value.imgProps.isOnlyImg || !value.imgProps.isChart && !value.imgProps.isShape);
|
||||||
|
|
||||||
var islocked = value.imgProps.locked || (value.headerProps!==undefined && value.headerProps.locked);
|
var control_props = me.api.asc_IsContentControl() ? 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;
|
||||||
|
|
||||||
|
var islocked = value.imgProps.locked || (value.headerProps!==undefined && value.headerProps.locked) || content_locked;
|
||||||
var pluginGuid = value.imgProps.value.asc_getPluginGuid();
|
var pluginGuid = value.imgProps.value.asc_getPluginGuid();
|
||||||
menuImgReplace.setVisible(value.imgProps.isOnlyImg && (pluginGuid===null || pluginGuid===undefined));
|
menuImgReplace.setVisible(value.imgProps.isOnlyImg && (pluginGuid===null || pluginGuid===undefined));
|
||||||
if (menuImgReplace.isVisible())
|
if (menuImgReplace.isVisible())
|
||||||
|
@ -2569,7 +2573,7 @@ define([
|
||||||
menuImageAlign.menu.items[7].setDisabled(objcount==2 && (!alignto || alignto==3));
|
menuImageAlign.menu.items[7].setDisabled(objcount==2 && (!alignto || alignto==3));
|
||||||
menuImageAlign.menu.items[8].setDisabled(objcount==2 && (!alignto || alignto==3));
|
menuImageAlign.menu.items[8].setDisabled(objcount==2 && (!alignto || alignto==3));
|
||||||
}
|
}
|
||||||
menuImageArrange.setDisabled( wrapping == Asc.c_oAscWrapStyle2.Inline );
|
menuImageArrange.setDisabled( wrapping == Asc.c_oAscWrapStyle2.Inline || content_locked);
|
||||||
|
|
||||||
if (me.api) {
|
if (me.api) {
|
||||||
mnuUnGroup.setDisabled(islocked || !me.api.CanUnGroup());
|
mnuUnGroup.setDisabled(islocked || !me.api.CanUnGroup());
|
||||||
|
|
Loading…
Reference in a new issue