diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 7c5daef0f..83778fe9a 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -114,14 +114,17 @@ define([ 'menu:show': this.onFileMenu.bind(this, 'show') }, 'Common.Views.Header': { - 'print': this.onPrint.bind(this), + 'print': function (opts) { + var _main = this.getApplication().getController('Main'); + _main.onPrint(); + }, 'downloadas': function (opts) { var _main = this.getApplication().getController('Main'); var _file_type = _main.document.fileType, _format; if ( !!_file_type ) { if ( /^pdf|xps|djvu/i.test(_file_type) ) { - this.api.asc_DownloadOrigin(); + _main.api.asc_DownloadOrigin(); return; } else { _format = Asc.c_oAscFileType[ _file_type.toUpperCase() ]; diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 6f42f5adc..dd1e466f6 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -128,7 +128,10 @@ define([ 'menu:show': this.onFileMenu.bind(this, 'show') }, 'Common.Views.Header': { - 'print': this.onPrint.bind(this), + 'print': function (opts) { + var _main = this.getApplication().getController('Main'); + _main.onPrint(); + }, 'downloadas': function (opts) { var _main = this.getApplication().getController('Main'); var _file_type = _main.document.fileType, diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 571b4a81f..eb0132201 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -79,7 +79,10 @@ define([ 'settings:apply': _.bind(this.applyFormulaSettings, this) }, 'Common.Views.Header': { - 'print': this.onPrint.bind(this), + 'print': function (opts) { + var _main = this.getApplication().getController('Main'); + _main.onPrint(); + }, 'downloadas': function (opts) { var _main = this.getApplication().getController('Main'); var _file_type = _main.appOptions.spreadsheet.fileType,