diff --git a/apps/common/main/resources/img/doc-formats/jpg.svg b/apps/common/main/resources/img/doc-formats/jpg.svg new file mode 100644 index 0000000000..b04feaf760 --- /dev/null +++ b/apps/common/main/resources/img/doc-formats/jpg.svg @@ -0,0 +1,14 @@ + diff --git a/apps/common/main/resources/img/doc-formats/png.svg b/apps/common/main/resources/img/doc-formats/png.svg new file mode 100644 index 0000000000..58aef71e3e --- /dev/null +++ b/apps/common/main/resources/img/doc-formats/png.svg @@ -0,0 +1,14 @@ + diff --git a/apps/common/main/resources/img/doc-formats/svg.svg b/apps/common/main/resources/img/doc-formats/svg.svg new file mode 100644 index 0000000000..3f2562f15a --- /dev/null +++ b/apps/common/main/resources/img/doc-formats/svg.svg @@ -0,0 +1,14 @@ + diff --git a/apps/common/mobile/lib/controller/Collaboration.js b/apps/common/mobile/lib/controller/Collaboration.js index b46a244209..38b3d352bf 100644 --- a/apps/common/mobile/lib/controller/Collaboration.js +++ b/apps/common/mobile/lib/controller/Collaboration.js @@ -1046,7 +1046,7 @@ define([ onDoneAddNewReply: function(uid) { var phone = Common.SharedSettings.get('phone'); - var reply = $('.reply-textarea')[0].value; + var reply = $('.reply-textarea')[0].value.trim(); if ($('.container-view-comment').length > 0) { var $viewComment = $('.container-view-comment'); if (reply && reply.length > 0) { @@ -1282,8 +1282,8 @@ define([ me.disabledViewComments(true); if ($('.comment-textarea').length === 0) { var $viewComment = $('.container-view-comment'); - var oldComment = $viewComment.find('.comment-text span').text(); - $viewComment.find('.comment-text span').css('display', 'none'); + var oldComment = $viewComment.find('.comment-text pre').text(); + $viewComment.find('.comment-text pre').css('display', 'none'); var template = _.template(''); $viewComment.find('.comment-text').append(template); $viewComment.find('a.prev-comment, a.next-comment, a.add-reply').css('display', 'none'); @@ -1308,7 +1308,7 @@ define([ }, onEditComment: function(comment) { - var value = $('#comment-text')[0].value; + var value = $('#comment-text')[0].value.trim(); if (value && value.length > 0) { if (!_.isUndefined(this.onChangeComment)) { comment.comment = value; @@ -1323,7 +1323,7 @@ define([ $viewComment.find('a.prev-comment, a.next-comment, a.add-reply').css('display', 'flex'); if ($viewComment.find('.comment-textarea').length > 0) { $viewComment.find('.comment-textarea').remove(); - $viewComment.find('.comment-text span').css('display', 'block'); + $viewComment.find('.comment-text pre').css('display', 'block'); } } this.disabledViewComments(false); @@ -1336,7 +1336,7 @@ define([ onCancelEditComment: function() { var $viewComment = $('.container-view-comment'); $viewComment.find('a.done-edit-comment, a.cancel-edit-comment, .comment-textarea').remove(); - $viewComment.find('.comment-text span').css('display', 'block'); + $viewComment.find('.comment-text pre').css('display', 'block'); $viewComment.find('a.prev-comment, a.next-comment, a.add-reply').css('display', 'flex'); this.disabledViewComments(false); }, @@ -1388,7 +1388,7 @@ define([ }, onEditReply: function(comment, indReply) { - var value = $('.edit-reply-textarea')[0].value; + var value = $('.edit-reply-textarea')[0].value.trim(); if (value && value.length > 0) { if ($('.container-view-comment').length > 0) { if (!_.isUndefined(this.onChangeComment)) { diff --git a/apps/common/mobile/lib/view/Collaboration.js b/apps/common/mobile/lib/view/Collaboration.js index aa9ebb472c..9a90b9cc44 100644 --- a/apps/common/mobile/lib/view/Collaboration.js +++ b/apps/common/mobile/lib/view/Collaboration.js @@ -177,8 +177,8 @@ define([ if (isAndroid) { template += '
' + comment.username + '
' + - '' + comment.date + '
'; + template += '' + me.sliceQuote(comment.quote) + '
'; - template += '' + comment.comment + '
' + reply.username + '
' + - '' + + template += '<%= item.username %>
', - '<%= item.date %>
', + '<%= quote %>
', + '<%= item.comment %>
', + '<%= item.comment %>