diff --git a/apps/common/main/lib/controller/ReviewChanges.js b/apps/common/main/lib/controller/ReviewChanges.js index ced73f3b7..f2373f9eb 100644 --- a/apps/common/main/lib/controller/ReviewChanges.js +++ b/apps/common/main/lib/controller/ReviewChanges.js @@ -86,7 +86,8 @@ define([ 'Common.Views.ReviewPopover': { 'reviewchange:accept': _.bind(this.onAcceptClick, this), 'reviewchange:reject': _.bind(this.onRejectClick, this), - 'reviewchange:delete': _.bind(this.onDeleteClick, this) + 'reviewchange:delete': _.bind(this.onDeleteClick, this), + 'reviewchange:goto': _.bind(this.onGotoClick, this) } }); }, @@ -237,10 +238,11 @@ define([ _.each(data, function(item) { var changetext = '', proptext = '', value = item.get_Value(), + movetype = item.get_MoveType(), settings = false; switch (item.get_Type()) { case Asc.c_oAscRevisionsChangeType.TextAdd: - changetext = me.textInserted; + changetext = (movetype==Asc.c_oAscRevisionsMove.NoMove) ? me.textInserted : me.textParaMoveTo; if (typeof value == 'object') { _.each(value, function(obj) { if (typeof obj === 'string') @@ -267,7 +269,7 @@ define([ } break; case Asc.c_oAscRevisionsChangeType.TextRem: - changetext = me.textDeleted; + changetext = (movetype==Asc.c_oAscRevisionsMove.NoMove) ? me.textDeleted : (item.is_MovedDown() ? me.textParaMoveFromDown : me.textParaMoveFromUp); if (typeof value == 'object') { _.each(value, function(obj) { if (typeof obj === 'string') @@ -430,7 +432,8 @@ define([ type : item.get_Type(), changedata : item, scope : me.view, - hint : !me.appConfig.canReview + hint : !me.appConfig.canReview, + goto : (item.get_MoveType() == Asc.c_oAscRevisionsMove.MoveTo || item.get_MoveType() == Asc.c_oAscRevisionsMove.MoveFrom) }); arr.push(change); @@ -511,6 +514,13 @@ define([ Common.NotificationCenter.trigger('edit:complete', this.view); }, + onGotoClick: function(change) { + if (this.api) { + this.api.asc_FollowRevisionMove(change); + } + Common.NotificationCenter.trigger('edit:complete', this.view); + }, + onTurnPreview: function(state) { if ( this.appConfig.isReviewOnly ) { this.view.turnChanges(true); @@ -774,7 +784,9 @@ define([ textShape: 'Shape', textTableChanged: 'Table Settings Changed', textTableRowsAdd: 'Table Rows Added', - textTableRowsDel: 'Table Rows Deleted' - + textTableRowsDel: 'Table Rows Deleted', + textParaMoveTo: 'Moved:', + textParaMoveFromUp: 'Moved Up:', + textParaMoveFromDown: 'Moved Down:' }, Common.Controllers.ReviewChanges || {})); }); \ No newline at end of file diff --git a/apps/common/main/lib/template/ReviewChangesPopover.template b/apps/common/main/lib/template/ReviewChangesPopover.template index bad0fdc7c..9b8762816 100644 --- a/apps/common/main/lib/template/ReviewChangesPopover.template +++ b/apps/common/main/lib/template/ReviewChangesPopover.template @@ -4,18 +4,21 @@
<%=date%>
<%=changetext%>
- <% if (!hint) { %>
- <% if (scope.appConfig.isReviewOnly) { %> -
- <% } else { %> -
-
+ <% if (goto) { %> +
+ <% } %> + <% if (!hint) { %> + <% if (scope.appConfig.isReviewOnly) { %> +
+ <% } else { %> +
+
+ <% } %> <% } %>
- <% if (lock) { %> + <% if (!hint && lock) { %>
<%=lockuser%>
<% } %> - <% } %> \ No newline at end of file diff --git a/apps/common/main/lib/view/ReviewPopover.js b/apps/common/main/lib/view/ReviewPopover.js index 893b06b75..2a5b25aa8 100644 --- a/apps/common/main/lib/view/ReviewPopover.js +++ b/apps/common/main/lib/view/ReviewPopover.js @@ -507,6 +507,8 @@ define([ me.fireEvent('reviewchange:reject', [record.get('changedata')]); } else if (btn.hasClass('btn-delete')) { me.fireEvent('reviewchange:delete', [record.get('changedata')]); + } else if (btn.hasClass('btn-goto')) { + me.fireEvent('reviewchange:goto', [record.get('changedata')]); } } }); diff --git a/apps/common/main/resources/less/comments.less b/apps/common/main/resources/less/comments.less index 7ca42c406..33a0e6c1c 100644 --- a/apps/common/main/resources/less/comments.less +++ b/apps/common/main/resources/less/comments.less @@ -231,7 +231,7 @@ cursor: pointer; } - .btn-edit,.btn-delete, .btn-resolve, .btn-resolve-check, .btn-accept, .btn-reject { + .btn-edit,.btn-delete, .btn-resolve, .btn-resolve-check, .btn-accept, .btn-reject, .btn-goto { width: 16px; height: 16px; margin: 0 0 0 5px; @@ -262,6 +262,10 @@ background-position: -42px -234px; } + .btn-goto { + background-position: -22px -272px; + } + .inner-edit-ct { padding: 7px 0px 0px 0px; diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 26ee4cee5..934820b51 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -67,6 +67,9 @@ "Common.Controllers.ReviewChanges.textTabs": "Change tabs", "Common.Controllers.ReviewChanges.textUnderline": "Underline", "Common.Controllers.ReviewChanges.textWidow": "Widow control", + "Common.Controllers.ReviewChanges.textParaMoveTo": "Moved:", + "Common.Controllers.ReviewChanges.textParaMoveFromUp": "Moved Up:", + "Common.Controllers.ReviewChanges.textParaMoveFromDown": "Moved Down:", "Common.UI.ComboBorderSize.txtNoBorders": "No borders", "Common.UI.ComboBorderSizeEditable.txtNoBorders": "No borders", "Common.UI.ComboDataView.emptyComboText": "No styles", diff --git a/apps/documenteditor/sdk_dev_scripts.js b/apps/documenteditor/sdk_dev_scripts.js index f5887a3d5..7eb434600 100644 --- a/apps/documenteditor/sdk_dev_scripts.js +++ b/apps/documenteditor/sdk_dev_scripts.js @@ -106,6 +106,7 @@ var sdk_dev_scrpipts = [ "../../../../sdkjs/word/Editor/Paragraph/ComplexFieldInstruction.js", "../../../../sdkjs/word/Editor/Paragraph/ComplexField.js", "../../../../sdkjs/word/Editor/Paragraph/FormulaParser.js", + "../../../../sdkjs/word/Editor/Paragraph/ParaRevisionMove.js", "../../../../sdkjs/word/Editor/Paragraph.js", "../../../../sdkjs/word/Editor/ParagraphChanges.js", "../../../../sdkjs/word/Editor/DocumentContentBase.js",