[ticket/10271] Reduced calls to $ in phpbb.ajaxify.

This commit is contained in:
Callum Macrae 2011-10-22 16:44:27 +01:00 committed by Igor Wiedler
parent 415d33f20d
commit eabc6d29c4

View file

@ -226,9 +226,9 @@ phpbb.ajaxify = function(options, refresh, callback) {
} }
selector.click(function() { selector.click(function() {
var action, data, path, that = this; var action, data, path, that = this, $this = $(this);
if ($(this).data('ajax') == false) if ($this.data('ajax') == false)
{ {
return true; return true;
} }
@ -303,8 +303,8 @@ phpbb.ajaxify = function(options, refresh, callback) {
if (is_form) if (is_form)
{ {
action = /action\[([a-z]+)\]/.exec(this.name); action = /action\[([a-z]+)\]/.exec(this.name);
data = decodeURI($(this).closest('form').serialize()); data = decodeURI($this.closest('form').serialize());
path = $(this).closest('form').attr('action').replace('&', '&'); path = $this.closest('form').attr('action').replace('&', '&');
if (action) if (action)
{ {
@ -316,7 +316,7 @@ phpbb.ajaxify = function(options, refresh, callback) {
data += '&' + this.name + '=' + this.value; data += '&' + this.name + '=' + this.value;
} }
if (run_exception && options.exception($(this).parents('form'), action, data)) if (run_exception && options.exception($this.parents('form'), action, data))
{ {
return true; return true;
} }
@ -325,7 +325,7 @@ phpbb.ajaxify = function(options, refresh, callback) {
} }
else else
{ {
if (run_exception && options.exception($(this))) if (run_exception && options.exception($this))
{ {
return true; return true;
} }