[ticket/10272] Removed some duplication calls to $.fn.data.

PHPBB3-10272
This commit is contained in:
Callum Macrae 2011-11-18 17:33:22 +00:00 committed by Igor Wiedler
parent 2189efadc6
commit 81e357beef
2 changed files with 6 additions and 6 deletions

View file

@ -72,10 +72,10 @@ phpbb.add_ajax_callback('row_delete', function() {
$('[data-ajax]').each(function() { $('[data-ajax]').each(function() {
var $this = $(this); var $this = $(this), ajax = $this.data('ajax');
if ($this.data('ajax') !== 'false') if (ajax !== 'false')
{ {
var fn = ($this.data('ajax') !== 'true') ? $this.data('ajax') : null; var fn = (ajax !== 'true') ? ajax : null;
phpbb.ajaxify({selector: this}, $this.data('refresh') !== undefined, fn); phpbb.ajaxify({selector: this}, $this.data('refresh') !== undefined, fn);
} }
}); });

View file

@ -44,10 +44,10 @@ phpbb.add_ajax_callback('zebra', function(res) {
$('[data-ajax]').each(function() { $('[data-ajax]').each(function() {
var $this = $(this); var $this = $(this), ajax = $this.data('ajax');
if ($this.data('ajax') !== 'false') if (ajax !== 'false')
{ {
var fn = ($this.data('ajax') !== 'true') ? $this.data('ajax') : null; var fn = (ajax !== 'true') ? ajax : null;
phpbb.ajaxify({selector: this}, $this.data('refresh') !== undefined, fn); phpbb.ajaxify({selector: this}, $this.data('refresh') !== undefined, fn);
} }
}); });