don't touch normal form

This commit is contained in:
James Campos 2011-08-25 15:48:48 -07:00
parent f38af20981
commit fbe4d9be5a
2 changed files with 5 additions and 5 deletions

View File

@ -1426,6 +1426,9 @@
},
submit: function(e) {
var id, msg, op;
if (this.id !== 'qr_form') {
return;
}
if (msg = qr.postInvalid()) {
if (typeof e.preventDefault === "function") {
e.preventDefault();
@ -1447,9 +1450,6 @@
}
}
}
if (this.id !== 'qr_form') {
return;
}
if (!e) {
this.submit();
}

View File

@ -1176,6 +1176,8 @@ qr =
$.replace oldFile, newFile
submit: (e) ->
return unless @id is 'qr_form'
#XXX `e` won't exist if we're here from `qr.submit.call form`.
if msg = qr.postInvalid()
e.preventDefault?()
@ -1193,8 +1195,6 @@ qr =
if $('img.favicon', op).src is Favicon.empty
watcher.watch op, id
return unless @id is 'qr_form'
if !e then @submit()
$('#error', qr.el).textContent = ''
$('#autohide', qr.el).checked = true if conf['Auto Hide QR']