mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
pad_impexp: Invert logic to improve readability
This commit is contained in:
parent
ce4ce8ce95
commit
efe07cd027
1 changed files with 21 additions and 23 deletions
|
@ -44,31 +44,29 @@ const padimpexp = (() => {
|
||||||
|
|
||||||
const fileInputSubmit = () => {
|
const fileInputSubmit = () => {
|
||||||
$('#importmessagefail').fadeOut('fast');
|
$('#importmessagefail').fadeOut('fast');
|
||||||
const ret = window.confirm(html10n.get('pad.impexp.confirmimport'));
|
if (!window.confirm(html10n.get('pad.impexp.confirmimport'))) return false;
|
||||||
if (ret) {
|
currentImportTimer = window.setTimeout(() => {
|
||||||
currentImportTimer = window.setTimeout(() => {
|
if (!currentImportTimer) {
|
||||||
if (!currentImportTimer) {
|
return;
|
||||||
return;
|
}
|
||||||
}
|
currentImportTimer = null;
|
||||||
currentImportTimer = null;
|
importErrorMessage('Request timed out.');
|
||||||
importErrorMessage('Request timed out.');
|
importDone();
|
||||||
importDone();
|
}, 25000); // time out after some number of seconds
|
||||||
}, 25000); // time out after some number of seconds
|
$('#importsubmitinput').attr(
|
||||||
$('#importsubmitinput').attr(
|
{
|
||||||
|
disabled: true,
|
||||||
|
}).val(html10n.get('pad.impexp.importing'));
|
||||||
|
|
||||||
|
window.setTimeout(() => {
|
||||||
|
$('#importfileinput').attr(
|
||||||
{
|
{
|
||||||
disabled: true,
|
disabled: true,
|
||||||
}).val(html10n.get('pad.impexp.importing'));
|
});
|
||||||
|
}, 0);
|
||||||
window.setTimeout(() => {
|
$('#importarrow').stop(true, true).hide();
|
||||||
$('#importfileinput').attr(
|
$('#importstatusball').show();
|
||||||
{
|
return true;
|
||||||
disabled: true,
|
|
||||||
});
|
|
||||||
}, 0);
|
|
||||||
$('#importarrow').stop(true, true).hide();
|
|
||||||
$('#importstatusball').show();
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const importDone = () => {
|
const importDone = () => {
|
||||||
|
|
Loading…
Reference in a new issue