[mobile] Display review for view mode
This commit is contained in:
parent
8a6af205d9
commit
09d3028f77
|
@ -60,6 +60,7 @@ define([
|
|||
editUsers = [],
|
||||
editor = !!window.DE ? 'DE' : !!window.PE ? 'PE' : 'SSE',
|
||||
displayMode = "Markup",
|
||||
canViewReview,
|
||||
arrChangeReview = [],
|
||||
dateChange = [],
|
||||
_fileKey;
|
||||
|
@ -208,13 +209,10 @@ define([
|
|||
me.initComments();
|
||||
Common.Utils.addScrollIfNeed('.page[data-page=comments-view]', '.page[data-page=comments-view] .page-content');
|
||||
} else {
|
||||
if(editor === 'DE' && !this.appConfig.canReview) {
|
||||
this.canViewReview = me.api.asc_HaveRevisionsChanges(true);
|
||||
if (!this.canViewReview) {
|
||||
if(editor === 'DE' && !this.appConfig.canReview && !canViewReview) {
|
||||
$('#reviewing-settings').hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
//Edit users
|
||||
|
@ -317,9 +315,14 @@ define([
|
|||
},
|
||||
|
||||
initDisplayMode: function() {
|
||||
var me = this;
|
||||
var me = this,
|
||||
value;
|
||||
$('input:radio').single('change', _.bind(me.onReviewViewClick, me));
|
||||
var value = displayMode;
|
||||
if (me.appConfig.canReview) {
|
||||
value = displayMode;
|
||||
} else if (canViewReview) {
|
||||
value = Common.localStorage.getItem("de-view-review-mode") || 'Original';
|
||||
}
|
||||
if (value == null || value === "Markup") {
|
||||
$('input[value="Markup"]').attr('checked', true);
|
||||
} else if (value === 'Final') {
|
||||
|
@ -333,9 +336,14 @@ define([
|
|||
return displayMode;
|
||||
},
|
||||
|
||||
setCanViewReview: function(config) {
|
||||
canViewReview = config;
|
||||
},
|
||||
|
||||
onReviewViewClick: function(event) {
|
||||
var value = $(event.currentTarget).val();
|
||||
this.turnDisplayMode(value);
|
||||
!this.appConfig.canReview && Common.localStorage.setItem("de-view-review-mode", value);
|
||||
},
|
||||
|
||||
turnDisplayMode: function(value) {
|
||||
|
|
|
@ -604,6 +604,22 @@ define([
|
|||
me.applyLicense();
|
||||
|
||||
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
||||
|
||||
if (!me.appOptions.canReview) {
|
||||
var canViewReview = me.api.asc_HaveRevisionsChanges(true);
|
||||
if (canViewReview) {
|
||||
var viewReviewMode = Common.localStorage.getItem("de-view-review-mode");
|
||||
viewReviewMode = viewReviewMode || 'Original';
|
||||
if (viewReviewMode === 'Original')
|
||||
me.api.asc_BeginViewModeInReview(false);
|
||||
else if (viewReviewMode === 'Final')
|
||||
me.api.asc_BeginViewModeInReview(true);
|
||||
else
|
||||
me.api.asc_EndViewModeInReview();
|
||||
}
|
||||
DE.getController('Common.Controllers.Collaboration').setCanViewReview(canViewReview);
|
||||
}
|
||||
|
||||
Common.Gateway.documentReady();
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue