[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) {
|
if ($('#no-comments').length > 0) {
|
||||||
$('#no-comments').remove();
|
$('#no-comments').remove();
|
||||||
}
|
}
|
||||||
|
var sortComments = _.sortBy(comments, 'time').reverse();
|
||||||
var $listComments = $('#comments-list'),
|
var $listComments = $('#comments-list'),
|
||||||
items = [];
|
items = [];
|
||||||
_.each(comments, function (comment) {
|
_.each(sortComments, function (comment) {
|
||||||
var itemTemplate = [
|
var itemTemplate = [
|
||||||
'<li class="comment item-content" data-uid="<%= item.uid %>">',
|
'<li class="comment item-content" data-uid="<%= item.uid %>">',
|
||||||
'<div class="item-inner">',
|
'<div class="item-inner">',
|
||||||
|
|
|
@ -126,11 +126,15 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
hideMenu: function () {
|
hideMenu: function () {
|
||||||
|
if ($('.document-menu').length > 0) {
|
||||||
$('#' + _anchorId)
|
$('#' + _anchorId)
|
||||||
.css('left', -1000)
|
.css('left', -1000)
|
||||||
.css('top', -1000);
|
.css('top', -1000);
|
||||||
|
|
||||||
uiApp.closeModal('.document-menu.modal-in');
|
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) {
|
renderComment: function(comment) {
|
||||||
|
_.delay(function () {
|
||||||
var $commentInfo = $('#comment-info');
|
var $commentInfo = $('#comment-info');
|
||||||
var template = [
|
var template = [
|
||||||
'<% if (android) { %><div class="header-comment"><div class="initials-comment" style="background-color: <%= comment.usercolor %>;"><%= comment.userInitials %></div><div><% } %>',
|
'<% 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];
|
var $textarea = $('.comment-textarea')[0];
|
||||||
$textarea.focus();
|
$textarea.focus();
|
||||||
});
|
});
|
||||||
|
}, 100);
|
||||||
},
|
},
|
||||||
|
|
||||||
renderNumFormat: function (dataFormat, selectFormat) {
|
renderNumFormat: function (dataFormat, selectFormat) {
|
||||||
|
|
Loading…
Reference in a new issue