From a86884c73a96eaf3c74c53fc74471226494fc104 Mon Sep 17 00:00:00 2001 From: Alexei Koshelev Date: Fri, 4 Nov 2022 22:57:10 +0300 Subject: [PATCH] [SSE] Full info for the popover comment in hint mode --- apps/common/main/lib/controller/Comments.js | 5 ++++- apps/common/main/lib/model/Comment.js | 1 + apps/common/main/lib/template/CommentsPopover.template | 10 +++++----- apps/common/main/lib/view/ReviewPopover.js | 4 +++- apps/spreadsheeteditor/main/app/controller/Main.js | 1 + 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/apps/common/main/lib/controller/Comments.js b/apps/common/main/lib/controller/Comments.js index 2203d87fb..9ec25f9d0 100644 --- a/apps/common/main/lib/controller/Comments.js +++ b/apps/common/main/lib/controller/Comments.js @@ -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) { diff --git a/apps/common/main/lib/model/Comment.js b/apps/common/main/lib/model/Comment.js index 9c570db91..5be4e352b 100644 --- a/apps/common/main/lib/model/Comment.js +++ b/apps/common/main/lib/model/Comment.js @@ -82,6 +82,7 @@ define([ hide : false, filtered : false, hint : false, + fullInfoInHint : false, dummy : undefined, editable : true, removable : true diff --git a/apps/common/main/lib/template/CommentsPopover.template b/apps/common/main/lib/template/CommentsPopover.template index a0d7b0854..e7e11ba2f 100644 --- a/apps/common/main/lib/template/CommentsPopover.template +++ b/apps/common/main/lib/template/CommentsPopover.template @@ -37,7 +37,7 @@
<%=item.get("date")%>
<% if (!item.get("editTextInPopover")) { %>
<%=scope.pickLink(item.get("reply"))%>
- <% if (!hint && !scope.viewmode) { %> + <% if ((fullInfoInHint || !hint) && !scope.viewmode) { %>
<% if (item.get("editable")) { %>
">
@@ -61,7 +61,7 @@ - <% if (!showReplyInPopover && !hideAddReply && !hint && !scope.viewmode) { %> + <% if (!showReplyInPopover && !hideAddReply && (fullInfoInHint || !hint) && !scope.viewmode) { %> <% if (replys.length && !add_arrow) { %> <% } else { %> @@ -73,7 +73,7 @@ <% if (!editTextInPopover && !lock) { %>
- <% if (!hint && !scope.viewmode) { %> + <% if ((fullInfoInHint || !hint) && !scope.viewmode) { %> <% if (editable) { %>
<% } %> @@ -81,9 +81,9 @@
<% } %> <% } %> - <% if (editable && !hint && !scope.viewmode) { %> + <% if (editable && (fullInfoInHint || !hint) && !scope.viewmode) { %>
- <% } else if (!hint && (!editable || scope.viewmode) && resolved) { %> + <% } else if ((fullInfoInHint || !hint) && (!editable || scope.viewmode) && resolved) { %>
<% } %>
diff --git a/apps/common/main/lib/view/ReviewPopover.js b/apps/common/main/lib/view/ReviewPopover.js index 0c8c31b42..1a05dda56 100644 --- a/apps/common/main/lib/view/ReviewPopover.js +++ b/apps/common/main/lib/view/ReviewPopover.js @@ -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')) { diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 9ffd6e90b..1d4b4a67b 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1458,6 +1458,7 @@ define([ commentsController.setConfig({ config : this.editorConfig, sdkviewname : '#ws-canvas-outer', + fullInfoHintMode : true, hintmode : true}, this.api); }