Refactoring

This commit is contained in:
Julia Radzhabova
2024-08-11 13:58:41 +03:00
parent 6aff0d143a
commit 0a025d3d4e
4 changed files with 14 additions and 7 deletions

View File

@ -1441,8 +1441,7 @@ define([
clearInterval(timer_sl);
toolbarController.createDelayedElements();
// documentHolderController.getView().createDelayedElements();
documentHolderController.getView().createDelayedElements();
me.setLanguages();
var shapes = me.api.asc_getPropertyEditorShapes();
@ -1470,8 +1469,7 @@ define([
me.api.UpdateInterfaceState();
}
}
// documentHolderController.getView().createDelayedElementsViewer();
documentHolderController.getView().createDelayedElementsViewer();
toolbarController.createDelayedElementsViewer();
Common.Utils.injectSvgIcons();
Common.NotificationCenter.trigger('document:ready', 'main');

View File

@ -39,6 +39,7 @@ define([], function () {
dh.createDelayedElements = function() {
var me = this;
if (me.menuInsertCaption || !window.styles_loaded) return; // menu is already inited or editor styles are not loaded
me.menuInsertCaption = new Common.UI.MenuItem({
caption : me.txtInsertCaption
});
@ -2001,6 +2002,8 @@ define([], function () {
dh.createDelayedElementsViewer = function() {
var me = this;
if (me.menuViewCopy) return; // menu is already inited
me.menuViewCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption: me.textCopy,
@ -2131,6 +2134,8 @@ define([], function () {
dh.createDelayedElementsPDFViewer = function() {
var me = this;
if (me.menuPDFViewCopy) return; // menu is already inited
me.menuPDFViewCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption: me.textCopy,
@ -2162,6 +2167,8 @@ define([], function () {
dh.createDelayedElementsPDFForms = function() {
var me = this;
if (me.menuPDFFormsCopy) return; // menu is already inited
me.menuPDFFormsCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption: me.textCopy,

View File

@ -1086,8 +1086,7 @@ define([
clearInterval(timer_sl);
Common.NotificationCenter.trigger('comments:updatefilter', ['doc', 'sheet' + me.api.asc_getActiveWorksheetId()]);
// documentHolderView.createDelayedElements();
documentHolderView.createDelayedElements();
toolbarController.createDelayedElements();
// me.setLanguages();
@ -1122,7 +1121,7 @@ define([
} else {
var formulasDlgController = application.getController('FormulaDialog');
formulasDlgController && formulasDlgController.setMode(me.appOptions).setApi(me.api);
// documentHolderView.createDelayedElementsViewer();
documentHolderView.createDelayedElementsViewer();
Common.Utils.injectSvgIcons();
Common.NotificationCenter.trigger('document:ready', 'main');
me.applyLicense();

View File

@ -39,6 +39,8 @@ define([], function () {
dh.createDelayedElementsViewer = function() {
var me = this;
if (me.menuViewCopy) return; // menu is already inited
me.menuViewCopy = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-copy',
caption: me.txtCopy,
@ -96,6 +98,7 @@ define([], function () {
dh.createDelayedElements = function() {
var me = this;
if (me.pmiCut || !(window.styles_loaded || me.mode.isEditDiagram || me.mode.isEditMailMerge || me.mode.isEditOle)) return; // menu is already inited or editor styles are not loaded
me.pmiCut = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-cut',
caption : me.txtCut,