1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-25 20:45:16 +02:00

[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() {
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;
}
@ -303,8 +303,8 @@ phpbb.ajaxify = function(options, refresh, callback) {
if (is_form)
{
action = /action\[([a-z]+)\]/.exec(this.name);
data = decodeURI($(this).closest('form').serialize());
path = $(this).closest('form').attr('action').replace('&', '&');
data = decodeURI($this.closest('form').serialize());
path = $this.closest('form').attr('action').replace('&', '&');
if (action)
{
@ -316,7 +316,7 @@ phpbb.ajaxify = function(options, refresh, callback) {
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;
}
@ -325,7 +325,7 @@ phpbb.ajaxify = function(options, refresh, callback) {
}
else
{
if (run_exception && options.exception($(this)))
if (run_exception && options.exception($this))
{
return true;
}