From 81e357beef9e1e82607e59d59deba1cf54af4257 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Fri, 18 Nov 2011 17:33:22 +0000 Subject: [PATCH] [ticket/10272] Removed some duplication calls to $.fn.data. PHPBB3-10272 --- phpBB/adm/style/ajax.js | 6 +++--- phpBB/styles/prosilver/template/ajax.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js index 88c28fe071..902e072dda 100644 --- a/phpBB/adm/style/ajax.js +++ b/phpBB/adm/style/ajax.js @@ -72,10 +72,10 @@ phpbb.add_ajax_callback('row_delete', function() { $('[data-ajax]').each(function() { - var $this = $(this); - if ($this.data('ajax') !== 'false') + var $this = $(this), ajax = $this.data('ajax'); + 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); } }); diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index 722295c65d..afbf27a20d 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -44,10 +44,10 @@ phpbb.add_ajax_callback('zebra', function(res) { $('[data-ajax]').each(function() { - var $this = $(this); - if ($this.data('ajax') !== 'false') + var $this = $(this), ajax = $this.data('ajax'); + 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); } });