From d94a8b6336f6dfe8dc91c5f4246856754b0b4a7e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 23 Dec 2020 13:39:55 +0300 Subject: [PATCH 1/2] [SSE] Fix translation --- apps/spreadsheeteditor/main/app/view/DataValidationDialog.js | 2 +- apps/spreadsheeteditor/main/locale/en.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/DataValidationDialog.js b/apps/spreadsheeteditor/main/app/view/DataValidationDialog.js index c11fb1599..9dd397c9d 100644 --- a/apps/spreadsheeteditor/main/app/view/DataValidationDialog.js +++ b/apps/spreadsheeteditor/main/app/view/DataValidationDialog.js @@ -630,7 +630,7 @@ define([ 'text!spreadsheeteditor/main/app/template/DataValidationDialog.templ textEndTime: 'End Time', textFormula: 'Formula', textIgnore: 'Ignore blank', - textApply: 'Apply these changes to all othes calls the same settings', + textApply: 'Apply these changes to all other cells with the same settings', textShowDropDown: 'Show drop-down list in cell', textCellSelected: 'When cell is selected, show this input message', textTitle: 'Title', diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index ce894eb3d..af2f76408 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -1552,7 +1552,7 @@ "SSE.Views.DataValidationDialog.strSettings": "Settings", "SSE.Views.DataValidationDialog.textAlert": "Alert", "SSE.Views.DataValidationDialog.textAllow": "Allow", - "SSE.Views.DataValidationDialog.textApply": "Apply these changes to all othes calls the same settings", + "SSE.Views.DataValidationDialog.textApply": "Apply these changes to all other cells with the same settings", "SSE.Views.DataValidationDialog.textCellSelected": "When cell is selected, show this input message", "SSE.Views.DataValidationDialog.textCompare": "Compare to", "SSE.Views.DataValidationDialog.textData": "Data", From 84782593af2ba6e473a061e43cbe63a75d0f57d5 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 23 Dec 2020 13:41:18 +0300 Subject: [PATCH 2/2] [SSE] Fix data validation --- .../main/app/view/DataValidationDialog.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/DataValidationDialog.js b/apps/spreadsheeteditor/main/app/view/DataValidationDialog.js index 9dd397c9d..150b4498b 100644 --- a/apps/spreadsheeteditor/main/app/view/DataValidationDialog.js +++ b/apps/spreadsheeteditor/main/app/view/DataValidationDialog.js @@ -170,9 +170,10 @@ define([ 'text!spreadsheeteditor/main/app/template/DataValidationDialog.templ this.chApply = new Common.UI.CheckBox({ el: $window.find('#data-validation-ch-apply'), - labelText: this.textApply + labelText: this.textApply, + disabled: true }); - // this.chApply.on('change', _.bind(this.onApplyChange, this)); + this.chApply.on('change', _.bind(this.onApplyChange, this)); // input message this.chShowInput = new Common.UI.CheckBox({ @@ -400,6 +401,12 @@ define([ 'text!spreadsheeteditor/main/app/template/DataValidationDialog.templ } }, + onApplyChange: function(field, newValue, oldValue, eOpts) { + if (this.api && !this._noApply) { + this.api.asc_setDataValidation(this.getSettings(), field.getValue()=='checked'); + } + }, + _setDefaults: function (props) { this._noApply = true; if (props) { @@ -409,6 +416,7 @@ define([ 'text!spreadsheeteditor/main/app/template/DataValidationDialog.templ this.chShowDropDown.setValue(!value, true); value = props.asc_getType(); this.cmbAllow.setValue(value!==null ? value : Asc.c_oAscEDataValidationType.None, true); + this.chApply.setDisabled(value===Asc.c_oAscEDataValidationType.None); value = props.asc_getOperator(); this.cmbData.setValue(value!==null ? value : Asc.EDataValidationOperator.Between, true); this.inputRangeMin.setValue(props.asc_getFormula1() ? props.asc_getFormula1().asc_getValue() || '' : '');