[PE] Refactoring lock on loading
This commit is contained in:
parent
ccb74fe46a
commit
6e170edc33
|
@ -208,6 +208,9 @@ define([
|
||||||
|
|
||||||
me.trigger('render:after', me);
|
me.trigger('render:after', me);
|
||||||
}
|
}
|
||||||
|
if (this.disabled) {
|
||||||
|
this.setDisabled(!!this.disabled);
|
||||||
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
|
@ -2415,6 +2415,8 @@ define([
|
||||||
var transitController = me.getApplication().getController('Transitions');
|
var transitController = me.getApplication().getController('Transitions');
|
||||||
transitController.setApi(me.api).setConfig({toolbar: me,mode:config}).createToolbarPanel();
|
transitController.setApi(me.api).setConfig({toolbar: me,mode:config}).createToolbarPanel();
|
||||||
Array.prototype.push.apply(me.toolbar.lockControls,transitController.getView().getButtons());
|
Array.prototype.push.apply(me.toolbar.lockControls,transitController.getView().getButtons());
|
||||||
|
Array.prototype.push.apply(me.toolbar.slideOnlyControls,transitController.getView().getButtons());
|
||||||
|
|
||||||
me.toolbar.btnSave.on('disabled', _.bind(me.onBtnChangeState, me, 'save:disabled'));
|
me.toolbar.btnSave.on('disabled', _.bind(me.onBtnChangeState, me, 'save:disabled'));
|
||||||
|
|
||||||
if (!(config.customization && config.customization.compactHeader)) {
|
if (!(config.customization && config.customization.compactHeader)) {
|
||||||
|
|
|
@ -135,12 +135,10 @@ define([
|
||||||
itemWidth: 87,
|
itemWidth: 87,
|
||||||
itemHeight: 40,
|
itemHeight: 40,
|
||||||
enableKeyEvents: true,
|
enableKeyEvents: true,
|
||||||
disabled:true,
|
|
||||||
lock:[_set.slideDeleted,_set.noSlides,_set.disableOnStart,_set.transitLock],
|
lock:[_set.slideDeleted,_set.noSlides,_set.disableOnStart,_set.transitLock],
|
||||||
beforeOpenHandler: function (e) {
|
beforeOpenHandler: function (e) {
|
||||||
var cmp = this,
|
var cmp = this,
|
||||||
menu = cmp.openButton.menu//,
|
menu = cmp.openButton.menu;
|
||||||
//minMenuColumn = 3;
|
|
||||||
|
|
||||||
if (menu.cmpEl) {
|
if (menu.cmpEl) {
|
||||||
|
|
||||||
|
@ -179,7 +177,6 @@ define([
|
||||||
cls: 'btn-toolbar ',// x-huge icon-top',
|
cls: 'btn-toolbar ',// x-huge icon-top',
|
||||||
caption: this.txtPreview,
|
caption: this.txtPreview,
|
||||||
split: false,
|
split: false,
|
||||||
disabled:true,
|
|
||||||
iconCls: 'toolbar__icon btn-preview',
|
iconCls: 'toolbar__icon btn-preview',
|
||||||
lock:[_set.slideDeleted,_set.noSlides,_set.disableOnStart,_set.transitLock]
|
lock:[_set.slideDeleted,_set.noSlides,_set.disableOnStart,_set.transitLock]
|
||||||
});
|
});
|
||||||
|
@ -189,7 +186,6 @@ define([
|
||||||
cls: 'btn-toolbar x-huge icon-top',
|
cls: 'btn-toolbar x-huge icon-top',
|
||||||
caption: this.txtParametrs,
|
caption: this.txtParametrs,
|
||||||
iconCls: 'toolbar__icon icon btn-insertshape',
|
iconCls: 'toolbar__icon icon btn-insertshape',
|
||||||
disabled:true,
|
|
||||||
menu: new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
maxHeight:115,
|
maxHeight:115,
|
||||||
items: this.createParametrsMenuItems()}),
|
items: this.createParametrsMenuItems()}),
|
||||||
|
@ -201,7 +197,6 @@ define([
|
||||||
cls: 'btn-toolbar',
|
cls: 'btn-toolbar',
|
||||||
caption: this.txtApplyToAll,
|
caption: this.txtApplyToAll,
|
||||||
split: true,
|
split: true,
|
||||||
disabled:true,
|
|
||||||
iconCls: 'toolbar__icon btn-changeslide',
|
iconCls: 'toolbar__icon btn-changeslide',
|
||||||
lock:[_set.slideDeleted,_set.noSlides,_set.disableOnStart,_set.transitLock]
|
lock:[_set.slideDeleted,_set.noSlides,_set.disableOnStart,_set.transitLock]
|
||||||
});
|
});
|
||||||
|
@ -215,7 +210,6 @@ define([
|
||||||
defaultUnit : this.txtSec,
|
defaultUnit : this.txtSec,
|
||||||
maxValue: 300,
|
maxValue: 300,
|
||||||
minValue: 0,
|
minValue: 0,
|
||||||
disabled: true,
|
|
||||||
lock:[_set.slideDeleted,_set.noSlides,_set.disableOnStart,_set.transitLock]
|
lock:[_set.slideDeleted,_set.noSlides,_set.disableOnStart,_set.transitLock]
|
||||||
});
|
});
|
||||||
this.lockedControls.push(this.numDuration);
|
this.lockedControls.push(this.numDuration);
|
||||||
|
@ -228,7 +222,6 @@ define([
|
||||||
defaultUnit : this.txtSec,
|
defaultUnit : this.txtSec,
|
||||||
maxValue: 300,
|
maxValue: 300,
|
||||||
minValue: 0,
|
minValue: 0,
|
||||||
disabled: true,
|
|
||||||
lock:[_set.slideDeleted,_set.noSlides,_set.disableOnStart,_set.transitLock]
|
lock:[_set.slideDeleted,_set.noSlides,_set.disableOnStart,_set.transitLock]
|
||||||
});
|
});
|
||||||
this.lockedControls.push(this.numDelay);
|
this.lockedControls.push(this.numDelay);
|
||||||
|
@ -236,19 +229,19 @@ define([
|
||||||
this.chStartOnClick = new Common.UI.CheckBox({
|
this.chStartOnClick = new Common.UI.CheckBox({
|
||||||
el: this.$el.find('#transit-checkbox-startonclick'),
|
el: this.$el.find('#transit-checkbox-startonclick'),
|
||||||
labelText: this.strStartOnClick,
|
labelText: this.strStartOnClick,
|
||||||
disabled:true,
|
|
||||||
lock:[_set.slideDeleted,_set.noSlides,_set.disableOnStart,_set.transitLock]
|
lock:[_set.slideDeleted,_set.noSlides,_set.disableOnStart,_set.transitLock]
|
||||||
})
|
});
|
||||||
this.lockedControls.push(this.chStartOnClick);
|
this.lockedControls.push(this.chStartOnClick);
|
||||||
|
|
||||||
this.chDelay = new Common.UI.CheckBox({
|
this.chDelay = new Common.UI.CheckBox({
|
||||||
el: this.$el.find('#transit-checkbox-delay'),
|
el: this.$el.find('#transit-checkbox-delay'),
|
||||||
labelText: this.strDelay,
|
labelText: this.strDelay,
|
||||||
disabled:true,
|
|
||||||
lock:[_set.slideDeleted,_set.noSlides,_set.disableOnStart,_set.transitLock]
|
lock:[_set.slideDeleted,_set.noSlides,_set.disableOnStart,_set.transitLock]
|
||||||
});
|
});
|
||||||
this.lockedControls.push(this.chDelay);
|
this.lockedControls.push(this.chDelay);
|
||||||
|
|
||||||
|
Common.Utils.lockControls(PE.enumLock.disableOnStart, true, {array: this.lockedControls});
|
||||||
|
|
||||||
this.$el.find('#transit-duration').text(this.strDuration);
|
this.$el.find('#transit-duration').text(this.strDuration);
|
||||||
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue