diff --git a/apps/documenteditor/main/app/controller/Links.js b/apps/documenteditor/main/app/controller/Links.js index 661e67e2e..036e4843d 100644 --- a/apps/documenteditor/main/app/controller/Links.js +++ b/apps/documenteditor/main/app/controller/Links.js @@ -317,7 +317,9 @@ define([ })).show(); break; case 'settings': - var isEndNote = me.api.asc_IsCursorInEndnote(); + var isEndNote = me.api.asc_IsCursorInEndnote(), + isFootNote = me.api.asc_IsCursorInFootnote(); + isEndNote = (isEndNote || isFootNote) ? isEndNote : Common.Utils.InternalSettings.get("de-settings-note-last") || false; (new DE.Views.NoteSettingsDialog({ api: me.api, handler: function (result, settings) { @@ -328,6 +330,9 @@ define([ setTimeout(function() { settings.isEndNote ? me.api.asc_AddEndnote(settings.custom) : me.api.asc_AddFootnote(settings.custom); }, 1); + if (result == 'insert' || result == 'apply') { + Common.Utils.InternalSettings.set("de-settings-note-last", settings.isEndNote); + } } Common.NotificationCenter.trigger('edit:complete', me.toolbar); }, diff --git a/apps/documenteditor/mobile/app/controller/edit/EditShape.js b/apps/documenteditor/mobile/app/controller/edit/EditShape.js index 0382a0f5b..171396166 100644 --- a/apps/documenteditor/mobile/app/controller/edit/EditShape.js +++ b/apps/documenteditor/mobile/app/controller/edit/EditShape.js @@ -227,7 +227,8 @@ define([ $('#edit-shape-bordersize .item-after').text(((borderType == Asc.c_oAscStrokeType.STROKE_NONE) ? 0 : borderSizeTransform.sizeByValue(borderSize)) + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt)); // Init style opacity - $('#edit-shape-effect input').val([shapeProperties.get_fill().asc_getTransparent() ? shapeProperties.get_fill().asc_getTransparent() / 2.55 : 100]); + var transparent = shapeProperties.get_fill().asc_getTransparent(); + $('#edit-shape-effect input').val([transparent!==null && transparent!==undefined ? transparent / 2.55 : 100]); $('#edit-shape-effect .item-after').text($('#edit-shape-effect input').val() + ' ' + "%"); paletteFillColor && paletteFillColor.on('select', _.bind(me.onFillColor, me)); diff --git a/apps/presentationeditor/mobile/app/controller/edit/EditShape.js b/apps/presentationeditor/mobile/app/controller/edit/EditShape.js index 78015826a..aa22af261 100644 --- a/apps/presentationeditor/mobile/app/controller/edit/EditShape.js +++ b/apps/presentationeditor/mobile/app/controller/edit/EditShape.js @@ -160,7 +160,8 @@ define([ $('#edit-shape-bordersize .item-after').text(((borderType == Asc.c_oAscStrokeType.STROKE_NONE) ? 0 : borderSizeTransform.sizeByValue(borderSize)) + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt)); // Init style opacity - $('#edit-shape-effect input').val([_shapeObject.get_fill().asc_getTransparent() ? _shapeObject.get_fill().asc_getTransparent() / 2.55 : 100]); + var transparent = _shapeObject.get_fill().asc_getTransparent(); + $('#edit-shape-effect input').val([transparent!==null && transparent!==undefined ? transparent / 2.55 : 100]); $('#edit-shape-effect .item-after').text($('#edit-shape-effect input').val() + ' ' + "%"); paletteFillColor && paletteFillColor.on('select', _.bind(me.onFillColor, me)); diff --git a/apps/spreadsheeteditor/mobile/app/controller/edit/EditChart.js b/apps/spreadsheeteditor/mobile/app/controller/edit/EditChart.js index f3e420629..53872aa79 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/edit/EditChart.js +++ b/apps/spreadsheeteditor/mobile/app/controller/edit/EditChart.js @@ -341,7 +341,7 @@ define([ initVertAxisPage: function () { var me = this, $vertAxisPage = $('.page[data-page=edit-chart-vertical-axis]'), - chartProperty = me.api.asc_getChartObject(), + chartProperty = me.api.asc_getChartObject(true), verAxisProps = chartProperty.getVertAxisProps(), axisProps = (verAxisProps.getAxisType() == Asc.c_oAscAxisType.val) ? verAxisProps : chartProperty.getHorAxisProps(); @@ -440,7 +440,7 @@ define([ initHorAxisPage: function () { var me = this, $horAxisPage = $('.page[data-page=edit-chart-horizontal-axis]'), - chartProperty = me.api.asc_getChartObject(), + chartProperty = me.api.asc_getChartObject(true), horAxisProps = chartProperty.getHorAxisProps(), axisProps = (horAxisProps.getAxisType() == Asc.c_oAscAxisType.val) ? chartProperty.getVertAxisProps() : horAxisProps; @@ -940,14 +940,14 @@ define([ // Helpers _getVerticalAxisProp: function () { - var chartObject = this.api.asc_getChartObject(), + var chartObject = this.api.asc_getChartObject(true), verAxisProps = chartObject.getVertAxisProps(); return (verAxisProps.getAxisType() == Asc.c_oAscAxisType.val) ? verAxisProps : chartObject.getHorAxisProps(); }, _setVerticalAxisProp: function (axisProps) { - var chartObject = this.api.asc_getChartObject(), + var chartObject = this.api.asc_getChartObject(true), verAxisProps = chartObject.getVertAxisProps(); if (!_.isUndefined(chartObject)) { @@ -957,14 +957,14 @@ define([ }, _getHorizontalAxisProp: function () { - var chartObject = this.api.asc_getChartObject(), + var chartObject = this.api.asc_getChartObject(true), verHorProps = chartObject.getHorAxisProps(); return (verHorProps.getAxisType() == Asc.c_oAscAxisType.val) ? chartObject.getVertAxisProps() : verHorProps; }, _setHorizontalAxisProp: function (axisProps) { - var chartObject = this.api.asc_getChartObject(), + var chartObject = this.api.asc_getChartObject(true), verAxisProps = chartObject.getHorAxisProps(); if (!_.isUndefined(chartObject)) { @@ -975,7 +975,7 @@ define([ _setLayoutProperty: function (propertyMethod, e) { var value = $(e.currentTarget).val(), - chartObject = this.api.asc_getChartObject(); + chartObject = this.api.asc_getChartObject(true); if (!_.isUndefined(chartObject) && value && value.length > 0) { var intValue = parseInt(value); diff --git a/apps/spreadsheeteditor/mobile/app/controller/edit/EditShape.js b/apps/spreadsheeteditor/mobile/app/controller/edit/EditShape.js index a6e1f2d74..36e00f871 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/edit/EditShape.js +++ b/apps/spreadsheeteditor/mobile/app/controller/edit/EditShape.js @@ -188,7 +188,8 @@ define([ // Effect // Init style opacity - $('#edit-shape-effect input').val([shapeProperties.get_fill().asc_getTransparent() ? shapeProperties.get_fill().asc_getTransparent() / 2.55 : 100]); + var transparent = shapeProperties.get_fill().asc_getTransparent(); + $('#edit-shape-effect input').val([transparent!==null && transparent!==undefined ? transparent / 2.55 : 100]); $('#edit-shape-effect .item-after').text($('#edit-shape-effect input').val() + ' ' + "%"); $('#edit-shape-effect input').single('change touchend', _.buffered(me.onOpacity, 100, me)); $('#edit-shape-effect input').single('input', _.bind(me.onOpacityChanging, me));