[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 });
|
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.confirm(
|
f7.dialog.confirm(
|
||||||
(format === Asc.c_oAscFileType.TXT) ? _t.textDownloadTxt : _t.textDownloadRtf,
|
(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);
|
onAdvancedOptions(Asc.c_oAscAdvancedOptionsID.TXT, api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format), _t, isDocReady);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
setTimeout(() => {
|
||||||
|
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||||
|
}, 400);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
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 = () => {
|
const closeModal = () => {
|
||||||
if (Device.phone) {
|
if (Device.phone) {
|
||||||
f7.sheet.close('.settings-popup');
|
f7.sheet.close('.settings-popup');
|
||||||
|
@ -46,15 +41,14 @@ const Settings = props => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const onPrint = () => {
|
const onPrint = () => {
|
||||||
|
closeModal();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
Common.EditorApi.get().asc_Print();
|
Common.EditorApi.get().asc_Print();
|
||||||
}, 1);
|
}, 400);
|
||||||
closeModal();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const showHelp = () => {
|
const showHelp = () => {
|
||||||
let url = __HELP_URL__;
|
let url = __HELP_URL__;
|
||||||
// let url = 'https://helpcenter.onlyoffice.com';
|
|
||||||
|
|
||||||
if (url.charAt(url.length-1) !== '/') {
|
if (url.charAt(url.length-1) !== '/') {
|
||||||
url += '/';
|
url += '/';
|
||||||
|
@ -68,17 +62,21 @@ const Settings = props => {
|
||||||
}
|
}
|
||||||
|
|
||||||
closeModal();
|
closeModal();
|
||||||
window.open(url, "_blank");
|
setTimeout(() => {
|
||||||
|
window.open(url, "_blank");
|
||||||
|
}, 400);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onOrthographyCheck = () => {
|
const onOrthographyCheck = () => {
|
||||||
closeModal();
|
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}
|
return <SettingsView usePopover={!Device.phone}
|
||||||
openOptions={props.openOptions}
|
openOptions={props.openOptions}
|
||||||
onclosed={onviewclosed}
|
onclosed={props.onclosed}
|
||||||
onReaderMode={onReaderMode}
|
onReaderMode={onReaderMode}
|
||||||
onPrint={onPrint}
|
onPrint={onPrint}
|
||||||
showHelp={showHelp}
|
showHelp={showHelp}
|
||||||
|
|
|
@ -129,7 +129,7 @@ class MainPage extends Component {
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
!this.state.settingsVisible ? null :
|
!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 :
|
!this.state.collaborationVisible ? null :
|
||||||
|
|
Loading…
Reference in a new issue