mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 22:30:56 +08:00
Add controls to common list
This commit is contained in:
@ -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) {
|
||||
|
||||
@ -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;
|
||||
},
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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;
|
||||
},
|
||||
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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));
|
||||
},
|
||||
|
||||
|
||||
@ -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;
|
||||
},
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
},
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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));
|
||||
},
|
||||
|
||||
|
||||
@ -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));
|
||||
},
|
||||
|
||||
|
||||
@ -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));
|
||||
},
|
||||
|
||||
|
||||
@ -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;
|
||||
},
|
||||
|
||||
@ -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));
|
||||
},
|
||||
|
||||
|
||||
@ -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));
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user