From 2a60b2466d5220849d9ed4423b3652f773aeb386 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 23 Nov 2020 21:37:56 +0300 Subject: [PATCH 1/2] [DE] Fix Bug 47607 --- apps/documenteditor/main/app/controller/Links.js | 1 + .../documenteditor/main/app/view/NoteSettingsDialog.js | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Links.js b/apps/documenteditor/main/app/controller/Links.js index 036e4843d..fc983122c 100644 --- a/apps/documenteditor/main/app/controller/Links.js +++ b/apps/documenteditor/main/app/controller/Links.js @@ -337,6 +337,7 @@ define([ Common.NotificationCenter.trigger('edit:complete', me.toolbar); }, isEndNote: isEndNote, + hasSections: me.api.asc_GetSectionsCount()>1, props: isEndNote ? me.api.asc_GetEndnoteProps() : me.api.asc_GetFootnoteProps() })).show(); break; diff --git a/apps/documenteditor/main/app/view/NoteSettingsDialog.js b/apps/documenteditor/main/app/view/NoteSettingsDialog.js index adb5f8452..297e73ed0 100644 --- a/apps/documenteditor/main/app/view/NoteSettingsDialog.js +++ b/apps/documenteditor/main/app/view/NoteSettingsDialog.js @@ -130,6 +130,7 @@ define([ this.handler = options.handler; this.props = options.props; this.isEndNote = options.isEndNote || false; + this.hasSections = options.hasSections || false; Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options); @@ -260,17 +261,16 @@ define([ me.btnApply.setDisabled(value.length>0); }); + var arr = this.hasSections ? [{ displayValue: this.textSection, value: 0 }] : []; + arr.push({ displayValue: this.textDocument, value: 1 }); this.cmbApply = new Common.UI.ComboBox({ el: $('#note-settings-combo-apply'), cls: 'input-group-nr', menuStyle: 'min-width: 150px;', editable: false, - data: [ - { displayValue: this.textDocument, value: 1 }, - { displayValue: this.textSection, value: 0 } - ] + data: arr }); - this.cmbApply.setValue(1); + this.cmbApply.setValue(arr[0].value); this.btnApply = new Common.UI.Button({ el: $('#note-settings-btn-apply') From 7b1a888efe1a40a9606b92f091df2566b6e70cd4 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 23 Nov 2020 21:41:12 +0300 Subject: [PATCH 2/2] [Mobile] Fix Bug 47212 --- apps/common/mobile/lib/view/Collaboration.js | 16 ++++++++-------- .../mobile/app/view/add/AddOther.js | 2 +- .../mobile/app/view/add/AddOther.js | 2 +- .../mobile/app/view/add/AddOther.js | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/common/mobile/lib/view/Collaboration.js b/apps/common/mobile/lib/view/Collaboration.js index 37701504b..b39f69ffb 100644 --- a/apps/common/mobile/lib/view/Collaboration.js +++ b/apps/common/mobile/lib/view/Collaboration.js @@ -175,7 +175,7 @@ define([ '
' + '
'; if (isAndroid) { - template += '
' + comment.userInitials + '
'; + template += '
' + comment.userInitials + '
'; } template += '
' + me.getUserName(comment.username) + '
' + '
' + comment.date + '
'; @@ -200,7 +200,7 @@ define([ '
' + '
'; if (isAndroid) { - template += '
' + reply.userInitials + '
' + template += '
' + reply.userInitials + '
' } template += '
' + me.getUserName(reply.username) + '
' + '
' + reply.date + '
' + @@ -248,7 +248,7 @@ define([ '
  • ', '
    ', '
    ', - '<% if (android) { %>
    <%= item.userInitials %>
    <% } %>', + '<% if (android) { %>
    <%= item.userInitials %>
    <% } %>', '
    <%= scope.getUserName(item.username) %>
    ', '
    <%= item.date %>
    ', '<% if (android) { %>
    <% } %>', @@ -270,7 +270,7 @@ define([ '
  • ', '
    ', '
    ', - '<% if (android) { %>
    <%= reply.userInitials %>
    <% } %>', + '<% if (android) { %>
    <%= reply.userInitials %>
    <% } %>', '
    <%= scope.getUserName(reply.username) %>
    ', '
    <%= reply.date %>
    ', '
    ', @@ -304,7 +304,7 @@ define([ var $pageEdit = $('.page-edit-comment .page-content'); var isAndroid = Framework7.prototype.device.android === true; var template = '
    ' + - (isAndroid ? '
    ' + comment.userInitials + '
    ' : '') + + (isAndroid ? '
    ' + comment.userInitials + '
    ' : '') + '
    ' + this.getUserName(comment.username) + '
    ' + '
    ' + comment.date + '
    ' + (isAndroid ? '
    ' : '') + @@ -330,7 +330,7 @@ define([ var $pageEdit = $('.page-edit-reply .page-content'); var isAndroid = Framework7.prototype.device.android === true; var template = '
    ' + - (isAndroid ? '
    ' + reply.userInitials + '
    ' : '') + + (isAndroid ? '
    ' + reply.userInitials + '
    ' : '') + '
    ' + this.getUserName(reply.username) + '
    ' + '
    ' + reply.date + '
    ' + (isAndroid ? '
    ' : '') + @@ -401,7 +401,7 @@ define([ '
    ' + '
    ' + '
    ' + - (isAndroid ? '
    ' + comment.userInitials + '
    ' : '') + + (isAndroid ? '
    ' + comment.userInitials + '
    ' : '') + '
    ' + this.getUserName(comment.username) + '
    ' + '
    ' + comment.date + '
    ' + (isAndroid ? '
    ' : '') + @@ -427,7 +427,7 @@ define([ '
    ' + '
    ' + '
    ' + - (isAndroid ? '
    ' + reply.userInitials + '
    ' : '') + + (isAndroid ? '
    ' + reply.userInitials + '
    ' : '') + '
    ' + this.getUserName(reply.username) + '
    ' + '
    ' + reply.date + '
    ' + (isAndroid ? '
    ' : '') + diff --git a/apps/documenteditor/mobile/app/view/add/AddOther.js b/apps/documenteditor/mobile/app/view/add/AddOther.js index 7cd0b61c2..d551fd515 100644 --- a/apps/documenteditor/mobile/app/view/add/AddOther.js +++ b/apps/documenteditor/mobile/app/view/add/AddOther.js @@ -176,7 +176,7 @@ define([ _.delay(function () { var $commentInfo = $('#comment-info'); var template = [ - '<% if (android) { %>
    <%= comment.userInitials %>
    <% } %>', + '<% if (android) { %>
    <%= comment.userInitials %>
    <% } %>', '
    <%= scope.getUserName(comment.username) %>
    ', '
    <%= comment.date %>
    ', '<% if (android) { %>
    <% } %>', diff --git a/apps/presentationeditor/mobile/app/view/add/AddOther.js b/apps/presentationeditor/mobile/app/view/add/AddOther.js index a1935724a..cb2eaa178 100644 --- a/apps/presentationeditor/mobile/app/view/add/AddOther.js +++ b/apps/presentationeditor/mobile/app/view/add/AddOther.js @@ -142,7 +142,7 @@ define([ _.delay(function () { var $commentInfo = $('#comment-info'); var template = [ - '<% if (android) { %>
    <%= comment.userInitials %>
    <% } %>', + '<% if (android) { %>
    <%= comment.userInitials %>
    <% } %>', '
    <%= scope.getUserName(comment.username) %>
    ', '
    <%= comment.date %>
    ', '<% if (android) { %>
    <% } %>', diff --git a/apps/spreadsheeteditor/mobile/app/view/add/AddOther.js b/apps/spreadsheeteditor/mobile/app/view/add/AddOther.js index aef617c64..4cc905e0f 100644 --- a/apps/spreadsheeteditor/mobile/app/view/add/AddOther.js +++ b/apps/spreadsheeteditor/mobile/app/view/add/AddOther.js @@ -216,7 +216,7 @@ define([ _.delay(function () { var $commentInfo = $('#comment-info'); var template = [ - '<% if (android) { %>
    <%= comment.userInitials %>
    <% } %>', + '<% if (android) { %>
    <%= comment.userInitials %>
    <% } %>', '
    <%= scope.getUserName(comment.username) %>
    ', '
    <%= comment.date %>
    ', '<% if (android) { %>
    <% } %>',