From 20ccd6280d83a22f65cbeaf9db4bb4896a23e53e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 28 Feb 2019 13:05:23 +0300 Subject: [PATCH] Fix Bug 40747 --- .../main/lib/view/AdvancedSettingsWindow.js | 16 ++++++++++++++++ .../main/app/view/ImageSettingsAdvanced.js | 4 ++++ .../main/app/view/ShapeSettingsAdvanced.js | 4 ++++ .../main/app/view/ChartSettingsDlg.js | 19 ++----------------- .../main/app/view/ShapeSettingsAdvanced.js | 4 ++++ 5 files changed, 30 insertions(+), 17 deletions(-) diff --git a/apps/common/main/lib/view/AdvancedSettingsWindow.js b/apps/common/main/lib/view/AdvancedSettingsWindow.js index c794ebdee..c269de6e4 100644 --- a/apps/common/main/lib/view/AdvancedSettingsWindow.js +++ b/apps/common/main/lib/view/AdvancedSettingsWindow.js @@ -110,6 +110,22 @@ define([ this.content_panels = $window.find('.settings-panel'); if (this.btnsCategory.length>0) this.btnsCategory[0].toggle(true, true); + + me.menuAddAlign = function(menuRoot, left, top) { + var self = this; + if (!$window.hasClass('notransform')) { + $window.addClass('notransform'); + menuRoot.addClass('hidden'); + setTimeout(function() { + menuRoot.removeClass('hidden'); + menuRoot.css({left: left, top: top}); + self.options.additionalAlign = null; + }, 300); + } else { + menuRoot.css({left: left, top: top}); + self.options.additionalAlign = null; + } + } }, setHeight: function(height) { diff --git a/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js b/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js index 4d9f95fa8..3ea29b372 100644 --- a/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js @@ -994,6 +994,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat }); this.btnBeginStyleMenu = (new Common.UI.Menu({ style: 'min-width: 105px;', + additionalAlign: this.menuAddAlign, items: [ { template: _.template('
') } ] @@ -1020,6 +1021,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat }); this.btnBeginSizeMenu = (new Common.UI.Menu({ style: 'min-width: 160px;', + additionalAlign: this.menuAddAlign, items: [ { template: _.template('
') } ] @@ -1052,6 +1054,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat }); this.btnEndStyleMenu = (new Common.UI.Menu({ style: 'min-width: 105px;', + additionalAlign: this.menuAddAlign, items: [ { template: _.template('
') } ] @@ -1078,6 +1081,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat }); this.btnEndSizeMenu = (new Common.UI.Menu({ style: 'min-width: 160px;', + additionalAlign: this.menuAddAlign, items: [ { template: _.template('
') } ] diff --git a/apps/presentationeditor/main/app/view/ShapeSettingsAdvanced.js b/apps/presentationeditor/main/app/view/ShapeSettingsAdvanced.js index 903103335..2225935f6 100644 --- a/apps/presentationeditor/main/app/view/ShapeSettingsAdvanced.js +++ b/apps/presentationeditor/main/app/view/ShapeSettingsAdvanced.js @@ -337,6 +337,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem }); this.btnBeginStyleMenu = (new Common.UI.Menu({ style: 'min-width: 105px;', + additionalAlign: this.menuAddAlign, items: [ { template: _.template('
') } ] @@ -363,6 +364,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem }); this.btnBeginSizeMenu = (new Common.UI.Menu({ style: 'min-width: 160px;', + additionalAlign: this.menuAddAlign, items: [ { template: _.template('
') } ] @@ -395,6 +397,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem }); this.btnEndStyleMenu = (new Common.UI.Menu({ style: 'min-width: 105px;', + additionalAlign: this.menuAddAlign, items: [ { template: _.template('
') } ] @@ -421,6 +424,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem }); this.btnEndSizeMenu = (new Common.UI.Menu({ style: 'min-width: 160px;', + additionalAlign: this.menuAddAlign, items: [ { template: _.template('
') } ] diff --git a/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js b/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js index 684a8d6f9..2e82f80d8 100644 --- a/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js +++ b/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js @@ -111,27 +111,12 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' // Layout - var menuAddAlign = function(menuRoot, left, top) { - var self = this; - if (!$window.hasClass('notransform')) { - $window.addClass('notransform'); - menuRoot.addClass('hidden'); - setTimeout(function() { - menuRoot.removeClass('hidden'); - menuRoot.css({left: left, top: top}); - self.options.additionalAlign = null; - }, 500); - } else { - menuRoot.css({left: left, top: top}); - self.options.additionalAlign = null; - } - }; this.btnChartType = new Common.UI.Button({ cls : 'btn-large-dataview', iconCls : 'item-chartlist bar-normal', menu : new Common.UI.Menu({ style: 'width: 435px; padding-top: 12px;', - additionalAlign: menuAddAlign, + additionalAlign: this.menuAddAlign, items: [ { template: _.template('') } ] @@ -792,7 +777,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' iconCls : 'item-chartlist spark-column', menu : new Common.UI.Menu({ style: 'width: 200px; padding-top: 12px;', - additionalAlign: menuAddAlign, + additionalAlign: this.menuAddAlign, items: [ { template: _.template('') } ] diff --git a/apps/spreadsheeteditor/main/app/view/ShapeSettingsAdvanced.js b/apps/spreadsheeteditor/main/app/view/ShapeSettingsAdvanced.js index 686dadce3..9771c72ab 100644 --- a/apps/spreadsheeteditor/main/app/view/ShapeSettingsAdvanced.js +++ b/apps/spreadsheeteditor/main/app/view/ShapeSettingsAdvanced.js @@ -357,6 +357,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp }); this.btnBeginStyleMenu = (new Common.UI.Menu({ style: 'min-width: 105px;', + additionalAlign: this.menuAddAlign, items: [ { template: _.template('
') } ] @@ -383,6 +384,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp }); this.btnBeginSizeMenu = (new Common.UI.Menu({ style: 'min-width: 160px;', + additionalAlign: this.menuAddAlign, items: [ { template: _.template('
') } ] @@ -415,6 +417,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp }); this.btnEndStyleMenu = (new Common.UI.Menu({ style: 'min-width: 105px;', + additionalAlign: this.menuAddAlign, items: [ { template: _.template('
') } ] @@ -441,6 +444,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp }); this.btnEndSizeMenu = (new Common.UI.Menu({ style: 'min-width: 160px;', + additionalAlign: this.menuAddAlign, items: [ { template: _.template('
') } ]