Merge pull request #157 from ONLYOFFICE/feature/review-move
Feature/review move
This commit is contained in:
commit
2244c5ba29
|
@ -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: '<b>Table Settings Changed</b>',
|
||||
textTableRowsAdd: '<b>Table Rows Added<b/>',
|
||||
textTableRowsDel: '<b>Table Rows Deleted<b/>'
|
||||
|
||||
textTableRowsDel: '<b>Table Rows Deleted<b/>',
|
||||
textParaMoveTo: '<b>Moved:</b>',
|
||||
textParaMoveFromUp: '<b>Moved Up:</b>',
|
||||
textParaMoveFromDown: '<b>Moved Down:</b>'
|
||||
}, Common.Controllers.ReviewChanges || {}));
|
||||
});
|
|
@ -4,18 +4,21 @@
|
|||
</div>
|
||||
<div class="user-date"><%=date%></div>
|
||||
<div class="user-message limit-height"><%=changetext%></div>
|
||||
<% if (!hint) { %>
|
||||
<div class="edit-ct">
|
||||
<% if (scope.appConfig.isReviewOnly) { %>
|
||||
<div class="btn-delete img-commonctrl"></div>
|
||||
<% } else { %>
|
||||
<div class="btn-accept img-commonctrl"></div>
|
||||
<div class="btn-reject img-commonctrl"></div>
|
||||
<% if (goto) { %>
|
||||
<div class="btn-goto img-commonctrl"></div>
|
||||
<% } %>
|
||||
<% if (!hint) { %>
|
||||
<% if (scope.appConfig.isReviewOnly) { %>
|
||||
<div class="btn-delete img-commonctrl"></div>
|
||||
<% } else { %>
|
||||
<div class="btn-accept img-commonctrl"></div>
|
||||
<div class="btn-reject img-commonctrl"></div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</div>
|
||||
<% if (lock) { %>
|
||||
<% if (!hint && lock) { %>
|
||||
<div class="lock-area" style="cursor: default;"></div>
|
||||
<div class="lock-author" style="cursor: default;"><%=lockuser%></div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</div>
|
|
@ -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')]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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": "<b>Moved:</b>",
|
||||
"Common.Controllers.ReviewChanges.textParaMoveFromUp": "<b>Moved Up:</b>",
|
||||
"Common.Controllers.ReviewChanges.textParaMoveFromDown": "<b>Moved Down:</b>",
|
||||
"Common.UI.ComboBorderSize.txtNoBorders": "No borders",
|
||||
"Common.UI.ComboBorderSizeEditable.txtNoBorders": "No borders",
|
||||
"Common.UI.ComboDataView.emptyComboText": "No styles",
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue