don't touch normal form
This commit is contained in:
parent
f38af20981
commit
fbe4d9be5a
@ -1426,6 +1426,9 @@
|
|||||||
},
|
},
|
||||||
submit: function(e) {
|
submit: function(e) {
|
||||||
var id, msg, op;
|
var id, msg, op;
|
||||||
|
if (this.id !== 'qr_form') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (msg = qr.postInvalid()) {
|
if (msg = qr.postInvalid()) {
|
||||||
if (typeof e.preventDefault === "function") {
|
if (typeof e.preventDefault === "function") {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@ -1447,9 +1450,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.id !== 'qr_form') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!e) {
|
if (!e) {
|
||||||
this.submit();
|
this.submit();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1176,6 +1176,8 @@ qr =
|
|||||||
$.replace oldFile, newFile
|
$.replace oldFile, newFile
|
||||||
|
|
||||||
submit: (e) ->
|
submit: (e) ->
|
||||||
|
return unless @id is 'qr_form'
|
||||||
|
|
||||||
#XXX `e` won't exist if we're here from `qr.submit.call form`.
|
#XXX `e` won't exist if we're here from `qr.submit.call form`.
|
||||||
if msg = qr.postInvalid()
|
if msg = qr.postInvalid()
|
||||||
e.preventDefault?()
|
e.preventDefault?()
|
||||||
@ -1193,8 +1195,6 @@ qr =
|
|||||||
if $('img.favicon', op).src is Favicon.empty
|
if $('img.favicon', op).src is Favicon.empty
|
||||||
watcher.watch op, id
|
watcher.watch op, id
|
||||||
|
|
||||||
return unless @id is 'qr_form'
|
|
||||||
|
|
||||||
if !e then @submit()
|
if !e then @submit()
|
||||||
$('#error', qr.el).textContent = ''
|
$('#error', qr.el).textContent = ''
|
||||||
$('#autohide', qr.el).checked = true if conf['Auto Hide QR']
|
$('#autohide', qr.el).checked = true if conf['Auto Hide QR']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user