qr.cb.submit -> qr.submit

This commit is contained in:
James Campos 2011-07-20 02:48:19 -07:00
parent eefb5f0ffa
commit d313525c8c
2 changed files with 57 additions and 57 deletions

View File

@ -1294,6 +1294,11 @@
quote = $('a.quotejs:not(:first-child)', root); quote = $('a.quotejs:not(:first-child)', root);
return $.bind(quote, 'click', qr.cb.quote); return $.bind(quote, 'click', qr.cb.quote);
}, },
quote: function(e) {
e.preventDefault();
return qr.quote(this);
}
},
submit: function(e) { submit: function(e) {
var id, inputfile, isQR, op; var id, inputfile, isQR, op;
if ($.config('Auto Watch Reply') && $.config('Thread Watcher')) { if ($.config('Auto Watch Reply') && $.config('Thread Watcher')) {
@ -1322,11 +1327,6 @@
return qr.sage = /sage/i.test($('input[name=email]', this).value); return qr.sage = /sage/i.test($('input[name=email]', this).value);
} }
}, },
quote: function(e) {
e.preventDefault();
return qr.quote(this);
}
},
quote: function(link) { quote: function(link) {
var dialog, id, s, selection, selectionID, ta, text, _ref; var dialog, id, s, selection, selectionID, ta, text, _ref;
if (dialog = $('#qr')) { if (dialog = $('#qr')) {
@ -1382,7 +1382,7 @@
}); });
$.after($('input[name=email]', dialog), spoiler); $.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); $.bind($('input[name=recaptcha_response_field]', dialog), 'keydown', Recaptcha.listener);
$.append(d.body, dialog); $.append(d.body, dialog);
return dialog; return dialog;
@ -2696,7 +2696,7 @@
$.addStyle(main.css); $.addStyle(main.css);
if ((form = $('form[name=post]')) && (canPost = !!$('#recaptcha_response_field'))) { if ((form = $('form[name=post]')) && (canPost = !!$('#recaptcha_response_field'))) {
Recaptcha.init(); Recaptcha.init();
$.bind(form, 'submit', qr.cb.submit); $.bind(form, 'submit', qr.submit);
} }
if ($.config('Auto Noko')) { if ($.config('Auto Noko')) {
$('.postarea form').action += '?auto_noko'; $('.postarea form').action += '?auto_noko';

View File

@ -1014,6 +1014,10 @@ qr =
quote = $ 'a.quotejs:not(:first-child)', root quote = $ 'a.quotejs:not(:first-child)', root
$.bind quote, 'click', qr.cb.quote $.bind quote, 'click', qr.cb.quote
quote: (e) ->
e.preventDefault()
qr.quote @
submit: (e) -> submit: (e) ->
if $.config('Auto Watch Reply') and $.config('Thread Watcher') if $.config('Auto Watch Reply') and $.config('Thread Watcher')
if g.REPLY and $('img.favicon').src is Favicon.empty if g.REPLY and $('img.favicon').src is Favicon.empty
@ -1039,10 +1043,6 @@ qr =
qr.autohide.set() qr.autohide.set()
qr.sage = /sage/i.test $('input[name=email]', @).value qr.sage = /sage/i.test $('input[name=email]', @).value
quote: (e) ->
e.preventDefault()
qr.quote @
quote: (link) -> quote: (link) ->
if dialog = $ '#qr' if dialog = $ '#qr'
qr.autohide.unset() qr.autohide.unset()
@ -1110,7 +1110,7 @@ qr =
innerHTML: " [<input type=checkbox name=spoiler>Spoiler Image?]" innerHTML: " [<input type=checkbox name=spoiler>Spoiler Image?]"
$.after $('input[name=email]', dialog), spoiler $.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 $.bind $('input[name=recaptcha_response_field]', dialog), 'keydown', Recaptcha.listener
$.append d.body, dialog $.append d.body, dialog
@ -2094,7 +2094,7 @@ main =
if (form = $ 'form[name=post]') and canPost = !!$ '#recaptcha_response_field' if (form = $ 'form[name=post]') and canPost = !!$ '#recaptcha_response_field'
Recaptcha.init() Recaptcha.init()
$.bind form, 'submit', qr.cb.submit $.bind form, 'submit', qr.submit
#major features #major features
if $.config 'Auto Noko' if $.config 'Auto Noko'