From e27547b24085d162d76b17e36054993a68211a55 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 3 Mar 2021 22:50:19 +0300 Subject: [PATCH] [SSE] Refactoring cond. formatting --- .../main/app/view/FormatRulesEditDlg.js | 14 +++++++------- .../main/app/view/FormatRulesManagerDlg.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js b/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js index 9dd6878b5..e57704003 100644 --- a/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js +++ b/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js @@ -1193,12 +1193,12 @@ define([ menuStyle : 'min-width: 100%;', editable : false, cls : 'input-group-nr', - data : [{value: 0, displayValue: '>=', prevOp: '<'}, {value: 1, displayValue: '>', prevOp: '<='}], + data : [{value: true, displayValue: '>=', prevOp: '<'}, {value: false, displayValue: '>', prevOp: '<='}], type : i }).on('selected', function(combo, record) { me.fillIconsLabels(); }); - combo.setValue(0); + combo.setValue(1); this.iconsControls[i].cmbOperator = combo; var range = new Common.UI.InputFieldBtn({ @@ -1554,6 +1554,7 @@ define([ value = new AscCommonExcel.CConditionalFormatValueObject(); value.asc_setType(controls.cmbType.getValue()); value.asc_setVal(controls.value.getValue()); + value.asc_setGte(controls.cmbOperator.getValue()); values.push(value); if (icons) { this.iconsProps.isReverse ? icons.unshift(controls.pickerIcons.getSelectedRec().get('value')+1) : icons.push(controls.pickerIcons.getSelectedRec().get('value')+1); @@ -1905,11 +1906,10 @@ define([ var arr = this.iconsControls; for (var i=0; i0) { this.cmbIconsPresets.setValue(this.textCustom); diff --git a/apps/spreadsheeteditor/main/app/view/FormatRulesManagerDlg.js b/apps/spreadsheeteditor/main/app/view/FormatRulesManagerDlg.js index 89d93375a..1e98c5e07 100644 --- a/apps/spreadsheeteditor/main/app/view/FormatRulesManagerDlg.js +++ b/apps/spreadsheeteditor/main/app/view/FormatRulesManagerDlg.js @@ -691,7 +691,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesManagerDlg.templa }, onKeyDown: function (lisvView, record, e) { - if (e.keyCode==Common.UI.Keys.DELETE && !this.btnDelete.isDisabled()) + if (e.keyCode==Common.UI.Keys.DELETE && !this.btnDelete.isDisabled() && !/form-control/.test(e.target.className)) this.onDeleteRule(); },