From 286aebd93bd49eac2ff80c3a6930f7f692a4c3ef Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 18 Apr 2012 17:01:40 +0200 Subject: [PATCH] [ticket/10811] Fix AJAX callback alt_text so it can be repeated. PHPBB3-10811 --- phpBB/assets/javascript/core.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 958b6c9ff6..74c71fca79 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -436,11 +436,12 @@ phpbb.add_ajax_callback = function(id, callback) * the alt-text data attribute, and replaces the text in the attribute with the * current text so that the process can be repeated. */ -phpbb.add_ajax_callback('alt_text', function(data) { +phpbb.add_ajax_callback('alt_text', function() { var el = $(this), alt_text; alt_text = el.attr('data-alt-text'); + el.attr('data-alt-text', el.text()); el.attr('title', alt_text); el.text(alt_text); });