From 58c2a2ff7b731d15b28f515e61902abdcfb0cc79 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 11 Mar 2021 20:52:32 +0300 Subject: [PATCH] [SSE] Refactoring --- .../app/template/FormatRulesEditDlg.template | 212 +++++++++++++++++ .../main/app/view/FormatRulesEditDlg.js | 221 +----------------- 2 files changed, 217 insertions(+), 216 deletions(-) create mode 100644 apps/spreadsheeteditor/main/app/template/FormatRulesEditDlg.template diff --git a/apps/spreadsheeteditor/main/app/template/FormatRulesEditDlg.template b/apps/spreadsheeteditor/main/app/template/FormatRulesEditDlg.template new file mode 100644 index 000000000..cb6411f36 --- /dev/null +++ b/apps/spreadsheeteditor/main/app/template/FormatRulesEditDlg.template @@ -0,0 +1,212 @@ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+ +
+
+
+
+ +
+
+
+
+
+ + +
+
+
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js b/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js index 008020c71..85ab6e805 100644 --- a/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js +++ b/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js @@ -39,11 +39,11 @@ * */ -define([ +define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template', 'common/main/lib/view/AdvancedSettingsWindow', 'common/main/lib/component/ComboBox', 'common/main/lib/component/InputField' -], function () { +], function (contentTemplate) { 'use strict'; SSE.Views = SSE.Views || {}; @@ -62,218 +62,7 @@ define([ title: this.txtTitleNew, template: [ '
', - '
', - '
', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '
', - '
', - '', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '', - '
', - '
', - '
', - '
', - '
', - '
','
', - '
','
', - '
','
', - '
', - '
', - '', - '
', - '
', - '', - '
', - '
', - '
', - '
', - '
', - '', - '
', - '
', - '
', - '
', - '
', - '', - '
', - '
', - '
', - '
', - '
', - '', - '
', - '
', - '
', - '
', - '
', - '', - '
', - '
', - '
', - '
', - '
', - '', - '
', - '
', - '
', - '
', - '', - '
', - '
', - '
', - '
', - '', - '
', - '
', - '', - '
', - '
', - '', - '
', - '
', - '
', - '', - '
', - '
', - '
', - '
', - '
', - '', - '
', - '
', - '', - '
', - '
', - '
', - '', - '
', - '
', - '
', - '
', - '
', - '', - '
', - '
', - '
', - '
', - '
', - '', - '', - '
', - '
', - '
', - '
', - '', - '
', - '
', - '
', - '
', - '
', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '
', - '', - '
', - '
', - '
', - '', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '
', - '', - '', - '', - '
', - '
', - '
', - '
', + '
' + _.template(contentTemplate)({scope: this}) + '
', '
', '
' ].join('') @@ -818,7 +607,7 @@ define([ this.cmbNumberFormat = new Common.UI.ComboBox({ el : $('#format-rules-edit-combo-num-format'), cls : 'input-group-nr', - style : 'width: 111px;', + style : 'width: 113px;', menuStyle : 'min-width: 100%;max-height: 211px;', hint : this.tipNumFormat, itemsTemplate: formatTemplate, @@ -1655,7 +1444,7 @@ define([ this.cmbPercent.setVisible(category==1); this.numRank.setVisible(category==1); - this.txtRange1.cmpEl.width(category==11 ? 305 : 150); + this.txtRange1.cmpEl.width(category==11 ? 310 : 150); this.$window.find('.scale').toggleClass('hidden', category<7 || category>8); if (category==7 || category==8) {