[DE mobile] Comments (add sort comments in collaboration, fix animation when open add comment)

This commit is contained in:
JuliaSvinareva 2020-04-07 13:36:38 +03:00
parent baf8ae6074
commit 37007d9005
3 changed files with 29 additions and 22 deletions

View file

@ -220,9 +220,10 @@ define([
if ($('#no-comments').length > 0) {
$('#no-comments').remove();
}
var sortComments = _.sortBy(comments, 'time').reverse();
var $listComments = $('#comments-list'),
items = [];
_.each(comments, function (comment) {
_.each(sortComments, function (comment) {
var itemTemplate = [
'<li class="comment item-content" data-uid="<%= item.uid %>">',
'<div class="item-inner">',

View file

@ -126,11 +126,15 @@ define([
},
hideMenu: function () {
if ($('.document-menu').length > 0) {
$('#' + _anchorId)
.css('left', -1000)
.css('top', -1000);
uiApp.closeModal('.document-menu.modal-in');
} else if ($('.actions-modal').length > 0) {
uiApp.closeModal('.actions-modal.modal-in');
}
}
}
})());

View file

@ -149,6 +149,7 @@ define([
},
renderComment: function(comment) {
_.delay(function () {
var $commentInfo = $('#comment-info');
var template = [
'<% if (android) { %><div class="header-comment"><div class="initials-comment" style="background-color: <%= comment.usercolor %>;"><%= comment.userInitials %></div><div><% } %>',
@ -166,6 +167,7 @@ define([
var $textarea = $('.comment-textarea')[0];
$textarea.focus();
});
}, 100);
},
renderNumFormat: function (dataFormat, selectFormat) {