From c9cc58fd3d926e39c5b98cc44f89085382be4534 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 7 Mar 2017 14:35:27 +0300 Subject: [PATCH 1/6] Use customization->about for hiding about in the left panel (for licensed users only). --- apps/api/documents/api.js | 4 ++-- apps/documenteditor/main/app/controller/Main.js | 8 ++++++-- apps/presentationeditor/main/app/controller/Main.js | 8 ++++++-- apps/spreadsheeteditor/main/app/controller/Main.js | 8 ++++++-- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 9cbde2d19..6739b3e48 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -96,7 +96,7 @@ info: 'Some info', logo: '' }, - about: false, + about: true, feedback: { visible: false, url: http://... @@ -551,7 +551,7 @@ lang: 'en', canCoAuthoring: true, customization: { - about: false, + about: true, feedback: false } } diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 5a1eb8608..e648f7c75 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1474,8 +1474,12 @@ define([ hidePreloader: function() { if (!this._state.customizationDone) { this._state.customizationDone = true; - if (this.appOptions.customization && !this.appOptions.isDesktopApp) - this.appOptions.customization.about = true; + if (this.appOptions.customization) { + if (this.appOptions.isDesktopApp) + this.appOptions.customization.about = false; + else if (!this.appOptions.canBranding) + this.appOptions.customization.about = true; + } Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); if (this.appOptions.canBrandingExt) { Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 88673ed5c..3afe23153 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1227,8 +1227,12 @@ define([ hidePreloader: function() { if (!this._state.customizationDone) { this._state.customizationDone = true; - if (this.appOptions.customization && !this.appOptions.isDesktopApp) - this.appOptions.customization.about = true; + if (this.appOptions.customization) { + if (this.appOptions.isDesktopApp) + this.appOptions.customization.about = false; + else if (!this.appOptions.canBranding) + this.appOptions.customization.about = true; + } Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); if (this.appOptions.canBrandingExt) { Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index c96cab58c..5d90ea448 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1365,8 +1365,12 @@ define([ hidePreloader: function() { if (!this._state.customizationDone) { this._state.customizationDone = true; - if (this.appOptions.customization && !this.appOptions.isDesktopApp) - this.appOptions.customization.about = true; + if (this.appOptions.customization) { + if (this.appOptions.isDesktopApp) + this.appOptions.customization.about = false; + else if (!this.appOptions.canBranding) + this.appOptions.customization.about = true; + } Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); if (this.appOptions.canBrandingExt) { Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements); From ea4339f69377a650bfaeff9549c517a3b71d0151 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 7 Mar 2017 15:15:29 +0300 Subject: [PATCH 2/6] Can hide about when asc_getCanBranding() is true. --- apps/documenteditor/main/app/controller/Main.js | 2 +- apps/presentationeditor/main/app/controller/Main.js | 2 +- apps/spreadsheeteditor/main/app/controller/Main.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index e648f7c75..8082c9c31 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1477,7 +1477,7 @@ define([ if (this.appOptions.customization) { if (this.appOptions.isDesktopApp) this.appOptions.customization.about = false; - else if (!this.appOptions.canBranding) + else if (!this.appOptions.canBrandingExt) this.appOptions.customization.about = true; } Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 3afe23153..22219b690 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1230,7 +1230,7 @@ define([ if (this.appOptions.customization) { if (this.appOptions.isDesktopApp) this.appOptions.customization.about = false; - else if (!this.appOptions.canBranding) + else if (!this.appOptions.canBrandingExt) this.appOptions.customization.about = true; } Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 5d90ea448..3b60e6f86 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1368,7 +1368,7 @@ define([ if (this.appOptions.customization) { if (this.appOptions.isDesktopApp) this.appOptions.customization.about = false; - else if (!this.appOptions.canBranding) + else if (!this.appOptions.canBrandingExt) this.appOptions.customization.about = true; } Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); From b165941332d42046f97f66b63f2eb2bdbeae1425 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 10 Mar 2017 14:17:14 +0300 Subject: [PATCH 3/6] [SSE] Changes for Bug 34141. --- .../spreadsheeteditor/mobile/app/controller/edit/EditText.js | 5 ++--- apps/spreadsheeteditor/mobile/app/template/EditText.template | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/app/controller/edit/EditText.js b/apps/spreadsheeteditor/mobile/app/controller/edit/EditText.js index fe79fa0b0..0b9dfd6b5 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/edit/EditText.js +++ b/apps/spreadsheeteditor/mobile/app/controller/edit/EditText.js @@ -151,8 +151,7 @@ define([ var color = _fontInfo.asc_getColor(), clr = me._sdkToThemeColor(color); - $('#text-color .color-preview').css('background-color', '#' + (_.isObject(clr) ? clr.color : clr)); - + $('#font-color .color-preview').css('background-color', '#' + (_.isObject(clr) ? clr.color : clr)); // Align $('#edit-text-align-block').css('display', (_textIn == TextType.inShape) ? 'block' : 'none'); @@ -279,7 +278,7 @@ define([ onTextColor:function (palette, color) { this.api.asc_setCellTextColor(Common.Utils.ThemeColor.getRgbColor(color)); - $('#text-color .color-preview').css('background-color', '#' + (_.isObject(color) ? color.color : color)); + $('#font-color .color-preview').css('background-color', '#' + (_.isObject(color) ? color.color : color)); }, onHAlignChange: function (e) { diff --git a/apps/spreadsheeteditor/mobile/app/template/EditText.template b/apps/spreadsheeteditor/mobile/app/template/EditText.template index fb72eaccc..c324dfda5 100644 --- a/apps/spreadsheeteditor/mobile/app/template/EditText.template +++ b/apps/spreadsheeteditor/mobile/app/template/EditText.template @@ -24,7 +24,7 @@
  • - +
    <% if (!android) { %>
    <% } %>
    From 785a1d7efb0d17beee3ea9e79fa3ed3922d78787 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 13 Mar 2017 11:16:34 +0300 Subject: [PATCH 4/6] [SSE] Fix Bug 34097. --- .../mobile/app/template/EditChart.template | 6 +++--- apps/spreadsheeteditor/mobile/app/view/edit/EditChart.js | 1 + apps/spreadsheeteditor/mobile/locale/en.json | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/app/template/EditChart.template b/apps/spreadsheeteditor/mobile/app/template/EditChart.template index 559ecbf2d..ec92990fa 100644 --- a/apps/spreadsheeteditor/mobile/app/template/EditChart.template +++ b/apps/spreadsheeteditor/mobile/app/template/EditChart.template @@ -461,7 +461,7 @@
  • -
    <%= scope.textTickOptions %>Tick Options
    +
    <%= scope.textTickOptions %>
    • @@ -480,7 +480,7 @@
      -
      <%= scope.textMajorType %>
      +
      <%= scope.textMinorType %>
      <%= scope.textNone %>
      @@ -596,7 +596,7 @@
      -
      <%= scope.textMajorType %>
      +
      <%= scope.textMinorType %>
      <%= scope.textNone %>
      diff --git a/apps/spreadsheeteditor/mobile/app/view/edit/EditChart.js b/apps/spreadsheeteditor/mobile/app/view/edit/EditChart.js index 78d54d8b3..dadda1dc3 100644 --- a/apps/spreadsheeteditor/mobile/app/view/edit/EditChart.js +++ b/apps/spreadsheeteditor/mobile/app/view/edit/EditChart.js @@ -259,6 +259,7 @@ define([ textValReverseOrder: 'Values in Reverse Order', textTickOptions: 'Tick Options', textMajorType: 'Major Type', + textMinorType: 'Minor Type', textLabelOptions: 'Label Options', textLabelPos: 'Label Position', textAxisPosition: 'Axis Position', diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index ef7f99106..6cc0de839 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -326,6 +326,7 @@ "SSE.Views.EditChart.textMajorType": "Major Type", "SSE.Views.EditChart.textMaxValue": "Maximum Value", "SSE.Views.EditChart.textMinor": "Minor", + "SSE.Views.EditChart.textMinorType": "Minor Type", "SSE.Views.EditChart.textMinValue": "Minimum Value", "SSE.Views.EditChart.textNone": "None", "SSE.Views.EditChart.textNoOverlay": "No Overlay", From 51b2f784908e2d9abbfb77a0b50a104c97dfba06 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 13 Mar 2017 12:08:43 +0300 Subject: [PATCH 5/6] [SSE] Fix Bug 34272. --- apps/api/documents/api.js | 3 ++- apps/spreadsheeteditor/main/app/controller/Main.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 8360a010a..ad2263ec6 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -521,7 +521,8 @@ var data = { type: evt.type, x: evt.x - r.left, - y: evt.y - r.top + y: evt.y - r.top, + event: evt }; _sendCommand({ diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 3bfe7505b..60c559866 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -363,7 +363,7 @@ define([ var editor = document.getElementById('editor_sdk'); if (editor) { var rect = editor.getBoundingClientRect(); - var event = window.event || arguments.callee.caller.arguments[0]; + var event = data.event || {}; this.api.asc_onMouseUp(event, data.x - rect.left, data.y - rect.top); } } From 497b5313cedf107a792508befc7a52a5841127aa Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 13 Mar 2017 12:10:12 +0300 Subject: [PATCH 6/6] [SSE] Bug 34159. --- .../main/app/controller/DocumentHolder.js | 4 ++++ .../spreadsheeteditor/main/app/controller/Toolbar.js | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index c589e4ce1..0aa9f9b4c 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -695,12 +695,15 @@ define([ (new SSE.Views.ChartSettingsDlg( { chartSettings: props, + imageSettings: item.chartInfo, isChart: true, api: me.api, handler: function(result, value) { if (result == 'ok') { if (me.api) { me.api.asc_editChartDrawingObject(value.chartSettings); + if (value.imageSettings) + me.api.asc_setGraphicObjectProps(value.imageSettings); } } Common.NotificationCenter.trigger('edit:complete', me); @@ -1205,6 +1208,7 @@ define([ isshapemenu = true; } } else if ( elValue.asc_getChartProperties() ) { + documentHolder.mnuChartEdit.chartInfo = elValue; ischartmenu = true; has_chartprops = true; } diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 171a775b6..ccf5d99d4 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -750,18 +750,30 @@ define([ var win, props; if (me.api){ props = me.api.asc_getChartObject(); + var selectedObjects = me.api.asc_getGraphicObjectProps(), + imageSettings = null; + for (var i = 0; i < selectedObjects.length; i++) { + if (selectedObjects[i].asc_getObjectType() == Asc.c_oAscTypeSelectElement.Image) { + var elValue = selectedObjects[i].asc_getObjectValue(); + if ( elValue.asc_getChartProperties() ) + imageSettings = elValue; + } + } if (props) { var ischartedit = ( me.toolbar.mode.isEditDiagram || info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChart || info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChartText); (new SSE.Views.ChartSettingsDlg( { chartSettings: props, + imageSettings: imageSettings, isChart: true, api: me.api, handler: function(result, value) { if (result == 'ok') { if (me.api) { (ischartedit) ? me.api.asc_editChartDrawingObject(value.chartSettings) : me.api.asc_addChartDrawingObject(value.chartSettings); + if (value.imageSettings) + me.api.asc_setGraphicObjectProps(value.imageSettings); } } Common.NotificationCenter.trigger('edit:complete', me.toolbar);