From 7dcbc69f1b82d156541768f9e447b48a758f90da Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 9 Aug 2021 19:09:59 +0300 Subject: [PATCH] Fix sending filetype --- apps/common/main/lib/controller/History.js | 1 - apps/documenteditor/embed/js/ApplicationController.js | 1 - apps/documenteditor/main/app/controller/LeftMenu.js | 1 - apps/documenteditor/main/app/controller/Main.js | 1 - apps/documenteditor/main/app/view/MailMergeSettings.js | 1 - apps/documenteditor/mobile/src/controller/Main.jsx | 1 - apps/presentationeditor/embed/js/ApplicationController.js | 1 - apps/presentationeditor/main/app/controller/LeftMenu.js | 1 - apps/presentationeditor/main/app/controller/Main.js | 1 - apps/spreadsheeteditor/embed/js/ApplicationController.js | 1 - apps/spreadsheeteditor/main/app/controller/LeftMenu.js | 1 - apps/spreadsheeteditor/main/app/controller/Main.js | 1 - apps/spreadsheeteditor/mobile/src/controller/Main.jsx | 1 - 13 files changed, 13 deletions(-) diff --git a/apps/common/main/lib/controller/History.js b/apps/common/main/lib/controller/History.js index e3d98cbfc..f90ea0620 100644 --- a/apps/common/main/lib/controller/History.js +++ b/apps/common/main/lib/controller/History.js @@ -102,7 +102,6 @@ define([ onDownloadUrl: function(url, fileType) { if (this.isFromSelectRevision !== undefined) { - fileType = (Common.Utils.getKeyByValue(Asc.c_oAscFileType, fileType) || '').toLowerCase(); Common.Gateway.requestRestore(this.isFromSelectRevision, url, fileType); } this.isFromSelectRevision = undefined; diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index 0d11796cb..ccdedb64d 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -250,7 +250,6 @@ DE.ApplicationController = new(function(){ } function onDownloadUrl(url, fileType) { - fileType = (common.utils.getKeyByValue(Asc.c_oAscFileType, fileType) || '').toLowerCase(); Common.Gateway.downloadAs(url, fileType); } diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index e0333d056..c57d4026c 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -411,7 +411,6 @@ define([ } if (me.mode.canRequestSaveAs) { - fileType = (Common.Utils.getKeyByValue(Asc.c_oAscFileType, fileType) || '').toLowerCase(); Common.Gateway.requestSaveAs(url, defFileName, fileType); } else { me._saveCopyDlg = new Common.Views.SaveAsDlg({ diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 83c83bad6..9568a2bdb 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -2054,7 +2054,6 @@ define([ onDownloadUrl: function(url, fileType) { if (this._state.isFromGatewayDownloadAs) { - fileType = (Common.Utils.getKeyByValue(Asc.c_oAscFileType, fileType) || '').toLowerCase(); Common.Gateway.downloadAs(url, fileType); } this._state.isFromGatewayDownloadAs = false; diff --git a/apps/documenteditor/main/app/view/MailMergeSettings.js b/apps/documenteditor/main/app/view/MailMergeSettings.js index c73ef7adb..865e68096 100644 --- a/apps/documenteditor/main/app/view/MailMergeSettings.js +++ b/apps/documenteditor/main/app/view/MailMergeSettings.js @@ -579,7 +579,6 @@ define([ if (this.cmbMergeTo.getValue() != Asc.c_oAscFileType.HTML) { var defFileName = me.defFileName + ((this.cmbMergeTo.getValue() == Asc.c_oAscFileType.PDF) ? '.pdf' : '.docx'); if (me.mode.canRequestSaveAs) { - fileType = (Common.Utils.getKeyByValue(Asc.c_oAscFileType, fileType) || '').toLowerCase(); Common.Gateway.requestSaveAs(url, defFileName, fileType); } else { me._mailMergeDlg = new Common.Views.SaveAsDlg({ diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index 9fc80bce4..3a32d1148 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -689,7 +689,6 @@ class MainController extends Component { onDownloadUrl (url, fileType) { if (this._state.isFromGatewayDownloadAs) { - fileType = (Common.Utils.getKeyByValue(Asc.c_oAscFileType, fileType) || '').toLowerCase(); Common.Gateway.downloadAs(url, fileType); } diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index c436ca64c..2fbd34e2f 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -226,7 +226,6 @@ PE.ApplicationController = new(function(){ } function onDownloadUrl(url, fileType) { - fileType = (common.utils.getKeyByValue(Asc.c_oAscFileType, fileType) || '').toLowerCase(); Common.Gateway.downloadAs(url, fileType); } diff --git a/apps/presentationeditor/main/app/controller/LeftMenu.js b/apps/presentationeditor/main/app/controller/LeftMenu.js index c889727eb..31b3eaa98 100644 --- a/apps/presentationeditor/main/app/controller/LeftMenu.js +++ b/apps/presentationeditor/main/app/controller/LeftMenu.js @@ -309,7 +309,6 @@ define([ } if (me.mode.canRequestSaveAs) { - fileType = (Common.Utils.getKeyByValue(Asc.c_oAscFileType, fileType) || '').toLowerCase(); Common.Gateway.requestSaveAs(url, defFileName, fileType); } else { me._saveCopyDlg = new Common.Views.SaveAsDlg({ diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 00c90217f..40e608fab 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1703,7 +1703,6 @@ define([ onDownloadUrl: function(url, fileType) { if (this._state.isFromGatewayDownloadAs) { - fileType = (Common.Utils.getKeyByValue(Asc.c_oAscFileType, fileType) || '').toLowerCase(); Common.Gateway.downloadAs(url, fileType); } this._state.isFromGatewayDownloadAs = false; diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index e5047cf8b..bc6540a6f 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -180,7 +180,6 @@ SSE.ApplicationController = new(function(){ } function onDownloadUrl(url, fileType) { - fileType = (common.utils.getKeyByValue(Asc.c_oAscFileType, fileType) || '').toLowerCase(); Common.Gateway.downloadAs(url, fileType); } diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index 721c3cfe8..8f95890f8 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -386,7 +386,6 @@ define([ } if (me.mode.canRequestSaveAs) { - fileType = (Common.Utils.getKeyByValue(Asc.c_oAscFileType, fileType) || '').toLowerCase(); Common.Gateway.requestSaveAs(url, defFileName, fileType); } else { me._saveCopyDlg = new Common.Views.SaveAsDlg({ diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 8d35c35dd..25a3a040e 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1995,7 +1995,6 @@ define([ onDownloadUrl: function(url, fileType) { if (this._state.isFromGatewayDownloadAs) { - fileType = (Common.Utils.getKeyByValue(Asc.c_oAscFileType, fileType) || '').toLowerCase(); Common.Gateway.downloadAs(url, fileType); } this._state.isFromGatewayDownloadAs = false; diff --git a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx index 483fec056..37cd24fb3 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx @@ -638,7 +638,6 @@ class MainController extends Component { onDownloadUrl (url, fileType) { if (this._state.isFromGatewayDownloadAs) { - fileType = (Common.Utils.getKeyByValue(Asc.c_oAscFileType, fileType) || '').toLowerCase(); Common.Gateway.downloadAs(url, fileType); }