[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);
|
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({
|
me._state.openDlg = uiApp.modal({
|
||||||
title: me.advTxtOptions,
|
title: me.advTxtOptions,
|
||||||
text: '',
|
text: '',
|
||||||
|
@ -1142,29 +1173,7 @@ define([
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div id="txt-encoding"></div>' +
|
'<div id="txt-encoding"></div>' +
|
||||||
'</div>',
|
'</div>',
|
||||||
buttons: [
|
buttons: 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
picker = uiApp.picker({
|
picker = uiApp.picker({
|
||||||
|
|
|
@ -564,7 +564,7 @@ define([
|
||||||
if (format == Asc.c_oAscFileType.TXT || format == Asc.c_oAscFileType.RTF) {
|
if (format == Asc.c_oAscFileType.TXT || format == Asc.c_oAscFileType.RTF) {
|
||||||
_.defer(function () {
|
_.defer(function () {
|
||||||
uiApp.confirm(
|
uiApp.confirm(
|
||||||
me.warnDownloadAs,
|
(format === Asc.c_oAscFileType.TXT) ? me.warnDownloadAs : me.warnDownloadAsRTF,
|
||||||
me.notcriticalErrorTitle,
|
me.notcriticalErrorTitle,
|
||||||
function () {
|
function () {
|
||||||
Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, me.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format));
|
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',
|
unknownText: 'Unknown',
|
||||||
txtLoading : 'Loading...',
|
txtLoading : 'Loading...',
|
||||||
notcriticalErrorTitle : 'Warning',
|
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 || {}))
|
})(), DE.Controllers.Settings || {}))
|
||||||
});
|
});
|
|
@ -519,6 +519,18 @@
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</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>
|
<li>
|
||||||
<a data-format="67" class="item-link no-indicator">
|
<a data-format="67" class="item-link no-indicator">
|
||||||
<div class="item-content">
|
<div class="item-content">
|
||||||
|
@ -567,18 +579,6 @@
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1232,6 +1232,38 @@ define([
|
||||||
|
|
||||||
me.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
|
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({
|
me._state.openDlg = uiApp.modal({
|
||||||
title: me.advCSVOptions,
|
title: me.advCSVOptions,
|
||||||
text: '',
|
text: '',
|
||||||
|
@ -1243,30 +1275,7 @@ define([
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div id="txt-encoding" class="small"></div>' +
|
'<div id="txt-encoding" class="small"></div>' +
|
||||||
'</div>',
|
'</div>',
|
||||||
buttons: [
|
buttons: 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var recommendedSettings = advOptions.asc_getRecommendedSettings();
|
var recommendedSettings = advOptions.asc_getRecommendedSettings();
|
||||||
|
|
Loading…
Reference in a new issue