Add controls to common list

This commit is contained in:
Julia Radzhabova
2024-08-01 19:23:43 +03:00
parent 328b0cc362
commit b89bc06265
16 changed files with 21 additions and 16 deletions

View File

@ -3679,6 +3679,7 @@ define([
}
Array.prototype.push.apply(this.toolbar.paragraphControls, this.btnsComment);
Array.prototype.push.apply(this.toolbar.lockControls, this.btnsComment);
Common.UI.LayoutManager.addControls(this.btnsComment);
}
(new Promise(function(accept) {

View File

@ -303,7 +303,7 @@ define([
dataHintOffset: '-16, 0'
});
me.lockedControls.push(me.cmbInsertShape);
Common.UI.LayoutManager.addControls(me.lockedControls);
Common.Utils.lockControls(_set.disableOnStart, true, {array: this.lockedControls});
},
@ -345,6 +345,7 @@ define([
var created = this.btnsInsertImage.concat(this.btnsInsertText, this.btnsInsertShape, this.btnsAddPage);
Common.Utils.lockControls(Common.enumLock.disableOnStart, true, {array: created});
Array.prototype.push.apply(this.lockedControls, created);
Common.UI.LayoutManager.addControls(created);
return this.$el;
},

View File

@ -758,7 +758,7 @@ define([
}),
});
arr.push(this.btnRotatePage);
Common.UI.LayoutManager.addControls(arr);
return arr;
},
@ -1153,6 +1153,7 @@ define([
// Disable all components before load document
this.lockControls = me.toolbarControls.concat(me.paragraphControls).concat(me.shapeControls);
Common.UI.LayoutManager.addControls(this.lockControls);
this.lockToolbar(Common.enumLock.disableOnStart, true, {array: this.lockControls});
this.on('render:after', _.bind(this.onToolbarAfterRender, this));

View File

@ -242,7 +242,7 @@ define([
dataHintOffset: 'small'
});
this.lockedControls.push(this.chRightMenu);
Common.UI.LayoutManager.addControls(this.lockedControls);
Common.Utils.lockControls(_set.disableOnStart, true, {array: this.lockedControls});
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
},
@ -308,7 +308,7 @@ define([
var created = this.btnsFitToPage.concat(this.btnsFitToWidth).concat(this.cmbsZoom);
Common.Utils.lockControls(Common.enumLock.disableOnStart, true, {array: created});
Array.prototype.push.apply(this.lockedControls, created);
Common.UI.LayoutManager.addControls(created);
return this.$el;
},

View File

@ -2839,6 +2839,7 @@ define([
if ( this.btnsComment.length ) {
var _comments = PE.getController('Common.Controllers.Comments').getView();
Array.prototype.push.apply(me.toolbar.lockControls, this.btnsComment);
Common.UI.LayoutManager.addControls(this.btnsComment);
this.btnsComment.forEach(function (btn) {
btn.updateHint( _comments.textHintAddComment );
btn.on('click', function (btn, e) {

View File

@ -468,7 +468,7 @@ define([
dataHintOffset: 'medium'
});
this.lockedControls.push(this.btnMoveLater);
Common.UI.LayoutManager.addControls(this.lockedControls);
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
},

View File

@ -1223,7 +1223,7 @@ define([
this.btnInsertEquation, this.btnInsertSymbol, this.btnInsertHyperlink, this.btnColorSchemas, this.btnSlideSize, this.listTheme, this.mnuShowSettings, this.cmbInsertShape,
this.btnInsertPlaceholder, this.chTitle, this.chFooters
];
Common.UI.LayoutManager.addControls(this.lockControls);
// Disable all components before load document
_.each([me.btnSave]
.concat(me.paragraphControls),
@ -1391,7 +1391,7 @@ define([
Array.prototype.push.apply(this.slideOnlyControls, created);
Array.prototype.push.apply(this.lockControls, created);
Common.UI.LayoutManager.addControls(created);
this.btnPrint.menu && this.btnPrint.$el.addClass('split');
return $host;
},

View File

@ -278,7 +278,7 @@ define([
dataHintOffset: 'small'
});
this.lockedControls.push(this.chDelay);
Common.UI.LayoutManager.addControls(this.lockedControls);
Common.Utils.lockControls(Common.enumLock.disableOnStart, true, {array: this.lockedControls});
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));

View File

@ -374,7 +374,7 @@ define([
dataHintOffset: 'small'
});
this.lockedControls.push(this.chLeftMenu);
Common.UI.LayoutManager.addControls(this.lockedControls);
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
},

View File

@ -4697,6 +4697,7 @@ define([
this.btnsComment.add(_comments.buttonAddNew);
}
Array.prototype.push.apply(me.toolbar.lockControls, this.btnsComment);
Common.UI.LayoutManager.addControls(this.btnsComment);
}
}

View File

@ -290,7 +290,7 @@ define([
[_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleDelFilter, _set.wsLock, _set.userProtected], undefined, undefined, undefined, '1', 'bottom', undefined, 'N');
Array.prototype.push.apply(this.lockedControls, this.btnsSortDown.concat(this.btnsSortUp, this.btnsSetAutofilter,this.btnsClearAutofilter));
Common.UI.LayoutManager.addControls(this.lockedControls);
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
},

View File

@ -402,7 +402,7 @@ define([
dataHintOffset: 'medium'
});
this.lockedControls.push(this.btnShowFormulas);
Common.UI.LayoutManager.addControls(this.lockedControls);
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
},

View File

@ -359,7 +359,7 @@ define([
dataHintOffset: '-16, 0'
});
this.lockedControls.push(this.pivotStyles);
Common.UI.LayoutManager.addControls(this.btnsAddPivot.concat(this.lockedControls));
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
},

View File

@ -2239,7 +2239,7 @@ define([
cmp.setDisabled(true);
});
this.lockToolbar(Common.enumLock.disableOnStart, true, {array: [me.btnPrint]});
Common.UI.LayoutManager.addControls(me.lockControls.concat([me.btnSave]));
this.on('render:after', _.bind(this.onToolbarAfterRender, this));
}
return this;
@ -2448,7 +2448,7 @@ define([
this.btnsEditHeader = Common.Utils.injectButtons($host.find('.slot-editheader'), 'tlbtn-editheader-', 'toolbar__icon btn-editheader', this.capBtnInsHeader,
[Common.enumLock.editCell, Common.enumLock.selRangeEdit, Common.enumLock.headerLock, Common.enumLock.lostConnect, Common.enumLock.coAuth], undefined, undefined, undefined, '1', 'bottom', 'small');
Array.prototype.push.apply(this.lockControls, this.btnsEditHeader);
Common.UI.LayoutManager.addControls(this.btnsEditHeader);
this.btnPrint && this.btnPrint.menu && this.btnPrint.$el.addClass('split');
return $host;
},

View File

@ -375,7 +375,7 @@ define([
dataHintOffset: 'small'
});
this.lockedControls.push(this.chLeftMenu);
Common.UI.LayoutManager.addControls(this.lockedControls);
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
},

View File

@ -200,7 +200,7 @@ define([
visible: !this.appConfig.isOffline
});
this.lockedControls.push(this.btnProtectRange);
Common.UI.LayoutManager.addControls(this.lockedControls);
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
},