[Common mobile] Add no comment text
This commit is contained in:
parent
69d6f4b141
commit
03c94b12eb
|
@ -147,9 +147,20 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
renderComments: function (comments) {
|
renderComments: function (comments) {
|
||||||
|
var $pageComments = $('.page-comments .page-content');
|
||||||
|
if (!comments) {
|
||||||
|
if ($('.comment').length > 0) {
|
||||||
|
$('.comment').remove();
|
||||||
|
}
|
||||||
|
var textNoComments = !!window.DE ? this.textNoDocumentComments : !!window.PE ? this.textNoPresentationComments : this.textNoSpreadsheetComments,
|
||||||
|
template = '<div id="no-comments" style="text-align: center; margin-top: 35px;">' + textNoComments + '</div>';
|
||||||
|
$pageComments.append(_.template(template));
|
||||||
|
} else {
|
||||||
|
if ($('#no-comments').length > 0) {
|
||||||
|
$('#no-comments').remove();
|
||||||
|
}
|
||||||
var $listComments = $('#comments-list'),
|
var $listComments = $('#comments-list'),
|
||||||
items = [];
|
items = [];
|
||||||
|
|
||||||
_.each(comments, function (comment) {
|
_.each(comments, function (comment) {
|
||||||
var itemTemplate = [
|
var itemTemplate = [
|
||||||
'<li class="comment item-content">',
|
'<li class="comment item-content">',
|
||||||
|
@ -177,11 +188,11 @@ define([
|
||||||
items.push(_.template(itemTemplate)({
|
items.push(_.template(itemTemplate)({
|
||||||
android: Framework7.prototype.device.android,
|
android: Framework7.prototype.device.android,
|
||||||
item: comment,
|
item: comment,
|
||||||
replys: comment.replys.length
|
replys: comment.replys.length,
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
$listComments.html(items);
|
$listComments.html(items);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
@ -198,7 +209,11 @@ define([
|
||||||
textFinal: 'Final',
|
textFinal: 'Final',
|
||||||
textOriginal: 'Original',
|
textOriginal: 'Original',
|
||||||
textChange: 'Review Change',
|
textChange: 'Review Change',
|
||||||
textEditUsers: 'Users'
|
textEditUsers: 'Users',
|
||||||
|
textNoDocumentComments: 'This document doesn\'t contain comments',
|
||||||
|
textNoSpreadsheetComments: 'This spreadsheet doesn\'t contain comments',
|
||||||
|
textNoPresentationComments: 'This presentation doesn\'t contain comments'
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})(), Common.Views.Collaboration || {}))
|
})(), Common.Views.Collaboration || {}))
|
||||||
|
|
|
@ -594,5 +594,6 @@
|
||||||
"Common.Views.Collaboration.textFinal": "Final",
|
"Common.Views.Collaboration.textFinal": "Final",
|
||||||
"Common.Views.Collaboration.textOriginal": "Original",
|
"Common.Views.Collaboration.textOriginal": "Original",
|
||||||
"Common.Views.Collaboration.textChange": "Review Change",
|
"Common.Views.Collaboration.textChange": "Review Change",
|
||||||
"Common.Views.Collaboration.textEditUsers": "Users"
|
"Common.Views.Collaboration.textEditUsers": "Users",
|
||||||
|
"Common.Views.Collaboration.textNoDocumentComments": "This document doesn\'t contain comments"
|
||||||
}
|
}
|
|
@ -495,5 +495,6 @@
|
||||||
"Common.Views.Collaboration.textBack": "Back",
|
"Common.Views.Collaboration.textBack": "Back",
|
||||||
"Common.Views.Collaboration.textCollaboration": "Collaboration",
|
"Common.Views.Collaboration.textCollaboration": "Collaboration",
|
||||||
"Common.Views.Collaboration.textEditUsers": "Users",
|
"Common.Views.Collaboration.textEditUsers": "Users",
|
||||||
"Common.Views.Collaboration.textСomments": "Сomments"
|
"Common.Views.Collaboration.textСomments": "Сomments",
|
||||||
|
"Common.Views.Collaboration.textNoPresentationComments": "This presentation doesn\'t contain comments"
|
||||||
}
|
}
|
|
@ -580,5 +580,6 @@
|
||||||
"Common.Views.Collaboration.textBack": "Back",
|
"Common.Views.Collaboration.textBack": "Back",
|
||||||
"Common.Views.Collaboration.textCollaboration": "Collaboration",
|
"Common.Views.Collaboration.textCollaboration": "Collaboration",
|
||||||
"Common.Views.Collaboration.textEditUsers": "Users",
|
"Common.Views.Collaboration.textEditUsers": "Users",
|
||||||
"Common.Views.Collaboration.textСomments": "Сomments"
|
"Common.Views.Collaboration.textСomments": "Сomments",
|
||||||
|
"Common.Views.Collaboration.textNoSpreadsheetComments": "This spreadsheet doesn\'t contain comments"
|
||||||
}
|
}
|
Loading…
Reference in a new issue