diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index 173946bec..dac5a9940 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -1132,6 +1132,37 @@ define([ me.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument); + var buttons = []; + if (mode === 2) { + buttons.push({ + text: me.textCancel, + onClick: function () { + me._state.openDlg = null; + } + }); + } + buttons.push({ + text: 'OK', + bold: true, + onClick: function() { + var encoding = picker.value; + + if (me.api) { + if (mode==2) { + formatOptions && formatOptions.asc_setAdvancedOptions(new Asc.asc_CTextOptions(encoding)); + me.api.asc_DownloadAs(formatOptions); + } else { + me.api.asc_setAdvancedOptions(type, new Asc.asc_CTextOptions(encoding)); + } + + if (!me._isDocReady) { + me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); + } + } + me._state.openDlg = null; + } + }); + me._state.openDlg = uiApp.modal({ title: me.advTxtOptions, text: '', @@ -1142,29 +1173,7 @@ define([ '' + '
' + '', - buttons: [ - { - text: 'OK', - bold: true, - onClick: function() { - var encoding = picker.value; - - if (me.api) { - if (mode==2) { - formatOptions && formatOptions.asc_setAdvancedOptions(new Asc.asc_CTextOptions(encoding)); - me.api.asc_DownloadAs(formatOptions); - } else { - me.api.asc_setAdvancedOptions(type, new Asc.asc_CTextOptions(encoding)); - } - - if (!me._isDocReady) { - me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); - } - } - me._state.openDlg = null; - } - } - ] + buttons: buttons }); picker = uiApp.picker({ diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js index 5e0791bc1..14eca0c6f 100644 --- a/apps/documenteditor/mobile/app/controller/Settings.js +++ b/apps/documenteditor/mobile/app/controller/Settings.js @@ -564,7 +564,7 @@ define([ if (format == Asc.c_oAscFileType.TXT || format == Asc.c_oAscFileType.RTF) { _.defer(function () { uiApp.confirm( - me.warnDownloadAs, + (format === Asc.c_oAscFileType.TXT) ? me.warnDownloadAs : me.warnDownloadAsRTF, me.notcriticalErrorTitle, function () { Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, me.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format)); @@ -746,7 +746,8 @@ define([ unknownText: 'Unknown', txtLoading : 'Loading...', notcriticalErrorTitle : 'Warning', - warnDownloadAs : 'If you continue saving in this format all features except the text will be lost.