[DE mobile] Add Review Change in context menu

This commit is contained in:
Julia Svinareva 2019-05-24 11:43:15 +03:00
parent 0e341287a1
commit 57aaf4c073
3 changed files with 24 additions and 10 deletions

View file

@ -58,7 +58,7 @@ define([
_fastCoAuthTips = [],
_actionSheets = [],
_isEdit = false,
_canAcceptChanges = false,
_canReview = false,
_inRevisionChange = false,
_menuPos = [],
_timer = 0;
@ -100,7 +100,7 @@ define([
setMode: function (mode) {
_isEdit = mode.isEdit;
_canAcceptChanges = mode.canReview && !mode.isReviewOnly;
_canReview = mode.canReview;
},
// When our application is ready, lets get started
@ -152,6 +152,11 @@ define([
var getCollaboration = DE.getController('Collaboration');
getCollaboration.showModal();
getCollaboration.getView('Collaboration').showPage('#reviewing-settings-view', false);
} else if('reviewchange' == eventName) {
var getCollaboration = DE.getController('Collaboration');
getCollaboration.showModal();
getCollaboration.getView('Collaboration').showPage('#reviewing-settings-view', false);
getCollaboration.getView('Collaboration').showPage('#change-view', false);
} else if ('showActionSheet' == eventName && _actionSheets.length > 0) {
_.delay(function () {
_.each(_actionSheets, function (action) {
@ -491,7 +496,13 @@ define([
});
}
if (_canAcceptChanges && _inRevisionChange) {
if (_canReview) {
if (_inRevisionChange) {
menuItems.push({
caption: me.menuReviewChange,
event: 'reviewchange'
});
} else {
menuItems.push({
caption: me.menuReview,
event: 'review'
@ -499,6 +510,7 @@ define([
}
}
}
}
if (isLink) {
menuItems.push({
@ -540,7 +552,8 @@ define([
menuReview: 'Review',
menuMerge: 'Merge Cells',
menuSplit: 'Split Cell',
menuDeleteTable: 'Delete Table'
menuDeleteTable: 'Delete Table',
menuReviewChange: 'Review Change'
}
})(), DE.Controllers.DocumentHolder || {}))
});

View file

@ -151,7 +151,7 @@ define([
textMarkup: 'Markup',
textFinal: 'Final',
textOriginal: 'Original',
textChange: 'Change'
textChange: 'Review Change'
}
})(), DE.Views.Collaboration || {}))

View file

@ -31,6 +31,7 @@
"DE.Controllers.DocumentHolder.textColumns": "Columns",
"DE.Controllers.DocumentHolder.textRows": "Rows",
"DE.Controllers.DocumentHolder.menuDeleteTable": "Delete Table",
"DE.Controllers.DocumentHolder.menuReviewChange": "Review Change",
"DE.Controllers.EditContainer.textChart": "Chart",
"DE.Controllers.EditContainer.textFooter": "Footer",
"DE.Controllers.EditContainer.textHeader": "Header",
@ -495,5 +496,5 @@
"DE.Views.Collaboration.textMarkup": "Markup",
"DE.Views.Collaboration.textFinal": "Final",
"DE.Views.Collaboration.textOriginal": "Original",
"DE.Views.Collaboration.textChange": "Change"
"DE.Views.Collaboration.textChange": "Review Change"
}