[mobile] Fix display "Choose TXT/CSV Options" (Download As)
This commit is contained in:
parent
4e2f5fdaee
commit
00a1842f85
|
@ -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([
|
|||
'</div>' +
|
||||
'<div id="txt-encoding"></div>' +
|
||||
'</div>',
|
||||
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({
|
||||
|
|
|
@ -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.<br>Are you sure you want to continue?'
|
||||
warnDownloadAs : 'If you continue saving in this format all features except the text will be lost.<br>Are you sure you want to continue?',
|
||||
warnDownloadAsRTF : 'If you continue saving in this format some of the formatting might be lost.<br>Are you sure you want to continue?'
|
||||
}
|
||||
})(), DE.Controllers.Settings || {}))
|
||||
});
|
|
@ -519,6 +519,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-rtf"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<div class="item-title">RTF</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a data-format="67" class="item-link no-indicator">
|
||||
<div class="item-content">
|
||||
|
@ -567,18 +579,6 @@
|
|||
</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-rtf"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<div class="item-title">RTF</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1232,6 +1232,38 @@ 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.cols[0].value,
|
||||
delimiter = picker.cols[1].value;
|
||||
|
||||
if (me.api) {
|
||||
if (mode==2) {
|
||||
formatOptions && formatOptions.asc_setAdvancedOptions(new Asc.asc_CTextOptions(encoding, delimiter));
|
||||
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);
|
||||
}
|
||||
}
|
||||
me._state.openDlg = null;
|
||||
}
|
||||
});
|
||||
|
||||
me._state.openDlg = uiApp.modal({
|
||||
title: me.advCSVOptions,
|
||||
text: '',
|
||||
|
@ -1243,30 +1275,7 @@ define([
|
|||
'</div>' +
|
||||
'<div id="txt-encoding" class="small"></div>' +
|
||||
'</div>',
|
||||
buttons: [
|
||||
{
|
||||
text: 'OK',
|
||||
bold: true,
|
||||
onClick: function() {
|
||||
var encoding = picker.cols[0].value,
|
||||
delimiter = picker.cols[1].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, delimiter));
|
||||
}
|
||||
|
||||
if (!me._isDocReady) {
|
||||
me.onLongActionBegin(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
|
||||
}
|
||||
}
|
||||
me._state.openDlg = null;
|
||||
}
|
||||
}
|
||||
]
|
||||
buttons: buttons
|
||||
});
|
||||
|
||||
var recommendedSettings = advOptions.asc_getRecommendedSettings();
|
||||
|
|
Loading…
Reference in a new issue