[DE mobile] [SSE mobile] Display "Choose TXT/CSV Options" (Download As), add RTF format
This commit is contained in:
parent
d9f90692d8
commit
f1a8676e63
|
@ -153,6 +153,7 @@ define([
|
|||
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(me.onCoAuthoringDisconnect, me));
|
||||
Common.NotificationCenter.on('goback', _.bind(me.goBack, me));
|
||||
Common.NotificationCenter.on('download:advanced', _.bind(me.onAdvancedOptions, me));
|
||||
|
||||
// Initialize descendants
|
||||
_.each(me.getApplication().controllers, function(controller) {
|
||||
|
@ -1113,7 +1114,7 @@ define([
|
|||
Common.Utils.ThemeColor.setColors(colors, standart_colors);
|
||||
},
|
||||
|
||||
onAdvancedOptions: function(type, advOptions) {
|
||||
onAdvancedOptions: function(type, advOptions, mode, formatOptions) {
|
||||
if (this._state.openDlg) return;
|
||||
|
||||
var me = this;
|
||||
|
@ -1149,7 +1150,12 @@ define([
|
|||
var encoding = picker.value;
|
||||
|
||||
if (me.api) {
|
||||
me.api.asc_setAdvancedOptions(type, new Asc.asc_CTextOptions(encoding));
|
||||
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);
|
||||
|
|
|
@ -561,13 +561,13 @@ define([
|
|||
format = $(e.currentTarget).data('format');
|
||||
|
||||
if (format) {
|
||||
if (format == Asc.c_oAscFileType.TXT) {
|
||||
if (format == Asc.c_oAscFileType.TXT || format == Asc.c_oAscFileType.RTF) {
|
||||
_.defer(function () {
|
||||
uiApp.confirm(
|
||||
me.warnDownloadAs,
|
||||
me.notcriticalErrorTitle,
|
||||
function () {
|
||||
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||
Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, me.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format));
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
|
@ -567,6 +567,18 @@
|
|||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a data-format="68" class="item-link no-indicator">
|
||||
<div class="item-content">
|
||||
<div class="item-media">
|
||||
<i class="icon icon-format-docx"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<div class="item-title">RTF</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -158,6 +158,7 @@ define([
|
|||
/**/
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(me.onCoAuthoringDisconnect, me));
|
||||
Common.NotificationCenter.on('goback', _.bind(me.goBack, me));
|
||||
Common.NotificationCenter.on('download:advanced', _.bind(me.onAdvancedOptions, me));
|
||||
|
||||
// Initialize descendants
|
||||
_.each(me.getApplication().controllers, function(controller) {
|
||||
|
@ -1213,7 +1214,7 @@ define([
|
|||
Common.Utils.ThemeColor.setColors(colors, standart_colors);
|
||||
},
|
||||
|
||||
onAdvancedOptions: function(type, advOptions) {
|
||||
onAdvancedOptions: function(type, advOptions, mode, formatOptions) {
|
||||
if (this._state.openDlg) return;
|
||||
|
||||
var me = this;
|
||||
|
@ -1251,7 +1252,12 @@ define([
|
|||
delimiter = picker.cols[1].value;
|
||||
|
||||
if (me.api) {
|
||||
me.api.asc_setAdvancedOptions(type, new Asc.asc_CTextOptions(encoding, delimiter));
|
||||
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, delimiter));
|
||||
}
|
||||
|
||||
if (!me._isDocReady) {
|
||||
me.onLongActionBegin(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
|
||||
|
|
|
@ -200,7 +200,6 @@ define([
|
|||
});
|
||||
}).on('close', function () {
|
||||
$overlay.off('removeClass');
|
||||
$overlay.removeClass('modal-overlay-visible')
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -671,12 +670,12 @@ define([
|
|||
format = $(e.currentTarget).data('format');
|
||||
|
||||
if (format) {
|
||||
if (format == Asc.c_oAscFileType.TXT) {
|
||||
if (format == Asc.c_oAscFileType.CSV) {
|
||||
uiApp.confirm(
|
||||
me.warnDownloadAs,
|
||||
me.notcriticalErrorTitle,
|
||||
function () {
|
||||
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||
Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.CSV, me.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format));
|
||||
}
|
||||
);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue