diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index fddb136462..af9c6ebacf 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -266,7 +266,9 @@ define([ case 'back': break; case 'save': this.api.asc_Save(); break; case 'save-desktop': this.api.asc_DownloadAs(); break; - case 'export-pdf': this.clickSaveAsFormat(menu, Asc.c_oAscFileType.PDF, true); break; + case 'export-pdf': + Common.NotificationCenter.trigger('export:to', this.leftMenu, Asc.c_oAscFileType.PDF); + break; case 'print': Common.NotificationCenter.trigger('print', this.leftMenu); break; case 'exit': Common.NotificationCenter.trigger('goback'); break; case 'edit': @@ -338,7 +340,7 @@ define([ }); }, - clickSaveAsFormat: function(menu, format, asExport) { + clickSaveAsFormat: function(menu, format) { if (format == Asc.c_oAscFileType.CSV) { var me = this; if (this.api.asc_getWorksheetsCount()>1) { @@ -362,7 +364,7 @@ define([ }); } else if (format == Asc.c_oAscFileType.PDF || format == Asc.c_oAscFileType.PDFA) { menu.hide(); - Common.NotificationCenter.trigger(asExport ? 'export' : 'download:settings', this.leftMenu, format); + Common.NotificationCenter.trigger('download:settings', this.leftMenu, format); } else { this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); menu.hide(); diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js index a4404eeede..ef6a0c2874 100644 --- a/apps/spreadsheeteditor/main/app/controller/Print.js +++ b/apps/spreadsheeteditor/main/app/controller/Print.js @@ -75,7 +75,7 @@ define([ }); Common.NotificationCenter.on('print', _.bind(this.openPrintSettings, this, 'print')); Common.NotificationCenter.on('download:settings', _.bind(this.openPrintSettings, this, 'download')); - Common.NotificationCenter.on('export', _.bind(this.openPrintSettings, this, 'export')); + Common.NotificationCenter.on('export:to', _.bind(this.openPrintSettings, this, 'export')); }, onLaunch: function() {