[DE mobile] Comments (add sort comments in collaboration, fix animation when open add comment)
This commit is contained in:
parent
baf8ae6074
commit
37007d9005
|
@ -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">',
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
})());
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue