[DE mobile] Fix bug 50879
This commit is contained in:
parent
0991b8dbdb
commit
198163bfc0
|
@ -25,6 +25,7 @@ class DownloadController extends Component {
|
|||
const _t = t("Settings", { returnObjects: true });
|
||||
|
||||
if(format) {
|
||||
this.closeModal();
|
||||
if (format == Asc.c_oAscFileType.TXT || format == Asc.c_oAscFileType.RTF) {
|
||||
f7.dialog.confirm(
|
||||
(format === Asc.c_oAscFileType.TXT) ? _t.textDownloadTxt : _t.textDownloadRtf,
|
||||
|
@ -35,16 +36,18 @@ class DownloadController extends Component {
|
|||
onAdvancedOptions(Asc.c_oAscAdvancedOptionsID.TXT, api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format), _t, isDocReady);
|
||||
}
|
||||
else {
|
||||
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||
setTimeout(() => {
|
||||
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||
}, 400);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
else {
|
||||
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||
setTimeout(() => {
|
||||
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||
}, 400);
|
||||
}
|
||||
|
||||
this.closeModal();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,11 +19,6 @@ const Settings = props => {
|
|||
}
|
||||
});
|
||||
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed )
|
||||
props.onclosed();
|
||||
};
|
||||
|
||||
const closeModal = () => {
|
||||
if (Device.phone) {
|
||||
f7.sheet.close('.settings-popup');
|
||||
|
@ -46,15 +41,14 @@ const Settings = props => {
|
|||
};
|
||||
|
||||
const onPrint = () => {
|
||||
closeModal();
|
||||
setTimeout(() => {
|
||||
Common.EditorApi.get().asc_Print();
|
||||
}, 1);
|
||||
closeModal();
|
||||
}, 400);
|
||||
};
|
||||
|
||||
const showHelp = () => {
|
||||
let url = __HELP_URL__;
|
||||
// let url = 'https://helpcenter.onlyoffice.com';
|
||||
|
||||
if (url.charAt(url.length-1) !== '/') {
|
||||
url += '/';
|
||||
|
@ -68,17 +62,21 @@ const Settings = props => {
|
|||
}
|
||||
|
||||
closeModal();
|
||||
window.open(url, "_blank");
|
||||
setTimeout(() => {
|
||||
window.open(url, "_blank");
|
||||
}, 400);
|
||||
};
|
||||
|
||||
const onOrthographyCheck = () => {
|
||||
closeModal();
|
||||
Common.EditorApi.get().asc_pluginRun("asc.{B631E142-E40B-4B4C-90B9-2D00222A286E}", 0);
|
||||
setTimeout(() => {
|
||||
Common.EditorApi.get().asc_pluginRun("asc.{B631E142-E40B-4B4C-90B9-2D00222A286E}", 0);
|
||||
}, 400);
|
||||
};
|
||||
|
||||
return <SettingsView usePopover={!Device.phone}
|
||||
openOptions={props.openOptions}
|
||||
onclosed={onviewclosed}
|
||||
onclosed={props.onclosed}
|
||||
onReaderMode={onReaderMode}
|
||||
onPrint={onPrint}
|
||||
showHelp={showHelp}
|
||||
|
|
|
@ -129,7 +129,7 @@ class MainPage extends Component {
|
|||
}
|
||||
{
|
||||
!this.state.settingsVisible ? null :
|
||||
<Settings openOptions={this.handleClickToOpenOptions} onclosed={this.handleOptionsViewClosed.bind(this, 'settings')} />
|
||||
<Settings openOptions={this.handleClickToOpenOptions.bind(this)} onclosed={this.handleOptionsViewClosed.bind(this, 'settings')} />
|
||||
}
|
||||
{
|
||||
!this.state.collaborationVisible ? null :
|
||||
|
|
Loading…
Reference in a new issue