From c8e5f8e08689f243f0edf3a555f0c2048e0cf718 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 4 May 2021 12:24:14 +0300 Subject: [PATCH 1/3] [SSE] Fix changing chart type --- apps/spreadsheeteditor/main/app/controller/Toolbar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index a18cf0a61..73e319f5c 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -1092,7 +1092,7 @@ define([ var range = props.getRange(), isvalid = (!_.isEmpty(range)) ? me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, range, true, props.getInRows(), props.getType()) : Asc.c_oAscError.ID.No; if (isvalid == Asc.c_oAscError.ID.No) { - (ischartedit) ? me.api.asc_editChartDrawingObject(props) : me.api.asc_addChartDrawingObject(props); + !ischartedit && me.api.asc_addChartDrawingObject(props); } else { var msg = me.txtInvalidRange; switch (isvalid) { From dd0b1708f7392ffa469ea476f9ef6414e1cca703 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 4 May 2021 13:30:14 +0300 Subject: [PATCH 2/3] Fix password dialog --- apps/common/main/lib/view/PasswordDialog.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/common/main/lib/view/PasswordDialog.js b/apps/common/main/lib/view/PasswordDialog.js index 605591a61..29ed080c1 100644 --- a/apps/common/main/lib/view/PasswordDialog.js +++ b/apps/common/main/lib/view/PasswordDialog.js @@ -116,13 +116,12 @@ define([ } }, - show: function() { - Common.UI.Window.prototype.show.apply(this, arguments); + getFocusedComponents: function() { + return [this.inputPwd, this.repeatPwd]; + }, - var me = this; - setTimeout(function(){ - me.inputPwd.cmpEl.find('input').focus(); - }, 500); + getDefaultFocusableComponent: function () { + return this.inputPwd; }, onPrimary: function(event) { From 971be036f232e2ed5b16ec961580de39373a2124 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 4 May 2021 14:08:26 +0300 Subject: [PATCH 3/3] [SSE] Fix Bug 50175 --- .../main/app/view/ChartSettingsDlg.js | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js b/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js index aff7389e1..f3efb5252 100644 --- a/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js +++ b/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js @@ -260,6 +260,12 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' this.chVertHide = []; this.btnVFormat = []; + this._arrVertTitle = [ + {value: Asc.c_oAscChartVertAxisLabelShowSettings.none, displayValue: me.textNone}, + {value: Asc.c_oAscChartVertAxisLabelShowSettings.rotated, displayValue: me.textRotated}, + {value: Asc.c_oAscChartVertAxisLabelShowSettings.horizontal, displayValue: me.textHorizontal} + ]; + var addControlsV = function(i) { me.chVertHide[i] = new Common.UI.CheckBox({ el: $('#chart-dlg-chk-vert-hide-' + i), @@ -274,11 +280,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' menuStyle: 'min-width: 140px;', editable: false, cls: 'input-group-nr', - data: [ - {value: Asc.c_oAscChartVertAxisLabelShowSettings.none, displayValue: me.textNone}, - {value: Asc.c_oAscChartVertAxisLabelShowSettings.rotated, displayValue: me.textRotated}, - {value: Asc.c_oAscChartVertAxisLabelShowSettings.horizontal, displayValue: me.textHorizontal} - ], + data: me._arrVertTitle, takeFocusOnClose: true }).on('selected', _.bind(function (combo, record) { if (me.currentAxisProps[i]) @@ -535,6 +537,11 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' this.chHorHide = []; this.btnHFormat = []; + this._arrHorTitle = [ + {value: Asc.c_oAscChartHorAxisLabelShowSettings.none, displayValue: me.textNone}, + {value: Asc.c_oAscChartHorAxisLabelShowSettings.noOverlay, displayValue: me.textNoOverlay} + ]; + var addControlsH = function(i) { me.chHorHide[i] = new Common.UI.CheckBox({ el: $('#chart-dlg-chk-hor-hide-' + i), @@ -549,10 +556,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' menuStyle: 'min-width: 140px;', editable: false, cls: 'input-group-nr', - data: [ - {value: Asc.c_oAscChartHorAxisLabelShowSettings.none, displayValue: me.textNone}, - {value: Asc.c_oAscChartHorAxisLabelShowSettings.noOverlay, displayValue: me.textNoOverlay} - ], + data: me._arrHorTitle, takeFocusOnClose: true }).on('selected', _.bind(function (combo, record) { if (me.currentAxisProps[i]) @@ -1192,14 +1196,14 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' }, onVCategoryClick: function(index) { - (this.vertAxisProps[index].getAxisType()==Asc.c_oAscAxisType.val) ? this.fillVProps(this.vertAxisProps[index], index) : this.fillHProps(this.vertAxisProps[index], index); + (this.vertAxisProps[index].getAxisType()==Asc.c_oAscAxisType.val) ? this.fillVProps(this.vertAxisProps[index], index) : this.fillHProps(this.vertAxisProps[index], index, true); }, onHCategoryClick: function(index) { - (this.horAxisProps[index].getAxisType()==Asc.c_oAscAxisType.val) ? this.fillVProps(this.horAxisProps[index], index) : this.fillHProps(this.horAxisProps[index], index); + (this.horAxisProps[index].getAxisType()==Asc.c_oAscAxisType.val) ? this.fillVProps(this.horAxisProps[index], index, true) : this.fillHProps(this.horAxisProps[index], index); }, - fillVProps: function(props, index) { + fillVProps: function(props, index, hor) { if (props.getAxisType() !== Asc.c_oAscAxisType.val) return; if (this._originalAxisVValues==undefined) this._originalAxisVValues = []; @@ -1213,6 +1217,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' this.chVertHide[index].setValue(!props.getShow()); this.cmbVertGrid[index].setValue(props.getGridlines()); + + + this.cmbVertTitle[index].setData(hor ? this._arrHorTitle : this._arrVertTitle); this.cmbVertTitle[index].setValue(props.getLabel()); this.cmbMinType[index].setValue(props.getMinValRule()); @@ -1250,7 +1257,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' this.currentAxisProps[index] = props; }, - fillHProps: function(props, index) { + fillHProps: function(props, index, vert) { if (props.getAxisType() !== Asc.c_oAscAxisType.cat) return; if (this._originalAxisHValues==undefined) this._originalAxisHValues = []; @@ -1264,6 +1271,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' this.chHorHide[index].setValue(!props.getShow()); this.cmbHorGrid[index].setValue(props.getGridlines()); + + this.cmbHorTitle[index].setData(vert ? this._arrVertTitle : this._arrHorTitle); this.cmbHorTitle[index].setValue(props.getLabel()); var value = props.getCrossesRule();