[mobile] Fix bug 45445
This commit is contained in:
parent
8455e7a992
commit
a626ca471d
|
@ -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('<textarea id="comment-text" class="comment-textarea">' + oldComment + '</textarea>');
|
||||
$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)) {
|
||||
|
|
|
@ -177,8 +177,8 @@ define([
|
|||
if (isAndroid) {
|
||||
template += '<div class="initials-comment" style="background-color: ' + comment.usercolor + ';">' + comment.userInitials + '</div><div>';
|
||||
}
|
||||
template += '<p class="user-name">' + comment.username + '</p>' +
|
||||
'<p class="comment-date">' + comment.date + '</p>';
|
||||
template += '<div class="user-name">' + comment.username + '</div>' +
|
||||
'<div class="comment-date">' + comment.date + '</div>';
|
||||
if (isAndroid) {
|
||||
template += '</div>';
|
||||
}
|
||||
|
@ -191,8 +191,8 @@ define([
|
|||
}
|
||||
template += '</div>';
|
||||
|
||||
if (comment.quote) template += '<p class="comment-quote" data-ind="' + comment.uid + '">' + me.sliceQuote(comment.quote) + '</p>';
|
||||
template += '<div class="comment-text"><span>' + comment.comment + '</span></div>';
|
||||
if (comment.quote) template += '<div class="comment-quote" data-ind="' + comment.uid + '">' + me.sliceQuote(comment.quote) + '</div>';
|
||||
template += '<div class="comment-text"><pre>' + comment.comment + '</pre></div>';
|
||||
if (comment.replys.length > 0) {
|
||||
template += '<ul class="list-reply">';
|
||||
_.each(comment.replys, function (reply) {
|
||||
|
@ -202,8 +202,8 @@ define([
|
|||
if (isAndroid) {
|
||||
template += '<div class="initials-reply" style="background-color: ' + reply.usercolor + ';">' + reply.userInitials + '</div><div>'
|
||||
}
|
||||
template += '<p class="user-name">' + reply.username + '</p>' +
|
||||
'<p class="reply-date">' + reply.date + '</p>' +
|
||||
template += '<div class="user-name">' + reply.username + '</div>' +
|
||||
'<div class="reply-date">' + reply.date + '</div>' +
|
||||
'</div>';
|
||||
if (isAndroid) {
|
||||
template += '</div>';
|
||||
|
@ -212,7 +212,7 @@ define([
|
|||
template += '<div class="reply-menu"><i class="icon icon-menu-comment"></i></div>';
|
||||
}
|
||||
template += '</div>' +
|
||||
'<p class="reply-text">' + reply.reply + '</p>' +
|
||||
'<div class="reply-text"><pre>' + reply.reply + '</pre></div>' +
|
||||
'</li>';
|
||||
});
|
||||
template += '</ul>'
|
||||
|
@ -249,8 +249,8 @@ define([
|
|||
'<div class="item-inner">',
|
||||
'<div class="header-comment"><div class="comment-left">',
|
||||
'<% if (android) { %><div class="initials-comment" style="background-color:<%= item.usercolor %> "> <%= item.userInitials %></div><div><% } %>',
|
||||
'<p class="user-name"><%= item.username %></p>',
|
||||
'<p class="comment-date"><%= item.date %></p>',
|
||||
'<div class="user-name"><%= item.username %></div>',
|
||||
'<div class="comment-date"><%= item.date %></div>',
|
||||
'<% if (android) { %></div><% } %>',
|
||||
'</div>',
|
||||
'<% if (item.editable && !viewmode) { %>',
|
||||
|
@ -261,9 +261,9 @@ define([
|
|||
'<% } %>',
|
||||
'</div>',
|
||||
'<% if(item.quote) {%>',
|
||||
'<p class="comment-quote" data-id="<%= item.uid %>"><%= quote %></p>',
|
||||
'<div class="comment-quote" data-id="<%= item.uid %>"><%= quote %></div>',
|
||||
'<% } %>',
|
||||
'<p class="comment-text"><span><%= item.comment %></span></p>',
|
||||
'<div class="comment-text"><pre><%= item.comment %></pre></div>',
|
||||
'<% if(replys > 0) {%>',
|
||||
'<ul class="list-reply">',
|
||||
'<% _.each(item.replys, function (reply) { %>',
|
||||
|
@ -271,15 +271,15 @@ define([
|
|||
'<div class="header-reply">',
|
||||
'<div class="reply-left">',
|
||||
'<% if (android) { %><div class="initials-reply" style="background-color: <%= reply.usercolor %>;"><%= reply.userInitials %></div><div><% } %>',
|
||||
'<p class="user-name"><%= reply.username %></p>',
|
||||
'<p class="reply-date"><%= reply.date %></p>',
|
||||
'<div class="user-name"><%= reply.username %></div>',
|
||||
'<div class="reply-date"><%= reply.date %></div>',
|
||||
'</div>',
|
||||
'<% if (android) { %></div><% } %>',
|
||||
'<% if (reply.editable && !viewmode) { %>',
|
||||
'<div class="reply-menu"><i class="icon icon-menu-comment"></i></div>',
|
||||
'<% } %>',
|
||||
'</div>',
|
||||
'<p class="reply-text"><%= reply.reply %></p>',
|
||||
'<div class="reply-text"><pre><%= reply.reply %></pre></div>',
|
||||
'</li>',
|
||||
'<% }); %>',
|
||||
'</ul>',
|
||||
|
|
|
@ -145,10 +145,7 @@
|
|||
padding: 16px 0;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.list-reply {
|
||||
padding-left: 26px;
|
||||
}
|
||||
|
@ -176,6 +173,9 @@
|
|||
margin: 0;
|
||||
max-width: 100%;
|
||||
padding-right: 15px;
|
||||
pre {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
}
|
||||
.reply-item {
|
||||
margin-top: 15px;
|
||||
|
|
|
@ -143,10 +143,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
}
|
||||
.list-reply {
|
||||
padding-left: 26px;
|
||||
}
|
||||
|
@ -173,6 +169,9 @@
|
|||
margin: 0;
|
||||
max-width: 100%;
|
||||
padding-right: 15px;
|
||||
pre {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
}
|
||||
.reply-item {
|
||||
padding-right: 16px;
|
||||
|
|
|
@ -194,7 +194,7 @@ define([
|
|||
},
|
||||
|
||||
onDoneComment: function(documentFlag) {
|
||||
var value = $('#comment-text').val();
|
||||
var value = $('#comment-text').val().trim();
|
||||
if (value.length > 0) {
|
||||
DE.getController('Common.Controllers.Collaboration').onAddNewComment(value, documentFlag);
|
||||
DE.getController('AddContainer').hideModal();
|
||||
|
|
|
@ -6559,17 +6559,6 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after
|
|||
padding: 16px 0;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.page-comments p,
|
||||
.add-comment p,
|
||||
.page-view-comments p,
|
||||
.container-edit-comment p,
|
||||
.container-add-reply p,
|
||||
.page-edit-comment p,
|
||||
.page-add-reply p,
|
||||
.page-edit-reply p {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
}
|
||||
.page-comments .list-reply,
|
||||
.add-comment .list-reply,
|
||||
.page-view-comments .list-reply,
|
||||
|
@ -6665,6 +6654,24 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after
|
|||
max-width: 100%;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.page-comments .comment-text pre,
|
||||
.add-comment .comment-text pre,
|
||||
.page-view-comments .comment-text pre,
|
||||
.container-edit-comment .comment-text pre,
|
||||
.container-add-reply .comment-text pre,
|
||||
.page-edit-comment .comment-text pre,
|
||||
.page-add-reply .comment-text pre,
|
||||
.page-edit-reply .comment-text pre,
|
||||
.page-comments .reply-text pre,
|
||||
.add-comment .reply-text pre,
|
||||
.page-view-comments .reply-text pre,
|
||||
.container-edit-comment .reply-text pre,
|
||||
.container-add-reply .reply-text pre,
|
||||
.page-edit-comment .reply-text pre,
|
||||
.page-add-reply .reply-text pre,
|
||||
.page-edit-reply .reply-text pre {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.page-comments .reply-item,
|
||||
.add-comment .reply-item,
|
||||
.page-view-comments .reply-item,
|
||||
|
|
|
@ -6129,17 +6129,6 @@ html.phone .document-menu .list-block .item-link {
|
|||
.page-edit-reply .list-block .item-inner:after {
|
||||
content: none;
|
||||
}
|
||||
.page-comments p,
|
||||
.page-add-comment p,
|
||||
.page-view-comments p,
|
||||
.container-edit-comment p,
|
||||
.container-add-reply p,
|
||||
.page-edit-comment p,
|
||||
.page-add-reply p,
|
||||
.page-edit-reply p {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
}
|
||||
.page-comments .list-reply,
|
||||
.page-add-comment .list-reply,
|
||||
.page-view-comments .list-reply,
|
||||
|
@ -6234,6 +6223,24 @@ html.phone .document-menu .list-block .item-link {
|
|||
max-width: 100%;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.page-comments .comment-text pre,
|
||||
.page-add-comment .comment-text pre,
|
||||
.page-view-comments .comment-text pre,
|
||||
.container-edit-comment .comment-text pre,
|
||||
.container-add-reply .comment-text pre,
|
||||
.page-edit-comment .comment-text pre,
|
||||
.page-add-reply .comment-text pre,
|
||||
.page-edit-reply .comment-text pre,
|
||||
.page-comments .reply-text pre,
|
||||
.page-add-comment .reply-text pre,
|
||||
.page-view-comments .reply-text pre,
|
||||
.container-edit-comment .reply-text pre,
|
||||
.container-add-reply .reply-text pre,
|
||||
.page-edit-comment .reply-text pre,
|
||||
.page-add-reply .reply-text pre,
|
||||
.page-edit-reply .reply-text pre {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.page-comments .reply-item,
|
||||
.page-add-comment .reply-item,
|
||||
.page-view-comments .reply-item,
|
||||
|
|
|
@ -168,7 +168,7 @@ define([
|
|||
},
|
||||
|
||||
onDoneComment: function(documentFlag) {
|
||||
var value = $('#comment-text').val();
|
||||
var value = $('#comment-text').val().trim();
|
||||
if (value.length > 0) {
|
||||
PE.getController('Common.Controllers.Collaboration').onAddNewComment(value, documentFlag);
|
||||
PE.getController('AddContainer').hideModal();
|
||||
|
|
|
@ -6559,17 +6559,6 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after
|
|||
padding: 16px 0;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.page-comments p,
|
||||
.add-comment p,
|
||||
.page-view-comments p,
|
||||
.container-edit-comment p,
|
||||
.container-add-reply p,
|
||||
.page-edit-comment p,
|
||||
.page-add-reply p,
|
||||
.page-edit-reply p {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
}
|
||||
.page-comments .list-reply,
|
||||
.add-comment .list-reply,
|
||||
.page-view-comments .list-reply,
|
||||
|
@ -6665,6 +6654,24 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after
|
|||
max-width: 100%;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.page-comments .comment-text pre,
|
||||
.add-comment .comment-text pre,
|
||||
.page-view-comments .comment-text pre,
|
||||
.container-edit-comment .comment-text pre,
|
||||
.container-add-reply .comment-text pre,
|
||||
.page-edit-comment .comment-text pre,
|
||||
.page-add-reply .comment-text pre,
|
||||
.page-edit-reply .comment-text pre,
|
||||
.page-comments .reply-text pre,
|
||||
.add-comment .reply-text pre,
|
||||
.page-view-comments .reply-text pre,
|
||||
.container-edit-comment .reply-text pre,
|
||||
.container-add-reply .reply-text pre,
|
||||
.page-edit-comment .reply-text pre,
|
||||
.page-add-reply .reply-text pre,
|
||||
.page-edit-reply .reply-text pre {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.page-comments .reply-item,
|
||||
.add-comment .reply-item,
|
||||
.page-view-comments .reply-item,
|
||||
|
|
|
@ -6129,17 +6129,6 @@ html.phone .document-menu .list-block .item-link {
|
|||
.page-edit-reply .list-block .item-inner:after {
|
||||
content: none;
|
||||
}
|
||||
.page-comments p,
|
||||
.page-add-comment p,
|
||||
.page-view-comments p,
|
||||
.container-edit-comment p,
|
||||
.container-add-reply p,
|
||||
.page-edit-comment p,
|
||||
.page-add-reply p,
|
||||
.page-edit-reply p {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
}
|
||||
.page-comments .list-reply,
|
||||
.page-add-comment .list-reply,
|
||||
.page-view-comments .list-reply,
|
||||
|
@ -6234,6 +6223,24 @@ html.phone .document-menu .list-block .item-link {
|
|||
max-width: 100%;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.page-comments .comment-text pre,
|
||||
.page-add-comment .comment-text pre,
|
||||
.page-view-comments .comment-text pre,
|
||||
.container-edit-comment .comment-text pre,
|
||||
.container-add-reply .comment-text pre,
|
||||
.page-edit-comment .comment-text pre,
|
||||
.page-add-reply .comment-text pre,
|
||||
.page-edit-reply .comment-text pre,
|
||||
.page-comments .reply-text pre,
|
||||
.page-add-comment .reply-text pre,
|
||||
.page-view-comments .reply-text pre,
|
||||
.container-edit-comment .reply-text pre,
|
||||
.container-add-reply .reply-text pre,
|
||||
.page-edit-comment .reply-text pre,
|
||||
.page-add-reply .reply-text pre,
|
||||
.page-edit-reply .reply-text pre {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.page-comments .reply-item,
|
||||
.page-add-comment .reply-item,
|
||||
.page-view-comments .reply-item,
|
||||
|
|
|
@ -157,7 +157,7 @@ define([
|
|||
},
|
||||
|
||||
onDoneComment: function(documentFlag) {
|
||||
var value = $('#comment-text').val();
|
||||
var value = $('#comment-text').val().trim();
|
||||
if (value.length > 0) {
|
||||
if (SSE.getController('Common.Controllers.Collaboration').onAddNewComment(value, documentFlag)) {
|
||||
this.view.isComments = true;
|
||||
|
|
|
@ -6552,17 +6552,6 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after
|
|||
padding: 16px 0;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.page-comments p,
|
||||
.add-comment p,
|
||||
.page-view-comments p,
|
||||
.container-edit-comment p,
|
||||
.container-add-reply p,
|
||||
.page-edit-comment p,
|
||||
.page-add-reply p,
|
||||
.page-edit-reply p {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
}
|
||||
.page-comments .list-reply,
|
||||
.add-comment .list-reply,
|
||||
.page-view-comments .list-reply,
|
||||
|
@ -6658,6 +6647,24 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after
|
|||
max-width: 100%;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.page-comments .comment-text pre,
|
||||
.add-comment .comment-text pre,
|
||||
.page-view-comments .comment-text pre,
|
||||
.container-edit-comment .comment-text pre,
|
||||
.container-add-reply .comment-text pre,
|
||||
.page-edit-comment .comment-text pre,
|
||||
.page-add-reply .comment-text pre,
|
||||
.page-edit-reply .comment-text pre,
|
||||
.page-comments .reply-text pre,
|
||||
.add-comment .reply-text pre,
|
||||
.page-view-comments .reply-text pre,
|
||||
.container-edit-comment .reply-text pre,
|
||||
.container-add-reply .reply-text pre,
|
||||
.page-edit-comment .reply-text pre,
|
||||
.page-add-reply .reply-text pre,
|
||||
.page-edit-reply .reply-text pre {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.page-comments .reply-item,
|
||||
.add-comment .reply-item,
|
||||
.page-view-comments .reply-item,
|
||||
|
|
|
@ -6139,17 +6139,6 @@ html.phone .document-menu .list-block .item-link {
|
|||
.page-edit-reply .list-block .item-inner:after {
|
||||
content: none;
|
||||
}
|
||||
.page-comments p,
|
||||
.page-add-comment p,
|
||||
.page-view-comments p,
|
||||
.container-edit-comment p,
|
||||
.container-add-reply p,
|
||||
.page-edit-comment p,
|
||||
.page-add-reply p,
|
||||
.page-edit-reply p {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
}
|
||||
.page-comments .list-reply,
|
||||
.page-add-comment .list-reply,
|
||||
.page-view-comments .list-reply,
|
||||
|
@ -6244,6 +6233,24 @@ html.phone .document-menu .list-block .item-link {
|
|||
max-width: 100%;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.page-comments .comment-text pre,
|
||||
.page-add-comment .comment-text pre,
|
||||
.page-view-comments .comment-text pre,
|
||||
.container-edit-comment .comment-text pre,
|
||||
.container-add-reply .comment-text pre,
|
||||
.page-edit-comment .comment-text pre,
|
||||
.page-add-reply .comment-text pre,
|
||||
.page-edit-reply .comment-text pre,
|
||||
.page-comments .reply-text pre,
|
||||
.page-add-comment .reply-text pre,
|
||||
.page-view-comments .reply-text pre,
|
||||
.container-edit-comment .reply-text pre,
|
||||
.container-add-reply .reply-text pre,
|
||||
.page-edit-comment .reply-text pre,
|
||||
.page-add-reply .reply-text pre,
|
||||
.page-edit-reply .reply-text pre {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.page-comments .reply-item,
|
||||
.page-add-comment .reply-item,
|
||||
.page-view-comments .reply-item,
|
||||
|
|
Loading…
Reference in a new issue