diff --git a/apps/common/main/resources/img/doc-formats/djvu.svg b/apps/common/main/resources/img/doc-formats/djvu.svg
index 4166d9e31..1b5927051 100644
--- a/apps/common/main/resources/img/doc-formats/djvu.svg
+++ b/apps/common/main/resources/img/doc-formats/djvu.svg
@@ -1,26 +1,18 @@
diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js
index 793371f41..0a4788bd0 100644
--- a/apps/documenteditor/forms/app/controller/ApplicationController.js
+++ b/apps/documenteditor/forms/app/controller/ApplicationController.js
@@ -494,7 +494,7 @@ define([
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false);
docInfo.asc_putIsEnabledPlugins(!!enable);
- var type = /^(?:(pdf|djvu|xps))$/.exec(data.doc.fileType);
+ var type = /^(?:(pdf|djvu|xps|oxps))$/.exec(data.doc.fileType);
if (type && typeof type[1] === 'string') {
this.permissions.edit = this.permissions.review = false;
}
diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js
index 21c2587c2..2773fb5eb 100644
--- a/apps/documenteditor/main/app/controller/LeftMenu.js
+++ b/apps/documenteditor/main/app/controller/LeftMenu.js
@@ -367,9 +367,11 @@ define([
clickSaveAsFormat: function(menu, format, ext) { // ext isn't undefined for save copy as
var me = this,
fileType = this.getApplication().getController('Main').document.fileType;
- if ( /^pdf|xps|oxps$/.test(fileType)) {
- if (format===undefined || format == Asc.c_oAscFileType.PDF || format == Asc.c_oAscFileType.PDFA || format == Asc.c_oAscFileType.XPS)
+ if ( /^pdf|xps|oxps|djvu$/.test(fileType)) {
+ if (format===undefined)
this._saveAsFormat(undefined, format, ext); // download original
+ else if (format == Asc.c_oAscFileType.PDF || format == Asc.c_oAscFileType.PDFA)
+ this._saveAsFormat(menu, format, ext);
else {
(new Common.Views.OptionsDialog({
width: 300,
diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js
index bb1c6d83f..112a3d504 100644
--- a/apps/documenteditor/main/app/controller/Main.js
+++ b/apps/documenteditor/main/app/controller/Main.js
@@ -1463,9 +1463,9 @@ define([
this.appOptions.canChat = false;
}
- var type = /^(?:(djvu))$/.exec(this.document.fileType);
- this.appOptions.canDownloadOrigin = this.permissions.download !== false && (type && typeof type[1] === 'string');
- this.appOptions.canDownload = this.permissions.download !== false && (!type || typeof type[1] !== 'string');
+ // var type = /^(?:(djvu))$/.exec(this.document.fileType);
+ this.appOptions.canDownloadOrigin = false;
+ this.appOptions.canDownload = this.permissions.download !== false;
this.appOptions.canUseSelectHandTools = this.appOptions.canUseThumbnails = this.appOptions.canUseViwerNavigation = isPDFViewer;
this.appOptions.canDownloadForms = this.appOptions.canLicense && this.appOptions.canDownload;
diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js
index 9572efa4a..664c10c78 100644
--- a/apps/documenteditor/main/app/view/FileMenuPanels.js
+++ b/apps/documenteditor/main/app/view/FileMenuPanels.js
@@ -98,12 +98,20 @@ define([
},
render: function() {
- if (/^pdf|xps|oxps$/.test(this.fileType)) {
+ if (/^pdf$/.test(this.fileType)) {
this.formats[0].splice(1, 1); // remove pdf
this.formats[1].splice(1, 1); // remove pdfa
- this.formats[3].push({name: 'Original', imgCls: 'pdf', type: ''});
+ this.formats[3].push({name: 'PDF', imgCls: 'pdf', type: ''}); // original pdf
+ } else if (/^xps|oxps$/.test(this.fileType)) {
+ this.formats[3].push({name: this.fileType.toUpperCase(), imgCls: this.fileType, type: ''}); // original xps/oxps
+ } else if (/^djvu$/.test(this.fileType)) {
+ this.formats = [[
+ {name: 'DJVU', imgCls: 'djvu', type: ''}, // original djvu
+ {name: 'PDF', imgCls: 'pdf', type: Asc.c_oAscFileType.PDF}
+ ]];
}
- if (this.mode && !this.mode.canFeatureForms) {
+
+ if (this.mode && !this.mode.canFeatureForms && this.formats.length>2) {
this.formats[2].splice(1, 2);
this.formats[2] = this.formats[2].concat(this.formats[3]);
this.formats[3] = undefined;
@@ -186,12 +194,20 @@ define([
},
render: function() {
- if (/^pdf|xps|oxps$/.test(this.fileType)) {
+ if (/^pdf$/.test(this.fileType)) {
this.formats[0].splice(1, 1); // remove pdf
this.formats[1].splice(1, 1); // remove pdfa
- this.formats[3].push({name: 'Original', imgCls: 'pdf', type: '', ext: true});
+ this.formats[3].push({name: 'PDF', imgCls: 'pdf', type: '', ext: true}); // original pdf
+ } else if (/^xps|oxps$/.test(this.fileType)) {
+ this.formats[3].push({name: this.fileType.toUpperCase(), imgCls: this.fileType, type: '', ext: true}); // original xps/oxps
+ } else if (/^djvu$/.test(this.fileType)) {
+ this.formats = [[
+ {name: 'DJVU', imgCls: 'djvu', type: '', ext: true}, // original djvu
+ {name: 'PDF', imgCls: 'pdf', type: Asc.c_oAscFileType.PDF, ext: '.pdf'}
+ ]];
}
- if (this.mode && !this.mode.canFeatureForms) {
+
+ if (this.mode && !this.mode.canFeatureForms && this.formats.length>2) {
this.formats[2].splice(1, 2);
this.formats[2] = this.formats[2].concat(this.formats[3]);
this.formats[3] = undefined;
diff --git a/apps/documenteditor/main/index.html b/apps/documenteditor/main/index.html
index c104a0ee0..f1157d4f0 100644
--- a/apps/documenteditor/main/index.html
+++ b/apps/documenteditor/main/index.html
@@ -324,6 +324,9 @@
+
+
+
diff --git a/apps/documenteditor/main/index.html.deploy b/apps/documenteditor/main/index.html.deploy
index c91525b3a..b3582a90c 100644
--- a/apps/documenteditor/main/index.html.deploy
+++ b/apps/documenteditor/main/index.html.deploy
@@ -313,6 +313,9 @@
+
+
+
diff --git a/apps/documenteditor/main/index_loader.html b/apps/documenteditor/main/index_loader.html
index 990b85a3e..58261a6de 100644
--- a/apps/documenteditor/main/index_loader.html
+++ b/apps/documenteditor/main/index_loader.html
@@ -285,6 +285,9 @@
+
+
+
diff --git a/apps/documenteditor/main/index_loader.html.deploy b/apps/documenteditor/main/index_loader.html.deploy
index 14ec083f8..575f5d4ca 100644
--- a/apps/documenteditor/main/index_loader.html.deploy
+++ b/apps/documenteditor/main/index_loader.html.deploy
@@ -332,6 +332,9 @@
+
+
+