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