From b343c8c3e8d2aa5e2c26aed0064ca6b4130a9f97 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Fri, 23 Aug 2019 13:10:36 +0300 Subject: [PATCH 1/3] [mobile] Display review for view mode --- apps/common/mobile/lib/controller/Collaboration.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/common/mobile/lib/controller/Collaboration.js b/apps/common/mobile/lib/controller/Collaboration.js index 673092e46..63d5296a4 100644 --- a/apps/common/mobile/lib/controller/Collaboration.js +++ b/apps/common/mobile/lib/controller/Collaboration.js @@ -209,7 +209,10 @@ define([ Common.Utils.addScrollIfNeed('.page[data-page=comments-view]', '.page[data-page=comments-view] .page-content'); } else { if(editor === 'DE' && !this.appConfig.canReview) { - $('#reviewing-settings').hide(); + this.canViewReview = me.api.asc_HaveRevisionsChanges(true); + if (!this.canViewReview) { + $('#reviewing-settings').hide(); + } } } }, @@ -282,6 +285,11 @@ define([ $('#settings-reject-all').removeClass('disabled'); $('#settings-review').removeClass('disabled'); } + if (!this.appConfig.canReview) { + $('#settings-review').hide(); + $('#settings-accept-all').hide(); + $('#settings-reject-all').hide(); + } }, onTrackChanges: function(e) { @@ -384,6 +392,10 @@ define([ $('#btn-prev-change').addClass('disabled'); $('#btn-next-change').addClass('disabled'); } + if (!this.appConfig.canReview) { + $('#btn-accept-change').addClass('disabled'); + $('#btn-reject-change').addClass('disabled'); + } }, onPrevChange: function() { From 58ffa1aa69c3ffbc278d24bbae9677d02e59c27a Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 23 Aug 2019 15:19:11 +0300 Subject: [PATCH 2/3] [DE] Fix Bug 42530 --- .../documenteditor/main/app/view/StyleTitleDialog.js | 12 +++++++----- apps/documenteditor/main/locale/en.json | 1 + apps/documenteditor/main/locale/ru.json | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/main/app/view/StyleTitleDialog.js b/apps/documenteditor/main/app/view/StyleTitleDialog.js index 9a0deabee..238efe689 100644 --- a/apps/documenteditor/main/app/view/StyleTitleDialog.js +++ b/apps/documenteditor/main/app/view/StyleTitleDialog.js @@ -71,6 +71,7 @@ define([ ].join(''); this.options.tpl = _.template(this.template)(this.options); + this.options.formats = this.options.formats || []; Common.UI.Window.prototype.initialize.call(this, this.options); }, @@ -100,6 +101,7 @@ define([ $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); + this.options.formats.unshift({value: -1, displayValue: this.txtSameAs}); this.cmbNextStyle = new Common.UI.ComboBox({ el : $('#id-dlg-style-next-par'), style : 'width: 100%;', @@ -109,8 +111,7 @@ define([ data : this.options.formats, disabled : (this.options.formats.length==0) }); - if (this.options.formats.length>0) - this.cmbNextStyle.setValue(this.options.formats[0].value); + this.cmbNextStyle.setValue(-1); }, show: function() { @@ -128,8 +129,8 @@ define([ }, getNextStyle: function () { - var me = this; - return (me.options.formats.length>0) ? me.cmbNextStyle.getValue() : null; + var val = this.cmbNextStyle.getValue(); + return (val!=-1) ? val : null; }, onBtnClick: function(event) { @@ -161,7 +162,8 @@ define([ textHeader: 'Create New Style', txtEmpty: 'This field is required', txtNotEmpty: 'Field must not be empty', - textNextStyle: 'Next paragraph style' + textNextStyle: 'Next paragraph style', + txtSameAs: 'Same as created new style' }, DE.Views.StyleTitleDialog || {})) diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 81107c503..fe28eb861 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1873,6 +1873,7 @@ "DE.Views.StyleTitleDialog.textTitle": "Title", "DE.Views.StyleTitleDialog.txtEmpty": "This field is required", "DE.Views.StyleTitleDialog.txtNotEmpty": "Field must not be empty", + "DE.Views.StyleTitleDialog.txtSameAs": "Same as created new style", "DE.Views.TableFormulaDialog.cancelButtonText": "Cancel", "DE.Views.TableFormulaDialog.okButtonText": "OK", "DE.Views.TableFormulaDialog.textBookmark": "Paste Bookmark", diff --git a/apps/documenteditor/main/locale/ru.json b/apps/documenteditor/main/locale/ru.json index 3d8d69c36..57a23f1b8 100644 --- a/apps/documenteditor/main/locale/ru.json +++ b/apps/documenteditor/main/locale/ru.json @@ -1873,6 +1873,7 @@ "DE.Views.StyleTitleDialog.textTitle": "Название", "DE.Views.StyleTitleDialog.txtEmpty": "Это поле необходимо заполнить", "DE.Views.StyleTitleDialog.txtNotEmpty": "Поле не может быть пустым", + "DE.Views.StyleTitleDialog.txtSameAs": "Такой же, как создаваемый стиль", "DE.Views.TableFormulaDialog.cancelButtonText": "Отмена", "DE.Views.TableFormulaDialog.okButtonText": "ОК", "DE.Views.TableFormulaDialog.textBookmark": "Вставить закладку", From 8a6af205d978daaa75d88075e69cb38187342f95 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Fri, 23 Aug 2019 15:55:30 +0300 Subject: [PATCH 3/3] [mobile] Bug 39380 --- apps/documenteditor/mobile/app/controller/Settings.js | 6 +++--- apps/presentationeditor/mobile/app/view/Settings.js | 6 +++--- apps/spreadsheeteditor/mobile/app/controller/Settings.js | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js index b21d47114..8269cbea5 100644 --- a/apps/documenteditor/mobile/app/controller/Settings.js +++ b/apps/documenteditor/mobile/app/controller/Settings.js @@ -557,10 +557,10 @@ define([ if (url.charAt(url.length-1) !== '/') { url += '/'; } - if (Common.SharedSettings.get('android')) { - url+='mobile-applications/documents/android/index.aspx'; - } else if (Common.SharedSettings.get('sailfish')) { + if (Common.SharedSettings.get('sailfish')) { url+='mobile-applications/documents/sailfish/index.aspx'; + } else if (Common.SharedSettings.get('android')) { + url+='mobile-applications/documents/android/index.aspx'; } else { url+='mobile-applications/documents/index.aspx'; } diff --git a/apps/presentationeditor/mobile/app/view/Settings.js b/apps/presentationeditor/mobile/app/view/Settings.js index 5d8e3a08e..dc9240246 100644 --- a/apps/presentationeditor/mobile/app/view/Settings.js +++ b/apps/presentationeditor/mobile/app/view/Settings.js @@ -184,10 +184,10 @@ define([ if (url.charAt(url.length-1) !== '/') { url += '/'; } - if (Common.SharedSettings.get('android')) { - url+='mobile-applications/documents/android/index.aspx'; - } else if (Common.SharedSettings.get('sailfish')) { + if (Common.SharedSettings.get('sailfish')) { url+='mobile-applications/documents/sailfish/index.aspx'; + } else if (Common.SharedSettings.get('android')) { + url+='mobile-applications/documents/android/index.aspx'; } else { url+='mobile-applications/documents/index.aspx'; } diff --git a/apps/spreadsheeteditor/mobile/app/controller/Settings.js b/apps/spreadsheeteditor/mobile/app/controller/Settings.js index 55153f717..462a4eeb5 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Settings.js @@ -116,10 +116,10 @@ define([ if (url.charAt(url.length-1) !== '/') { url += '/'; } - if (Common.SharedSettings.get('android')) { - url+='mobile-applications/documents/android/index.aspx'; - } else if (Common.SharedSettings.get('sailfish')) { + if (Common.SharedSettings.get('sailfish')) { url+='mobile-applications/documents/sailfish/index.aspx'; + } else if (Common.SharedSettings.get('android')) { + url+='mobile-applications/documents/android/index.aspx'; } else { url+='mobile-applications/documents/index.aspx'; }