[DE] Debug form settings
This commit is contained in:
parent
1f04c90813
commit
8170eb0a22
|
@ -125,6 +125,7 @@ define([
|
||||||
this._settings[Common.Utils.documentSettingsType.Signature].locked = false;
|
this._settings[Common.Utils.documentSettingsType.Signature].locked = false;
|
||||||
|
|
||||||
var isChart = false;
|
var isChart = false;
|
||||||
|
var control_props = this.api.asc_IsContentControl() ? this.api.asc_GetContentControlProperties() : null;
|
||||||
for (i=0; i<SelectedObjects.length; i++)
|
for (i=0; i<SelectedObjects.length; i++)
|
||||||
{
|
{
|
||||||
var content_locked = false;
|
var content_locked = false;
|
||||||
|
@ -138,8 +139,7 @@ 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,
|
var lock_type = (control_props) ? control_props.get_Lock() : Asc.c_oAscSdtLockType.Unlocked;
|
||||||
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;
|
||||||
|
|
||||||
if (value.get_ChartProperties() !== null) {
|
if (value.get_ChartProperties() !== null) {
|
||||||
|
@ -167,6 +167,13 @@ define([
|
||||||
this._settings[Common.Utils.documentSettingsType.Signature].locked = value.get_Locked();
|
this._settings[Common.Utils.documentSettingsType.Signature].locked = value.get_Locked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (control_props) {
|
||||||
|
settingsType = Common.Utils.documentSettingsType.Form;
|
||||||
|
this._settings[settingsType].props = control_props;
|
||||||
|
this._settings[settingsType].locked = false;
|
||||||
|
this._settings[settingsType].hidden = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if ( this._settings[Common.Utils.documentSettingsType.Header].locked ) { // если находимся в locked header/footer, то считаем, что все элементы в нем тоже недоступны
|
if ( this._settings[Common.Utils.documentSettingsType.Header].locked ) { // если находимся в locked header/footer, то считаем, что все элементы в нем тоже недоступны
|
||||||
for (i=0; i<this._settings.length; i++) {
|
for (i=0; i<this._settings.length; i++) {
|
||||||
if (this._settings[i])
|
if (this._settings[i])
|
||||||
|
|
|
@ -172,6 +172,30 @@ define([
|
||||||
this.spnWidth.on('change', this.onWidthChange.bind(this));
|
this.spnWidth.on('change', this.onWidthChange.bind(this));
|
||||||
this.spnWidth.on('inputleave', function(){ me.fireEvent('editcomplete', me);});
|
this.spnWidth.on('inputleave', function(){ me.fireEvent('editcomplete', me);});
|
||||||
|
|
||||||
|
this.btnRemForm = new Common.UI.Button({
|
||||||
|
parentEl: $markup.findById('#form-btn-delete'),
|
||||||
|
cls : 'btn-toolbar',
|
||||||
|
iconCls : 'toolbar__icon btn-remove-duplicates',
|
||||||
|
caption : this.textDelete,
|
||||||
|
style : 'width: 100%;text-align: left;'
|
||||||
|
});
|
||||||
|
this.btnRemForm.on('click', _.bind(function(btn){
|
||||||
|
this.api.asc_RemoveContentControlWrapper(this._state.id);
|
||||||
|
}, this));
|
||||||
|
this.lockedControls.push(this.btnRemForm);
|
||||||
|
|
||||||
|
this.btnLockForm = new Common.UI.Button({
|
||||||
|
parentEl: $markup.findById('#form-btn-lock'),
|
||||||
|
cls : 'btn-toolbar',
|
||||||
|
iconCls : 'toolbar__icon btn-remove-duplicates',
|
||||||
|
caption : this.textLock,
|
||||||
|
style : 'width: 100%;text-align: left;'
|
||||||
|
});
|
||||||
|
this.btnLockForm.on('click', _.bind(function(btn){
|
||||||
|
|
||||||
|
}, this));
|
||||||
|
this.lockedControls.push(this.btnLockForm);
|
||||||
|
|
||||||
this.updateMetricUnit();
|
this.updateMetricUnit();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue