r100910 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100909‎ | r100910 | r100911 >
Date:23:54, 26 October 2011
Author:werdna
Status:ok
Tags:
Comment:
Fix user links
Modified paths:
  • /trunk/extensions/MoodBar/SpecialFeedbackDashboard.php (modified) (history)
  • /trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/SpecialFeedbackDashboard.php
@@ -215,10 +215,12 @@
216216 // 1.17wmf1 compat
217217 $links = $GLOBALS['wgUser']->getSkin()
218218 ->userToolLinks( $user->getId(), $username );
 219+
 220+ $userPageUrl = htmlspecialchars($user->getUserPage()->getLocalURL());
219221
220222 return <<<HTML
221223 <div class="fbd-item-userName">
222 - <a href="#">$username</a>
 224+ <a href="$userPageUrl" class="fbd-item-userLink">$username</a>
223225 <sup class="fbd-item-userLinks">
224226 $links
225227 </sup>
Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js
@@ -333,6 +333,12 @@
334334 loadComments( 'filter' );
335335 } );
336336
 337+ $( '.fbd-item-userLink' ).live( 'click', function( e ) {
 338+ e.preventDefault();
 339+ $('#fbd-filters-username').val( $(this).text() );
 340+ $('#fbd-filters').children('form').submit();
 341+ } );
 342+
337343 $( '#fbd-list-more' ).children( 'a' ).click( function( e ) {
338344 e.preventDefault();
339345 // We don't call saveFormState() here because we want to use the state of the form

Status & tagging log