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 = () => {
|
||||
$('#importmessagefail').fadeOut('fast');
|
||||
const ret = window.confirm(html10n.get('pad.impexp.confirmimport'));
|
||||
if (ret) {
|
||||
currentImportTimer = window.setTimeout(() => {
|
||||
if (!currentImportTimer) {
|
||||
return;
|
||||
}
|
||||
currentImportTimer = null;
|
||||
importErrorMessage('Request timed out.');
|
||||
importDone();
|
||||
}, 25000); // time out after some number of seconds
|
||||
$('#importsubmitinput').attr(
|
||||
if (!window.confirm(html10n.get('pad.impexp.confirmimport'))) return false;
|
||||
currentImportTimer = window.setTimeout(() => {
|
||||
if (!currentImportTimer) {
|
||||
return;
|
||||
}
|
||||
currentImportTimer = null;
|
||||
importErrorMessage('Request timed out.');
|
||||
importDone();
|
||||
}, 25000); // time out after some number of seconds
|
||||
$('#importsubmitinput').attr(
|
||||
{
|
||||
disabled: true,
|
||||
}).val(html10n.get('pad.impexp.importing'));
|
||||
|
||||
window.setTimeout(() => {
|
||||
$('#importfileinput').attr(
|
||||
{
|
||||
disabled: true,
|
||||
}).val(html10n.get('pad.impexp.importing'));
|
||||
|
||||
window.setTimeout(() => {
|
||||
$('#importfileinput').attr(
|
||||
{
|
||||
disabled: true,
|
||||
});
|
||||
}, 0);
|
||||
$('#importarrow').stop(true, true).hide();
|
||||
$('#importstatusball').show();
|
||||
}
|
||||
return ret;
|
||||
});
|
||||
}, 0);
|
||||
$('#importarrow').stop(true, true).hide();
|
||||
$('#importstatusball').show();
|
||||
return true;
|
||||
};
|
||||
|
||||
const importDone = () => {
|
||||
|
|
Loading…
Reference in a new issue