qr.cb.submit -> qr.submit
This commit is contained in:
parent
eefb5f0ffa
commit
d313525c8c
@ -1294,39 +1294,39 @@
|
||||
quote = $('a.quotejs:not(:first-child)', root);
|
||||
return $.bind(quote, 'click', qr.cb.quote);
|
||||
},
|
||||
submit: function(e) {
|
||||
var id, inputfile, isQR, op;
|
||||
if ($.config('Auto Watch Reply') && $.config('Thread Watcher')) {
|
||||
if (g.REPLY && $('img.favicon').src === Favicon.empty) {
|
||||
watcher.watch(null, g.THREAD_ID);
|
||||
} else {
|
||||
id = $('input[name=resto]').value;
|
||||
op = d.getElementById(id);
|
||||
if ($('img.favicon', op).src === Favicon.empty) {
|
||||
watcher.watch(op, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
isQR = this.id === 'qr_form';
|
||||
inputfile = $('input[type=file]', this);
|
||||
if (inputfile.value && inputfile.files[0].size > $('input[name=MAX_FILE_SIZE]').value) {
|
||||
e.preventDefault();
|
||||
if (isQR) {
|
||||
return $('#error').textContent = 'Error: File too large.';
|
||||
} else {
|
||||
return alert('Error: File too large.');
|
||||
}
|
||||
} else if (isQR) {
|
||||
$('#error').textContent = '';
|
||||
qr.autohide.set();
|
||||
return qr.sage = /sage/i.test($('input[name=email]', this).value);
|
||||
}
|
||||
},
|
||||
quote: function(e) {
|
||||
e.preventDefault();
|
||||
return qr.quote(this);
|
||||
}
|
||||
},
|
||||
submit: function(e) {
|
||||
var id, inputfile, isQR, op;
|
||||
if ($.config('Auto Watch Reply') && $.config('Thread Watcher')) {
|
||||
if (g.REPLY && $('img.favicon').src === Favicon.empty) {
|
||||
watcher.watch(null, g.THREAD_ID);
|
||||
} else {
|
||||
id = $('input[name=resto]').value;
|
||||
op = d.getElementById(id);
|
||||
if ($('img.favicon', op).src === Favicon.empty) {
|
||||
watcher.watch(op, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
isQR = this.id === 'qr_form';
|
||||
inputfile = $('input[type=file]', this);
|
||||
if (inputfile.value && inputfile.files[0].size > $('input[name=MAX_FILE_SIZE]').value) {
|
||||
e.preventDefault();
|
||||
if (isQR) {
|
||||
return $('#error').textContent = 'Error: File too large.';
|
||||
} else {
|
||||
return alert('Error: File too large.');
|
||||
}
|
||||
} else if (isQR) {
|
||||
$('#error').textContent = '';
|
||||
qr.autohide.set();
|
||||
return qr.sage = /sage/i.test($('input[name=email]', this).value);
|
||||
}
|
||||
},
|
||||
quote: function(link) {
|
||||
var dialog, id, s, selection, selectionID, ta, text, _ref;
|
||||
if (dialog = $('#qr')) {
|
||||
@ -1382,7 +1382,7 @@
|
||||
});
|
||||
$.after($('input[name=email]', dialog), spoiler);
|
||||
}
|
||||
$.bind($('form', dialog), 'submit', qr.cb.submit);
|
||||
$.bind($('form', dialog), 'submit', qr.submit);
|
||||
$.bind($('input[name=recaptcha_response_field]', dialog), 'keydown', Recaptcha.listener);
|
||||
$.append(d.body, dialog);
|
||||
return dialog;
|
||||
@ -2696,7 +2696,7 @@
|
||||
$.addStyle(main.css);
|
||||
if ((form = $('form[name=post]')) && (canPost = !!$('#recaptcha_response_field'))) {
|
||||
Recaptcha.init();
|
||||
$.bind(form, 'submit', qr.cb.submit);
|
||||
$.bind(form, 'submit', qr.submit);
|
||||
}
|
||||
if ($.config('Auto Noko')) {
|
||||
$('.postarea form').action += '?auto_noko';
|
||||
|
||||
@ -1014,35 +1014,35 @@ qr =
|
||||
quote = $ 'a.quotejs:not(:first-child)', root
|
||||
$.bind quote, 'click', qr.cb.quote
|
||||
|
||||
submit: (e) ->
|
||||
if $.config('Auto Watch Reply') and $.config('Thread Watcher')
|
||||
if g.REPLY and $('img.favicon').src is Favicon.empty
|
||||
watcher.watch null, g.THREAD_ID
|
||||
else
|
||||
id = $('input[name=resto]').value
|
||||
op = d.getElementById id
|
||||
if $('img.favicon', op).src is Favicon.empty
|
||||
watcher.watch op, id
|
||||
|
||||
isQR = @id is 'qr_form'
|
||||
|
||||
inputfile = $('input[type=file]', @)
|
||||
if inputfile.value and inputfile.files[0].size > $('input[name=MAX_FILE_SIZE]').value
|
||||
e.preventDefault()
|
||||
if isQR
|
||||
$('#error').textContent = 'Error: File too large.'
|
||||
else
|
||||
alert 'Error: File too large.'
|
||||
|
||||
else if isQR
|
||||
$('#error').textContent = ''
|
||||
qr.autohide.set()
|
||||
qr.sage = /sage/i.test $('input[name=email]', @).value
|
||||
|
||||
quote: (e) ->
|
||||
e.preventDefault()
|
||||
qr.quote @
|
||||
|
||||
submit: (e) ->
|
||||
if $.config('Auto Watch Reply') and $.config('Thread Watcher')
|
||||
if g.REPLY and $('img.favicon').src is Favicon.empty
|
||||
watcher.watch null, g.THREAD_ID
|
||||
else
|
||||
id = $('input[name=resto]').value
|
||||
op = d.getElementById id
|
||||
if $('img.favicon', op).src is Favicon.empty
|
||||
watcher.watch op, id
|
||||
|
||||
isQR = @id is 'qr_form'
|
||||
|
||||
inputfile = $('input[type=file]', @)
|
||||
if inputfile.value and inputfile.files[0].size > $('input[name=MAX_FILE_SIZE]').value
|
||||
e.preventDefault()
|
||||
if isQR
|
||||
$('#error').textContent = 'Error: File too large.'
|
||||
else
|
||||
alert 'Error: File too large.'
|
||||
|
||||
else if isQR
|
||||
$('#error').textContent = ''
|
||||
qr.autohide.set()
|
||||
qr.sage = /sage/i.test $('input[name=email]', @).value
|
||||
|
||||
quote: (link) ->
|
||||
if dialog = $ '#qr'
|
||||
qr.autohide.unset()
|
||||
@ -1110,7 +1110,7 @@ qr =
|
||||
innerHTML: " [<input type=checkbox name=spoiler>Spoiler Image?]"
|
||||
$.after $('input[name=email]', dialog), spoiler
|
||||
|
||||
$.bind $('form', dialog), 'submit', qr.cb.submit
|
||||
$.bind $('form', dialog), 'submit', qr.submit
|
||||
$.bind $('input[name=recaptcha_response_field]', dialog), 'keydown', Recaptcha.listener
|
||||
|
||||
$.append d.body, dialog
|
||||
@ -2094,7 +2094,7 @@ main =
|
||||
|
||||
if (form = $ 'form[name=post]') and canPost = !!$ '#recaptcha_response_field'
|
||||
Recaptcha.init()
|
||||
$.bind form, 'submit', qr.cb.submit
|
||||
$.bind form, 'submit', qr.submit
|
||||
|
||||
#major features
|
||||
if $.config 'Auto Noko'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user