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': {
|
'Common.Views.ReviewPopover': {
|
||||||
'reviewchange:accept': _.bind(this.onAcceptClick, this),
|
'reviewchange:accept': _.bind(this.onAcceptClick, this),
|
||||||
'reviewchange:reject': _.bind(this.onRejectClick, 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) {
|
_.each(data, function(item) {
|
||||||
var changetext = '', proptext = '',
|
var changetext = '', proptext = '',
|
||||||
value = item.get_Value(),
|
value = item.get_Value(),
|
||||||
|
movetype = item.get_MoveType(),
|
||||||
settings = false;
|
settings = false;
|
||||||
switch (item.get_Type()) {
|
switch (item.get_Type()) {
|
||||||
case Asc.c_oAscRevisionsChangeType.TextAdd:
|
case Asc.c_oAscRevisionsChangeType.TextAdd:
|
||||||
changetext = me.textInserted;
|
changetext = (movetype==Asc.c_oAscRevisionsMove.NoMove) ? me.textInserted : me.textParaMoveTo;
|
||||||
if (typeof value == 'object') {
|
if (typeof value == 'object') {
|
||||||
_.each(value, function(obj) {
|
_.each(value, function(obj) {
|
||||||
if (typeof obj === 'string')
|
if (typeof obj === 'string')
|
||||||
|
@ -267,7 +269,7 @@ define([
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Asc.c_oAscRevisionsChangeType.TextRem:
|
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') {
|
if (typeof value == 'object') {
|
||||||
_.each(value, function(obj) {
|
_.each(value, function(obj) {
|
||||||
if (typeof obj === 'string')
|
if (typeof obj === 'string')
|
||||||
|
@ -430,7 +432,8 @@ define([
|
||||||
type : item.get_Type(),
|
type : item.get_Type(),
|
||||||
changedata : item,
|
changedata : item,
|
||||||
scope : me.view,
|
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);
|
arr.push(change);
|
||||||
|
@ -511,6 +514,13 @@ define([
|
||||||
Common.NotificationCenter.trigger('edit:complete', this.view);
|
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) {
|
onTurnPreview: function(state) {
|
||||||
if ( this.appConfig.isReviewOnly ) {
|
if ( this.appConfig.isReviewOnly ) {
|
||||||
this.view.turnChanges(true);
|
this.view.turnChanges(true);
|
||||||
|
@ -774,7 +784,9 @@ define([
|
||||||
textShape: 'Shape',
|
textShape: 'Shape',
|
||||||
textTableChanged: '<b>Table Settings Changed</b>',
|
textTableChanged: '<b>Table Settings Changed</b>',
|
||||||
textTableRowsAdd: '<b>Table Rows Added<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 || {}));
|
}, Common.Controllers.ReviewChanges || {}));
|
||||||
});
|
});
|
|
@ -4,18 +4,21 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="user-date"><%=date%></div>
|
<div class="user-date"><%=date%></div>
|
||||||
<div class="user-message limit-height"><%=changetext%></div>
|
<div class="user-message limit-height"><%=changetext%></div>
|
||||||
<% if (!hint) { %>
|
|
||||||
<div class="edit-ct">
|
<div class="edit-ct">
|
||||||
<% if (scope.appConfig.isReviewOnly) { %>
|
<% if (goto) { %>
|
||||||
<div class="btn-delete img-commonctrl"></div>
|
<div class="btn-goto img-commonctrl"></div>
|
||||||
<% } else { %>
|
<% } %>
|
||||||
<div class="btn-accept img-commonctrl"></div>
|
<% if (!hint) { %>
|
||||||
<div class="btn-reject img-commonctrl"></div>
|
<% 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>
|
</div>
|
||||||
<% if (lock) { %>
|
<% if (!hint && lock) { %>
|
||||||
<div class="lock-area" style="cursor: default;"></div>
|
<div class="lock-area" style="cursor: default;"></div>
|
||||||
<div class="lock-author" style="cursor: default;"><%=lockuser%></div>
|
<div class="lock-author" style="cursor: default;"><%=lockuser%></div>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% } %>
|
|
||||||
</div>
|
</div>
|
|
@ -507,6 +507,8 @@ define([
|
||||||
me.fireEvent('reviewchange:reject', [record.get('changedata')]);
|
me.fireEvent('reviewchange:reject', [record.get('changedata')]);
|
||||||
} else if (btn.hasClass('btn-delete')) {
|
} else if (btn.hasClass('btn-delete')) {
|
||||||
me.fireEvent('reviewchange:delete', [record.get('changedata')]);
|
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;
|
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;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
margin: 0 0 0 5px;
|
margin: 0 0 0 5px;
|
||||||
|
@ -262,6 +262,10 @@
|
||||||
background-position: -42px -234px;
|
background-position: -42px -234px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-goto {
|
||||||
|
background-position: -22px -272px;
|
||||||
|
}
|
||||||
|
|
||||||
.inner-edit-ct {
|
.inner-edit-ct {
|
||||||
padding: 7px 0px 0px 0px;
|
padding: 7px 0px 0px 0px;
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,9 @@
|
||||||
"Common.Controllers.ReviewChanges.textTabs": "Change tabs",
|
"Common.Controllers.ReviewChanges.textTabs": "Change tabs",
|
||||||
"Common.Controllers.ReviewChanges.textUnderline": "Underline",
|
"Common.Controllers.ReviewChanges.textUnderline": "Underline",
|
||||||
"Common.Controllers.ReviewChanges.textWidow": "Widow control",
|
"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.ComboBorderSize.txtNoBorders": "No borders",
|
||||||
"Common.UI.ComboBorderSizeEditable.txtNoBorders": "No borders",
|
"Common.UI.ComboBorderSizeEditable.txtNoBorders": "No borders",
|
||||||
"Common.UI.ComboDataView.emptyComboText": "No styles",
|
"Common.UI.ComboDataView.emptyComboText": "No styles",
|
||||||
|
|
|
@ -106,6 +106,7 @@ var sdk_dev_scrpipts = [
|
||||||
"../../../../sdkjs/word/Editor/Paragraph/ComplexFieldInstruction.js",
|
"../../../../sdkjs/word/Editor/Paragraph/ComplexFieldInstruction.js",
|
||||||
"../../../../sdkjs/word/Editor/Paragraph/ComplexField.js",
|
"../../../../sdkjs/word/Editor/Paragraph/ComplexField.js",
|
||||||
"../../../../sdkjs/word/Editor/Paragraph/FormulaParser.js",
|
"../../../../sdkjs/word/Editor/Paragraph/FormulaParser.js",
|
||||||
|
"../../../../sdkjs/word/Editor/Paragraph/ParaRevisionMove.js",
|
||||||
"../../../../sdkjs/word/Editor/Paragraph.js",
|
"../../../../sdkjs/word/Editor/Paragraph.js",
|
||||||
"../../../../sdkjs/word/Editor/ParagraphChanges.js",
|
"../../../../sdkjs/word/Editor/ParagraphChanges.js",
|
||||||
"../../../../sdkjs/word/Editor/DocumentContentBase.js",
|
"../../../../sdkjs/word/Editor/DocumentContentBase.js",
|
||||||
|
|
Loading…
Reference in a new issue