[SSE] Full info for the popover comment in hint mode

This commit is contained in:
Alexei Koshelev 2022-11-04 22:57:10 +03:00
parent 36b461f6e1
commit a86884c73a
5 changed files with 14 additions and 7 deletions

View file

@ -74,6 +74,7 @@ define([
subEditStrings : {},
filter : undefined,
hintmode : false,
fullInfoHintMode: false,
viewmode: false,
isSelectedComment : false,
uids : [],
@ -186,7 +187,8 @@ define([
this.currentUserId = data.config.user.id;
this.sdkViewName = data['sdkviewname'] || this.sdkViewName;
this.hintmode = data['hintmode'] || false;
this.viewmode = data['viewmode'] || false;
this.fullInfoHintMode = data['fullInfoHintMode'] || false;
this.viewmode = data['viewmode'] || false;
}
},
setApi: function (api) {
@ -1355,6 +1357,7 @@ define([
removable : (this.mode.canDeleteComments || (data.asc_getUserId() == this.currentUserId)) && AscCommon.UserInfoParser.canDeleteComment(data.asc_getUserName()),
hide : !AscCommon.UserInfoParser.canViewComment(data.asc_getUserName()),
hint : !this.mode.canComments,
fullInfoInHint : this.fullInfoHintMode,
groupName : (groupname && groupname.length>1) ? groupname[1] : null
});
if (comment) {

View file

@ -82,6 +82,7 @@ define([
hide : false,
filtered : false,
hint : false,
fullInfoInHint : false,
dummy : undefined,
editable : true,
removable : true

View file

@ -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 && !scope.viewmode) { %>
<% if ((fullInfoInHint || !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 && !scope.viewmode) { %>
<% if (!showReplyInPopover && !hideAddReply && (fullInfoInHint || !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 && !scope.viewmode) { %>
<% if ((fullInfoInHint || !hint) && !scope.viewmode) { %>
<% if (editable) { %>
<div class="btn-edit img-commonctrl"></div>
<% } %>
@ -81,9 +81,9 @@
<div class="btn-delete img-commonctrl"></div>
<% } %>
<% } %>
<% if (editable && !hint && !scope.viewmode) { %>
<% if (editable && (fullInfoInHint || !hint) && !scope.viewmode) { %>
<div class="btn-resolve <% if (resolved) print('comment-resolved') %>" data-toggle="tooltip"></div>
<% } else if (!hint && (!editable || scope.viewmode) && resolved) { %>
<% } else if ((fullInfoInHint || !hint) && (!editable || scope.viewmode) && resolved) { %>
<div class="icon-resolve i-comment-resolved" data-toggle="tooltip"></div>
<% } %>
</div>

View file

@ -321,7 +321,9 @@ define([
if (record.get('hint')) {
me.fireEvent('comment:disableHint', [record]);
return;
if(!record.get('fullInfoInHint'))
return;
}
if (btn.hasClass('btn-edit')) {

View file

@ -1458,6 +1458,7 @@ define([
commentsController.setConfig({
config : this.editorConfig,
sdkviewname : '#ws-canvas-outer',
fullInfoHintMode : true,
hintmode : true},
this.api);
}