rm row if row

This commit is contained in:
James Campos 2011-09-05 17:25:14 -07:00
parent 28ec967407
commit f393ba82a5
2 changed files with 8 additions and 4 deletions

View File

@ -1495,14 +1495,18 @@
$.extend($('a.error', QR.qr), data); $.extend($('a.error', QR.qr), data);
tc = data.textContent; tc = data.textContent;
if (tc === 'Error: Duplicate file entry detected.') { if (tc === 'Error: Duplicate file entry detected.') {
$.rm(row); if (row) {
$.rm(row);
}
setTimeout(QR.submit, 1000); setTimeout(QR.submit, 1000);
} else if (tc === 'You seem to have mistyped the verification.') { } else if (tc === 'You seem to have mistyped the verification.') {
setTimeout(QR.submit, 1000); setTimeout(QR.submit, 1000);
} }
return; return;
} }
$.rm(row); if (row) {
$.rm(row);
}
if (conf['Persistent QR'] || ((_ref2 = $('#files input', QR.qr)) != null ? _ref2.files.length : void 0)) { if (conf['Persistent QR'] || ((_ref2 = $('#files input', QR.qr)) != null ? _ref2.files.length : void 0)) {
QR.reset(); QR.reset();
} else { } else {

View File

@ -1158,12 +1158,12 @@ QR =
$.extend $('a.error', QR.qr), data $.extend $('a.error', QR.qr), data
tc = data.textContent tc = data.textContent
if tc is 'Error: Duplicate file entry detected.' if tc is 'Error: Duplicate file entry detected.'
$.rm row $.rm row if row
setTimeout QR.submit, 1000 setTimeout QR.submit, 1000
else if tc is 'You seem to have mistyped the verification.' else if tc is 'You seem to have mistyped the verification.'
setTimeout QR.submit, 1000 setTimeout QR.submit, 1000
return return
$.rm row $.rm row if row
if conf['Persistent QR'] or $('#files input', QR.qr)?.files.length if conf['Persistent QR'] or $('#files input', QR.qr)?.files.length
QR.reset() QR.reset()
else else