From 59031fdc735a80502ea2cda3683a9276da5649cd Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Thu, 18 Aug 2011 18:34:09 +0100 Subject: [PATCH] [ticket/10272] AJAXified the add / remove friend / foe links. PHPBB3-10272 --- phpBB/styles/prosilver/template/memberlist_view.html | 8 ++++---- phpBB/styles/script.js | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html index f10ec64975..d8bb92a731 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -35,15 +35,15 @@
{custom_fields.PROFILE_FIELD_NAME}:
{custom_fields.PROFILE_FIELD_VALUE}
-
 
{L_REMOVE_FRIEND}
+
 
{L_REMOVE_FRIEND}
-
 
{L_REMOVE_FOE}
+
 
{L_REMOVE_FOE}
-
 
{L_ADD_FRIEND}
+
 
{L_ADD_FRIEND}
-
 
{L_ADD_FOE}
+
 
{L_ADD_FOE}
diff --git a/phpBB/styles/script.js b/phpBB/styles/script.js index 35c99464bd..d17a2cdc10 100644 --- a/phpBB/styles/script.js +++ b/phpBB/styles/script.js @@ -346,7 +346,12 @@ phpbb.add_ajax_callback('post_delete', function(el) { tr.next().find('.up').html('Move up'); phpbb.ajaxify({selector: tr.next().find('.up').children('a')}, false, 'forum_up'); } -}); +}).add_ajax_callback('zebra', function(el, res) { + if (res.MESSAGE_TEXT.indexOf('successfully') !== -1) { + $('.zebra').html(res.MESSAGE_TEXT.split('