Merge branch 'feature/mobile-settings' into develop

This commit is contained in:
Julia Radzhabova 2019-08-12 13:38:26 +03:00
commit 66b9884086
5 changed files with 54 additions and 39 deletions

View file

@ -147,41 +147,51 @@ define([
}, },
renderComments: function (comments) { renderComments: function (comments) {
var $listComments = $('#comments-list'), var $pageComments = $('.page-comments .page-content');
items = []; if (!comments) {
if ($('.comment').length > 0) {
_.each(comments, function (comment) { $('.comment').remove();
var itemTemplate = [ }
'<li class="comment item-content">', var template = '<div id="no-comments" style="text-align: center; margin-top: 35px;">' + this.textNoComments + '</div>';
'<div class="item-inner">', $pageComments.append(_.template(template));
'<p class="user-name"><%= item.username %></p>', } else {
'<p class="comment-date"><%= item.date %></p>', if ($('#no-comments').length > 0) {
'<% if(item.quote) {%>', $('#no-comments').remove();
'<p class="comment-quote" data-id="<%= item.uid %>"><%= item.quote %></p>', }
'<% } %>', var $listComments = $('#comments-list'),
'<p class="comment-text"><%= item.comment %></p>', items = [];
'<% if(replys > 0) {%>', _.each(comments, function (comment) {
'<ul class="list-reply">', var itemTemplate = [
'<% _.each(item.replys, function (reply) { %>', '<li class="comment item-content">',
'<li class="reply-item">', '<div class="item-inner">',
'<p class="user-name"><%= reply.username %></p>', '<p class="user-name"><%= item.username %></p>',
'<p class="reply-date"><%= reply.date %></p>', '<p class="comment-date"><%= item.date %></p>',
'<p class="reply-text"><%= reply.reply %></p>', '<% if(item.quote) {%>',
'</li>', '<p class="comment-quote" data-id="<%= item.uid %>"><%= item.quote %></p>',
'<% }); %>', '<% } %>',
'</ul>', '<p class="comment-text"><%= item.comment %></p>',
'<% } %>', '<% if(replys > 0) {%>',
'</div>', '<ul class="list-reply">',
'</li>' '<% _.each(item.replys, function (reply) { %>',
].join(''); '<li class="reply-item">',
items.push(_.template(itemTemplate)({ '<p class="user-name"><%= reply.username %></p>',
android: Framework7.prototype.device.android, '<p class="reply-date"><%= reply.date %></p>',
item: comment, '<p class="reply-text"><%= reply.reply %></p>',
replys: comment.replys.length '</li>',
})); '<% }); %>',
}); '</ul>',
'<% } %>',
$listComments.html(items); '</div>',
'</li>'
].join('');
items.push(_.template(itemTemplate)({
android: Framework7.prototype.device.android,
item: comment,
replys: comment.replys.length,
}));
});
$listComments.html(items);
}
}, },
@ -198,8 +208,8 @@ define([
textFinal: 'Final', textFinal: 'Final',
textOriginal: 'Original', textOriginal: 'Original',
textChange: 'Review Change', textChange: 'Review Change',
textEditUsers: 'Users' textEditUsers: 'Users',
textNoComments: "This document doesn\'t contain comments"
} }
})(), Common.Views.Collaboration || {})) })(), Common.Views.Collaboration || {}))
}); });

View file

@ -75,6 +75,7 @@
"Common.Views.Collaboration.textReview": "Track Changes", "Common.Views.Collaboration.textReview": "Track Changes",
"Common.Views.Collaboration.textReviewing": "Review", "Common.Views.Collaboration.textReviewing": "Review",
"Common.Views.Collaboration.textСomments": "Сomments", "Common.Views.Collaboration.textСomments": "Сomments",
"Common.Views.Collaboration.textNoComments": "This document doesn't contain comments",
"DE.Controllers.AddContainer.textImage": "Image", "DE.Controllers.AddContainer.textImage": "Image",
"DE.Controllers.AddContainer.textOther": "Other", "DE.Controllers.AddContainer.textOther": "Other",
"DE.Controllers.AddContainer.textShape": "Shape", "DE.Controllers.AddContainer.textShape": "Shape",

View file

@ -8,6 +8,7 @@
"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.textNoComments": "This presentation doesn't contain comments",
"PE.Controllers.AddContainer.textImage": "Image", "PE.Controllers.AddContainer.textImage": "Image",
"PE.Controllers.AddContainer.textLink": "Link", "PE.Controllers.AddContainer.textLink": "Link",
"PE.Controllers.AddContainer.textShape": "Shape", "PE.Controllers.AddContainer.textShape": "Shape",

View file

@ -200,7 +200,7 @@ define([
var $view = $('.settings'); var $view = $('.settings');
var disabled = text == 'locked'; var disabled = text == 'locked';
disabled && (text = ' '); disabled && (text = this.textSelectedRange);
$view.find('#add-link-display input').prop('disabled', disabled).val(text); $view.find('#add-link-display input').prop('disabled', disabled).val(text);
$view.find('#add-link-display .label').toggleClass('disabled', disabled); $view.find('#add-link-display .label').toggleClass('disabled', disabled);
}, },
@ -261,7 +261,8 @@ define([
textInternalLink: 'Internal Data Range', textInternalLink: 'Internal Data Range',
textSheet: 'Sheet', textSheet: 'Sheet',
textRange: 'Range', textRange: 'Range',
textRequired: 'Required' textRequired: 'Required',
textSelectedRange: 'Selected Range'
} }
})(), SSE.Views.AddLink || {})) })(), SSE.Views.AddLink || {}))
}); });

View file

@ -8,6 +8,7 @@
"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.textNoComments": "This spreadsheet doesn't contain comments",
"SSE.Controllers.AddChart.txtDiagramTitle": "Chart Title", "SSE.Controllers.AddChart.txtDiagramTitle": "Chart Title",
"SSE.Controllers.AddChart.txtSeries": "Series", "SSE.Controllers.AddChart.txtSeries": "Series",
"SSE.Controllers.AddChart.txtXAxis": "X Axis", "SSE.Controllers.AddChart.txtXAxis": "X Axis",
@ -332,6 +333,7 @@
"SSE.Views.AddLink.textRequired": "Required", "SSE.Views.AddLink.textRequired": "Required",
"SSE.Views.AddLink.textSheet": "Sheet", "SSE.Views.AddLink.textSheet": "Sheet",
"SSE.Views.AddLink.textTip": "Screen Tip", "SSE.Views.AddLink.textTip": "Screen Tip",
"SSE.Views.AddLink.textSelectedRange": "Selected Range",
"SSE.Views.AddOther.textAddress": "Address", "SSE.Views.AddOther.textAddress": "Address",
"SSE.Views.AddOther.textBack": "Back", "SSE.Views.AddOther.textBack": "Back",
"SSE.Views.AddOther.textFilter": "Filter", "SSE.Views.AddOther.textFilter": "Filter",