aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles/prosilver/template
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2012-02-08 18:42:21 +0100
committerIgor Wiedler <igor@wiedler.ch>2012-03-31 02:09:23 +0200
commit30888ff2a009fe5a001046484d5df4b6e2c67ac8 (patch)
treeed139226a6ab58c4a5f0725662cb46e9d4ad2feb /phpBB/styles/prosilver/template
parent265907b1150303ca141be0f09de4093cbfb6d9f5 (diff)
downloadforums-30888ff2a009fe5a001046484d5df4b6e2c67ac8.tar
forums-30888ff2a009fe5a001046484d5df4b6e2c67ac8.tar.gz
forums-30888ff2a009fe5a001046484d5df4b6e2c67ac8.tar.bz2
forums-30888ff2a009fe5a001046484d5df4b6e2c67ac8.tar.xz
forums-30888ff2a009fe5a001046484d5df4b6e2c67ac8.zip
[feature/ajax] Use attr('data-foo') instead of data('foo')
data() is slower and does additional unwanted things like caching and type conversion. Just reading the value is safer. PHPBB3-10270
Diffstat (limited to 'phpBB/styles/prosilver/template')
-rw-r--r--phpBB/styles/prosilver/template/ajax.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js
index 117a392dc6..a0f0c820ba 100644
--- a/phpBB/styles/prosilver/template/ajax.js
+++ b/phpBB/styles/prosilver/template/ajax.js
@@ -4,7 +4,7 @@
// This callback finds the post from the delete link, and removes it.
phpbb.add_ajax_callback('post_delete', function() {
var el = $(this);
- if (el.data('refresh') === undefined)
+ if (el.attr('data-refresh') === undefined)
{
var post_id = el[0].href.split('&p=')[1];
el.parents('#p' + post_id).fadeOut(function() {
@@ -44,11 +44,11 @@ phpbb.add_ajax_callback('zebra', function(res) {
$('[data-ajax]').each(function() {
- var $this = $(this), ajax = $this.data('ajax');
+ var $this = $(this), ajax = $this.attr('data-ajax');
if (ajax !== 'false')
{
var fn = (ajax !== 'true') ? ajax : null;
- phpbb.ajaxify({selector: this}, $this.data('refresh') !== undefined, fn);
+ phpbb.ajaxify({selector: this}, $this.attr('data-refresh') !== undefined, fn);
}
});