From 48d244a51340c0ef66c097dd376d667d94eb882b Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 5 Dec 2016 11:47:45 +0300 Subject: [PATCH 1/2] [SSE] Fix Bug 33598. --- .../main/app/view/ChartSettingsDlg.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js b/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js index f3ed54337..51c240162 100644 --- a/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js +++ b/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js @@ -1263,8 +1263,6 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' var changed = false, value = this.cmbEmptyCells.getValue(); if (rawData.type !== Asc.c_oAscSparklineType.Line && this._arrEmptyCells.length>2) { - if (value == Asc.c_oAscEDispBlanksAs.Span) - value = Asc.c_oAscEDispBlanksAs.Gap; this._arrEmptyCells.pop(); changed = true; } else if (rawData.type == Asc.c_oAscSparklineType.Line && this._arrEmptyCells.length<3) { @@ -1273,9 +1271,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' } if (changed) { this.cmbEmptyCells.setData(this._arrEmptyCells); - this.cmbEmptyCells.setValue(value); - if (this._changedProps) - this._changedProps.asc_setDisplayEmpty(value); + this.cmbEmptyCells.setValue((rawData.type !== Asc.c_oAscSparklineType.Line && value==Asc.c_oAscEDispBlanksAs.Span) ? this.textEmptyLine : value); } this.updateSparkStyles(this.chartSettings.asc_getStyles()); @@ -1360,7 +1356,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' if (this._state.SparkType !== Asc.c_oAscSparklineType.Line) this._arrEmptyCells.pop(); this.cmbEmptyCells.setData(this._arrEmptyCells); - this.cmbEmptyCells.setValue(props.asc_getDisplayEmpty()); + + var value = props.asc_getDisplayEmpty(); + this.cmbEmptyCells.setValue((this._state.SparkType !== Asc.c_oAscSparklineType.Line && value==Asc.c_oAscEDispBlanksAs.Span) ? this.textEmptyLine : value); this.chShowEmpty.setValue(props.asc_getDisplayHidden(), true); this.chShowAxis.setValue(props.asc_getDisplayXAxis(), true); From dd1a531707d5687b89f8c1862d9f040d5526d5de Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 5 Dec 2016 17:08:58 +0300 Subject: [PATCH 2/2] Fix Bug 33597 (+ disable clicking on btnCancel when frame is loading). --- apps/common/main/lib/view/ExternalDiagramEditor.js | 2 +- apps/common/main/resources/less/buttons.less | 8 ++++---- apps/spreadsheeteditor/main/app/controller/Main.js | 10 ++++++++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/apps/common/main/lib/view/ExternalDiagramEditor.js b/apps/common/main/lib/view/ExternalDiagramEditor.js index f1dc2ccc5..6d3edd310 100644 --- a/apps/common/main/lib/view/ExternalDiagramEditor.js +++ b/apps/common/main/lib/view/ExternalDiagramEditor.js @@ -62,7 +62,7 @@ define([ '
', '' ].join(''); diff --git a/apps/common/main/resources/less/buttons.less b/apps/common/main/resources/less/buttons.less index 492ba1a13..cac8a3afc 100644 --- a/apps/common/main/resources/less/buttons.less +++ b/apps/common/main/resources/less/buttons.less @@ -454,8 +454,8 @@ color: @gray-deep; background-color: @secondary; - &:hover, - &.hover { + &:hover:not(.disabled), + &.hover:not(.disabled) { background-color: @secondary-hover; } @@ -463,8 +463,8 @@ color: #fff; background-color: @primary; - &:hover, - &.hover { + &:hover:not(.disabled), + &.hover:not(.disabled) { background-color: @primary-hover; } } diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 3a341caca..c7d8a382b 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -158,7 +158,7 @@ define([ var me = this; // Syncronize focus with api $(document.body).on('focus', 'input, textarea:not(#ce-cell-content)', function(e) { - if (this.isAppDisabled === true) return; + if (me.isAppDisabled === true) return; if (e && e.target && !/area_id/.test(e.target.id)) { if (/msg-reply/.test(e.target.className)) @@ -167,7 +167,8 @@ define([ }); $(document.body).on('blur', 'input, textarea', function(e) { - if (this.isAppDisabled === true) return; + if (me.isAppDisabled === true || me.isFrameClosed) return; + if (!me.isModalShowed && !(me.loadMask && me.loadMask.isVisible())) { if (!e.relatedTarget || !/area_id/.test(e.target.id) && $(e.target).parent().find(e.relatedTarget).length<1 /* Check if focus in combobox goes from input to it's menu button or menu items */ @@ -284,6 +285,8 @@ define([ if (this.appOptions.location == 'us' || this.appOptions.location == 'ca') Common.Utils.Metric.setDefaultMetric(Common.Utils.Metric.c_MetricUnits.inch); + + this.isFrameClosed = (this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge); }, loadDocument: function(data) { @@ -1617,6 +1620,7 @@ define([ break; case 'queryClose': if ($('body .asc-window:visible').length === 0) { + this.isFrameClosed = true; this.api.asc_closeCellEditor(); Common.Gateway.internalMessage('canClose', {mr:data.data.mr, answer: true}); } @@ -1634,6 +1638,7 @@ define([ setChartData: function(chart) { if (typeof chart === 'object' && this.api) { this.api.asc_addChartDrawingObject(chart); + this.isFrameClosed = false; } }, @@ -1656,6 +1661,7 @@ define([ setMergeData: function(merge) { if (typeof merge === 'object' && this.api) { this.api.asc_setData(merge); + this.isFrameClosed = false; } },