[DE PE SSE] Add tooltips to resolved icon when we can not edit comment (bug 51488)

This commit is contained in:
JuliaSvinareva 2021-09-03 15:46:42 +03:00
parent 51e2efcf9a
commit 633ddd4e9c
8 changed files with 28 additions and 12 deletions

View file

@ -903,8 +903,6 @@ define([
// хотим показать тот же коментарий что был и выбран
return;
}
if (this.mode && !this.mode.canComments)
hint = true;
var popover = this.getPopover();
if (popover) {

View file

@ -83,7 +83,7 @@
<% if (editable && !scope.viewmode) { %>
<div class="btn-resolve <% if (resolved) print('comment-resolved') %>" data-toggle="tooltip"></div>
<% } else if ((!editable || scope.viewmode) && resolved) { %>
<div class="icon-resolve i-comment-resolved"></div>
<div class="icon-resolve i-comment-resolved" data-toggle="tooltip"></div>
<% } %>
</div>
<% } %>

View file

@ -7,7 +7,7 @@
<div class="color" style="display: inline-block; background-color: <% if (usercolor!==null) { %><%=usercolor%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getEncodedName(parsedName) %>
</div>
<div class="user-date"><%=date%></div>
<% if (!editTextInPopover || hint) { %>
<% if (!editTextInPopover || hint || scope.viewmode) { %>
<div oo_editor_input="true" tabindex="-1" class="user-message user-select"><%=scope.pickLink(comment)%></div>
<% } else { %>
<div class="inner-edit-ct">
@ -37,7 +37,7 @@
<div class="user-date"><%=item.get("date")%></div>
<% if (!item.get("editTextInPopover")) { %>
<div oo_editor_input="true" tabindex="-1" class="user-message user-select"><%=scope.pickLink(item.get("reply"))%></div>
<% if (!hint) { %>
<% if (!hint && !scope.viewmode) { %>
<div class="btns-reply-ct">
<% if (item.get("editable")) { %>
<div class="btn-edit img-commonctrl" data-value="<%=item.get("id")%>"></div>
@ -61,7 +61,7 @@
<!-- add reply button -->
<% if (!showReplyInPopover && !hideAddReply && !hint) { %>
<% if (!showReplyInPopover && !hideAddReply && !hint && !scope.viewmode) { %>
<% if (replys.length && !add_arrow) { %>
<label class="user-reply" style="margin-left: 20px; margin-top: 5px;" role="presentation" tabindex="-1">textAddReply</label>
<% } else { %>
@ -73,7 +73,7 @@
<% if (!editTextInPopover && !lock) { %>
<div class="edit-ct">
<% if (!hint) { %>
<% if (!hint && !scope.viewmode) { %>
<% if (editable) { %>
<div class="btn-edit img-commonctrl"></div>
<% } %>
@ -81,10 +81,10 @@
<div class="btn-delete img-commonctrl"></div>
<% } %>
<% } %>
<% if (editable && !hint) { %>
<% if (editable && !hint && !scope.viewmode) { %>
<div class="btn-resolve <% if (resolved) print('comment-resolved') %>" data-toggle="tooltip"></div>
<% } else if ((!editable || hint) && resolved) { %>
<div class="icon-resolve i-comment-resolved"></div>
<% } else if (!hint && (!editable || scope.viewmode) && resolved) { %>
<div class="icon-resolve i-comment-resolved" data-toggle="tooltip"></div>
<% } %>
</div>
<% } %>

View file

@ -447,6 +447,11 @@ define([
btns.each(function(idx, item){
arr.push($(item).data('bs.tooltip').tip());
});
btns = $(view.el).find('.i-comment-resolved');
btns.tooltip({title: me.textViewResolved, placement: 'cursor'});
btns.each(function(idx, item){
arr.push($(item).data('bs.tooltip').tip());
});
view.tipsArray = arr;
};
@ -831,6 +836,7 @@ define([
mniAuthorDesc: 'Author Z to A',
mniDateDesc: 'Newest',
mniDateAsc: 'Oldest',
textClosePanel: 'Close comments'
textClosePanel: 'Close comments',
textViewResolved: 'You have not permission for reopen comment'
}, Common.Views.Comments || {}))
});

View file

@ -269,6 +269,11 @@ define([
btns.each(function (idx, item) {
arr.push($(item).data('bs.tooltip').tip());
});
btns = $(view.el).find('.i-comment-resolved');
btns.tooltip({title: me.textViewResolved, placement: 'cursor'});
btns.each(function (idx, item) {
arr.push($(item).data('bs.tooltip').tip());
});
view.tipsArray = arr;
this.autoHeightTextBox();
};
@ -1246,6 +1251,7 @@ define([
textOpenAgain : "Open Again",
textFollowMove : 'Follow Move',
textMention : '+mention will provide access to the document and send an email',
textMentionNotify : '+mention will notify the user via email'
textMentionNotify : '+mention will notify the user via email',
textViewResolved : 'You have not permission for reopen comment'
}, Common.Views.ReviewPopover || {}))
});

View file

@ -257,6 +257,7 @@
"Common.Views.Comments.textResolve": "Resolve",
"Common.Views.Comments.textResolved": "Resolved",
"Common.Views.Comments.textSort": "Sort comments",
"Common.Views.Comments.textViewResolved": "You have not permission for reopen comment",
"Common.Views.CopyWarningDialog.textDontShow": "Don't show this message again",
"Common.Views.CopyWarningDialog.textMsg": "Copy, cut and paste actions using the editor toolbar buttons and context menu actions will be performed within this editor tab only.<br><br>To copy or paste to or from applications outside the editor tab use the following keyboard combinations:",
"Common.Views.CopyWarningDialog.textTitle": "Copy, Cut and Paste Actions",
@ -431,6 +432,7 @@
"Common.Views.ReviewPopover.textOpenAgain": "Open Again",
"Common.Views.ReviewPopover.textReply": "Reply",
"Common.Views.ReviewPopover.textResolve": "Resolve",
"Common.Views.ReviewPopover.textViewResolved": "You have not permission for reopen comment",
"Common.Views.SaveAsDlg.textLoading": "Loading",
"Common.Views.SaveAsDlg.textTitle": "Folder for save",
"Common.Views.SelectFileDlg.textLoading": "Loading",

View file

@ -150,6 +150,7 @@
"Common.Views.Comments.textResolve": "Resolve",
"Common.Views.Comments.textResolved": "Resolved",
"Common.Views.Comments.textSort": "Sort comments",
"Common.Views.Comments.textViewResolved": "You have not permission for reopen comment",
"Common.Views.CopyWarningDialog.textDontShow": "Don't show this message again",
"Common.Views.CopyWarningDialog.textMsg": "Copy, cut and paste actions using the editor toolbar buttons and context menu actions will be performed within this editor tab only.<br><br>To copy or paste to or from applications outside the editor tab use the following keyboard combinations:",
"Common.Views.CopyWarningDialog.textTitle": "Copy, Cut and Paste Actions",
@ -314,6 +315,7 @@
"Common.Views.ReviewPopover.textOpenAgain": "Open Again",
"Common.Views.ReviewPopover.textReply": "Reply",
"Common.Views.ReviewPopover.textResolve": "Resolve",
"Common.Views.ReviewPopover.textViewResolved": "You have not permission for reopen comment",
"Common.Views.SaveAsDlg.textLoading": "Loading",
"Common.Views.SaveAsDlg.textTitle": "Folder for save",
"Common.Views.SelectFileDlg.textLoading": "Loading",

View file

@ -199,6 +199,7 @@
"Common.Views.Comments.textResolve": "Resolve",
"Common.Views.Comments.textResolved": "Resolved",
"Common.Views.Comments.textSort": "Sort comments",
"Common.Views.Comments.textViewResolved": "You have not permission for reopen comment",
"Common.Views.CopyWarningDialog.textDontShow": "Don't show this message again",
"Common.Views.CopyWarningDialog.textMsg": "Copy, cut and paste actions using the editor toolbar buttons and context menu actions will be performed within this editor tab only.<br><br>To copy or paste to or from applications outside the editor tab use the following keyboard combinations:",
"Common.Views.CopyWarningDialog.textTitle": "Copy, Cut and Paste Actions",
@ -366,6 +367,7 @@
"Common.Views.ReviewPopover.textOpenAgain": "Open Again",
"Common.Views.ReviewPopover.textReply": "Reply",
"Common.Views.ReviewPopover.textResolve": "Resolve",
"Common.Views.ReviewPopover.textViewResolved": "You have not permission for reopen comment",
"Common.Views.SaveAsDlg.textLoading": "Loading",
"Common.Views.SaveAsDlg.textTitle": "Folder for save",
"Common.Views.SelectFileDlg.textLoading": "Loading",