[DE] Set offline viewer for pdf/djvu/xps/oxps
This commit is contained in:
parent
ca5548dfc0
commit
5a730ffccd
|
@ -473,11 +473,6 @@ define([
|
||||||
docInfo.put_Lang(this.editorConfig.lang);
|
docInfo.put_Lang(this.editorConfig.lang);
|
||||||
docInfo.put_Mode(this.editorConfig.mode);
|
docInfo.put_Mode(this.editorConfig.mode);
|
||||||
|
|
||||||
var coEditMode = !(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object') ? 'fast' : // fast by default
|
|
||||||
this.editorConfig.mode === 'view' && this.editorConfig.coEditing.change!==false ? 'fast' : // if can change mode in viewer - set fast for using live viewer
|
|
||||||
this.editorConfig.coEditing.mode || 'fast';
|
|
||||||
docInfo.put_CoEditingMode(coEditMode);
|
|
||||||
|
|
||||||
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||||
docInfo.asc_putIsEnabledMacroses(!!enable);
|
docInfo.asc_putIsEnabledMacroses(!!enable);
|
||||||
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false);
|
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false);
|
||||||
|
@ -485,6 +480,12 @@ define([
|
||||||
// docInfo.put_Review(this.permissions.review);
|
// docInfo.put_Review(this.permissions.review);
|
||||||
|
|
||||||
var type = /^(?:(pdf|djvu|xps|oxps))$/.exec(data.doc.fileType);
|
var type = /^(?:(pdf|djvu|xps|oxps))$/.exec(data.doc.fileType);
|
||||||
|
var coEditMode = (type && typeof type[1] === 'string') ? 'strict' : // offline viewer for pdf|djvu|xps|oxps
|
||||||
|
!(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object') ? 'fast' : // fast by default
|
||||||
|
this.editorConfig.mode === 'view' && this.editorConfig.coEditing.change!==false ? 'fast' : // if can change mode in viewer - set fast for using live viewer
|
||||||
|
this.editorConfig.coEditing.mode || 'fast';
|
||||||
|
docInfo.put_CoEditingMode(coEditMode);
|
||||||
|
|
||||||
if (type && typeof type[1] === 'string') {
|
if (type && typeof type[1] === 'string') {
|
||||||
this.permissions.edit = this.permissions.review = false;
|
this.permissions.edit = this.permissions.review = false;
|
||||||
}
|
}
|
||||||
|
@ -1563,7 +1564,7 @@ define([
|
||||||
Common.NotificationCenter.on('comments:showdummy', _.bind(this.onShowDummyComment, this));
|
Common.NotificationCenter.on('comments:showdummy', _.bind(this.onShowDummyComment, this));
|
||||||
|
|
||||||
// change = true by default in editor
|
// change = true by default in editor
|
||||||
this.appOptions.canLiveView = !!params.asc_getLiveViewerSupport() && (this.editorConfig.mode === 'view'); // viewer: change=false when no flag canLiveViewer (i.g. old license), change=true by default when canLiveViewer==true
|
this.appOptions.canLiveView = !!params.asc_getLiveViewerSupport() && (this.editorConfig.mode === 'view') && !isPDFViewer; // viewer: change=false when no flag canLiveViewer (i.g. old license), change=true by default when canLiveViewer==true
|
||||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
|
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
|
||||||
this.appOptions.canLiveView && !(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false);
|
this.appOptions.canLiveView && !(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue