Merge pull request #1156 from ONLYOFFICE/feature/bug-fixes

Feature/bug fixes
This commit is contained in:
maxkadushkin 2021-09-03 17:36:12 +03:00 committed by GitHub
commit 3557ae1d5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 9 deletions

View file

@ -25,6 +25,7 @@ class DownloadController extends Component {
const _t = t("Settings", { returnObjects: true }); const _t = t("Settings", { returnObjects: true });
if(format) { if(format) {
this.closeModal();
if (format == Asc.c_oAscFileType.TXT || format == Asc.c_oAscFileType.RTF) { if (format == Asc.c_oAscFileType.TXT || format == Asc.c_oAscFileType.RTF) {
f7.dialog.create({ f7.dialog.create({
title: _t.notcriticalErrorTitle, title: _t.notcriticalErrorTitle,
@ -37,8 +38,8 @@ class DownloadController extends Component {
text: _t.textOk, text: _t.textOk,
onClick: () => { onClick: () => {
if (format == Asc.c_oAscFileType.TXT) { if (format == Asc.c_oAscFileType.TXT) {
const isDocReady = this.props.storeAppOptions.isDocReady; const advOptions = api.asc_getAdvancedOptions();
onAdvancedOptions(Asc.c_oAscAdvancedOptionsID.TXT, api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format), _t, isDocReady); Common.Notifications.trigger('openEncoding', Asc.c_oAscAdvancedOptionsID.TXT, advOptions, 2, new Asc.asc_CDownloadOptions(format));
} }
else { else {
setTimeout(() => { setTimeout(() => {
@ -51,7 +52,6 @@ class DownloadController extends Component {
}).open(); }).open();
} }
else { else {
this.closeModal();
setTimeout(() => { setTimeout(() => {
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
}, 400); }, 400);

View file

@ -520,10 +520,10 @@ const EditText = props => {
previewList = ''; previewList = '';
break; break;
case 0: case 0:
previewList = 'Bullets'; previewList = t('Edit.textBullets');
break; break;
case 1: case 1:
previewList = 'Numbers'; previewList = t('Edit.textNumbers');
break; break;
} }

View file

@ -34,10 +34,10 @@ const EditText = props => {
previewList = ''; previewList = '';
break; break;
case 0: case 0:
previewList = 'Bullets'; previewList = t('View.Edit.textBullets');
break; break;
case 1: case 1:
previewList = 'Numbers'; previewList = t('View.Edit.textNumbers');
break; break;
} }

View file

@ -25,6 +25,7 @@ class DownloadController extends Component {
const _t = t("View.Settings", {returnObjects: true}); const _t = t("View.Settings", {returnObjects: true});
if (format) { if (format) {
this.closeModal();
if (format == Asc.c_oAscFileType.CSV) { if (format == Asc.c_oAscFileType.CSV) {
f7.dialog.create({ f7.dialog.create({
title: _t.notcriticalErrorTitle, title: _t.notcriticalErrorTitle,
@ -36,13 +37,14 @@ class DownloadController extends Component {
{ {
text: _t.textOk, text: _t.textOk,
onClick: () => { onClick: () => {
onAdvancedOptions(Asc.c_oAscAdvancedOptionsID.CSV, api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format), _t, true); const advOptions = api.asc_getAdvancedOptions();
Common.Notifications.trigger('openEncoding', Asc.c_oAscAdvancedOptionsID.CSV, advOptions, 2, new Asc.asc_CDownloadOptions(format))
// onAdvancedOptions(Asc.c_oAscAdvancedOptionsID.CSV, api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format), _t, true);
} }
} }
] ]
}).open(); }).open();
} else { } else {
this.closeModal();
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
} }
} }