diff --git a/apps/common/main/lib/controller/Comments.js b/apps/common/main/lib/controller/Comments.js
index f738c8b40..08e654925 100644
--- a/apps/common/main/lib/controller/Comments.js
+++ b/apps/common/main/lib/controller/Comments.js
@@ -128,7 +128,8 @@ define([
'comment:addDummyComment': _.bind(this.onAddDummyComment, this)
},
'Common.Views.ReviewChanges': {
- 'comment:removeComments': _.bind(this.onRemoveComments, this)
+ 'comment:removeComments': _.bind(this.onRemoveComments, this),
+ 'comment:resolveComments': _.bind(this.onResolveComments, this)
}
});
@@ -241,6 +242,13 @@ define([
this.api.asc_RemoveAllComments(type=='my' || !this.mode.canDeleteComments, type=='current');// 1 param = true if remove only my comments, 2 param - remove current comments
}
},
+
+ onResolveComments: function (type) {
+ if (this.api) {
+ this.api.asc_ResolveAllComments(type=='my' || !this.mode.canEditComments, type=='current');// 1 param = true if resolve only my comments, 2 param - resolve current comments
+ }
+ },
+
onResolveComment: function (uid) {
var t = this,
reply = null,
diff --git a/apps/common/main/lib/view/ReviewChanges.js b/apps/common/main/lib/view/ReviewChanges.js
index 63ae72f2f..6b925d030 100644
--- a/apps/common/main/lib/view/ReviewChanges.js
+++ b/apps/common/main/lib/view/ReviewChanges.js
@@ -65,6 +65,7 @@ define([
'
' +
'' +
'' +
+ '' +
'
' +
'' +
'' +
@@ -208,6 +209,15 @@ define([
me.fireEvent('comment:removeComments', [item.value]);
});
}
+ if (this.btnCommentResolve) {
+ this.btnCommentResolve.on('click', function (e) {
+ me.fireEvent('comment:resolveComments', ['current']);
+ });
+
+ this.btnCommentResolve.menu.on('item:click', function (menu, item, e) {
+ me.fireEvent('comment:resolveComments', [item.value]);
+ });
+ }
}
return {
@@ -354,6 +364,12 @@ define([
split: true,
iconCls: 'toolbar__icon btn-rem-comment'
});
+ this.btnCommentResolve = new Common.UI.Button({
+ cls: 'btn-toolbar x-huge icon-top',
+ caption: this.txtCommentResolve,
+ split: true,
+ iconCls: 'toolbar__icon btn-resolve-comment'
+ });
}
var filter = Common.localStorage.getKeysFilter();
@@ -532,6 +548,28 @@ define([
me.btnCommentRemove.updateHint([me.tipCommentRemCurrent, me.tipCommentRem]);
}
+ if (me.btnCommentResolve) {
+ var items = [
+ {
+ caption: config.canEditComments ? me.txtCommentResolveCurrent : me.txtCommentResolveMyCurrent,
+ value: 'current'
+ },
+ {
+ caption: me.txtCommentResolveMy,
+ value: 'my'
+ }
+ ];
+ if (config.canEditComments)
+ items.push({
+ caption: me.txtCommentResolveAll,
+ value: 'all'
+ });
+ me.btnCommentResolve.setMenu(
+ new Common.UI.Menu({items: items})
+ );
+ me.btnCommentResolve.updateHint([me.tipCommentResolveCurrent, me.tipCommentResolve]);
+ }
+
var separator_sharing = !(me.btnSharing || me.btnCoAuthMode) ? me.$el.find('.separator.sharing') : '.separator.sharing',
separator_comments = !(config.canComments && config.canCoAuthoring) ? me.$el.find('.separator.comments') : '.separator.comments',
separator_review = !(config.canReview || config.canViewReview) ? me.$el.find('.separator.review') : '.separator.review',
@@ -591,6 +629,7 @@ define([
this.btnHistory && this.btnHistory.render(this.$el.find('#slot-btn-history'));
this.btnChat && this.btnChat.render(this.$el.find('#slot-btn-chat'));
this.btnCommentRemove && this.btnCommentRemove.render(this.$el.find('#slot-comment-remove'));
+ this.btnCommentResolve && this.btnCommentResolve.render(this.$el.find('#slot-comment-resolve'));
return this.$el;
},
@@ -742,6 +781,7 @@ define([
// this.btnChat && this.btnChat.setDisabled(state);
this.btnCommentRemove && this.btnCommentRemove.setDisabled(state || !Common.Utils.InternalSettings.get(this.appPrefix + "settings-livecomment"));
+ this.btnCommentResolve && this.btnCommentResolve.setDisabled(state || !Common.Utils.InternalSettings.get(this.appPrefix + "settings-livecomment"));
},
onLostEditRights: function() {
@@ -804,6 +844,13 @@ define([
txtCommentRemMyCurrent: 'Remove My Current Comments',
txtCommentRemMy: 'Remove My Comments',
txtCommentRemAll: 'Remove All Comments',
+ txtCommentResolve: 'Resolve',
+ tipCommentResolveCurrent: 'Resolve current comments',
+ tipCommentResolve: 'Resolve comments',
+ txtCommentResolveCurrent: 'Resolve Current Comments',
+ txtCommentResolveMyCurrent: 'Resolve My Current Comments',
+ txtCommentResolveMy: 'Resolve My Comments',
+ txtCommentResolveAll: 'Resolve All Comments',
txtOnGlobal: 'ON for me and everyone',
txtOffGlobal: 'OFF for me and everyone',
txtOn: 'ON for me',
diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json
index 5b1a4bccd..0696a843d 100644
--- a/apps/documenteditor/main/locale/en.json
+++ b/apps/documenteditor/main/locale/en.json
@@ -387,6 +387,13 @@
"Common.Views.ReviewChanges.txtSpelling": "Spell Checking",
"Common.Views.ReviewChanges.txtTurnon": "Track Changes",
"Common.Views.ReviewChanges.txtView": "Display Mode",
+ "Common.Views.ReviewChanges.txtCommentResolve": "Resolve",
+ "Common.Views.ReviewChanges.tipCommentResolveCurrent": "Resolve current comments",
+ "Common.Views.ReviewChanges.tipCommentResolve": "Resolve comments",
+ "Common.Views.ReviewChanges.txtCommentResolveCurrent": "Resolve Current Comments",
+ "Common.Views.ReviewChanges.txtCommentResolveMyCurrent": "Resolve My Current Comments",
+ "Common.Views.ReviewChanges.txtCommentResolveMy": "Resolve My Comments",
+ "Common.Views.ReviewChanges.txtCommentResolveAll": "Resolve All Comments",
"Common.Views.ReviewChangesDialog.textTitle": "Review Changes",
"Common.Views.ReviewChangesDialog.txtAccept": "Accept",
"Common.Views.ReviewChangesDialog.txtAcceptAll": "Accept All Changes",
diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json
index a59acdb7c..9922a52af 100644
--- a/apps/presentationeditor/main/locale/en.json
+++ b/apps/presentationeditor/main/locale/en.json
@@ -272,6 +272,13 @@
"Common.Views.ReviewChanges.txtSpelling": "Spell Checking",
"Common.Views.ReviewChanges.txtTurnon": "Track Changes",
"Common.Views.ReviewChanges.txtView": "Display Mode",
+ "Common.Views.ReviewChanges.txtCommentResolve": "Resolve",
+ "Common.Views.ReviewChanges.tipCommentResolveCurrent": "Resolve current comments",
+ "Common.Views.ReviewChanges.tipCommentResolve": "Resolve comments",
+ "Common.Views.ReviewChanges.txtCommentResolveCurrent": "Resolve Current Comments",
+ "Common.Views.ReviewChanges.txtCommentResolveMyCurrent": "Resolve My Current Comments",
+ "Common.Views.ReviewChanges.txtCommentResolveMy": "Resolve My Comments",
+ "Common.Views.ReviewChanges.txtCommentResolveAll": "Resolve All Comments",
"Common.Views.ReviewPopover.textAdd": "Add",
"Common.Views.ReviewPopover.textAddReply": "Add Reply",
"Common.Views.ReviewPopover.textCancel": "Cancel",
diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json
index 5725cd740..b6c870820 100644
--- a/apps/spreadsheeteditor/main/locale/en.json
+++ b/apps/spreadsheeteditor/main/locale/en.json
@@ -324,6 +324,13 @@
"Common.Views.ReviewChanges.txtSpelling": "Spell Checking",
"Common.Views.ReviewChanges.txtTurnon": "Track Changes",
"Common.Views.ReviewChanges.txtView": "Display Mode",
+ "Common.Views.ReviewChanges.txtCommentResolve": "Resolve",
+ "Common.Views.ReviewChanges.tipCommentResolveCurrent": "Resolve current comments",
+ "Common.Views.ReviewChanges.tipCommentResolve": "Resolve comments",
+ "Common.Views.ReviewChanges.txtCommentResolveCurrent": "Resolve Current Comments",
+ "Common.Views.ReviewChanges.txtCommentResolveMyCurrent": "Resolve My Current Comments",
+ "Common.Views.ReviewChanges.txtCommentResolveMy": "Resolve My Comments",
+ "Common.Views.ReviewChanges.txtCommentResolveAll": "Resolve All Comments",
"Common.Views.ReviewPopover.textAdd": "Add",
"Common.Views.ReviewPopover.textAddReply": "Add Reply",
"Common.Views.ReviewPopover.textCancel": "Cancel",