Merge pull request #46 from ONLYOFFICE/hotfix/v4.2.1

Hotfix/v4.2.1
This commit is contained in:
Julia Radzhabova 2016-12-05 17:11:09 +03:00 committed by GitHub
commit b89d8f3522
4 changed files with 17 additions and 13 deletions

View file

@ -62,7 +62,7 @@ define([
'<div class="separator horizontal"/>',
'<div class="footer" style="text-align: center;">',
'<button id="id-btn-diagram-editor-apply" class="btn normal dlg-btn primary custom" result="ok" style="margin-right: 10px;">' + this.textSave + '</button>',
'<button id="id-btn-diagram-editor-cancel" class="btn normal dlg-btn disabled" result="cancel">' + this.textClose + '</button>',
'<button id="id-btn-diagram-editor-cancel" class="btn normal dlg-btn" result="cancel">' + this.textClose + '</button>',
'</div>'
].join('');

View file

@ -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;
}
}

View file

@ -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;
}
},

View file

@ -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);