r109651 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109650‎ | r109651 | r109652 >
Date:21:46, 20 January 2012
Author:gregchiasson
Status:ok
Tags:aft 
Comment:
AFT5 feedback page - now with working sorting.
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
@@ -86,19 +86,19 @@
8787 return false;
8888 } );
8989 $( '.articleFeedbackv5-sort-link' ).bind( 'click', function( e ) {
90 - id = $.articleFeedbackv5special.stripID( this, 'articleFeedbackv5-special-sort-' );
91 - oldId = $.articleFeedbackv5special.sort;
 90+ id = $.articleFeedbackv5special.stripID( this, 'articleFeedbackv5-special-sort-' );
 91+ oldId = $.articleFeedbackv5special.sort;
9292
9393 // set direction = desc...
94 - $.articleFeedbackv5special.sortDirection = 'desc';
9594 $.articleFeedbackv5special.sort = id;
9695 $.articleFeedbackv5special.continue = null;
9796
9897 // unless we're flipping the direction on the current sort.
99 - if( id == oldId
100 - && $.articleFeedbackv5special.sortDirection == 'desc') {
 98+ if( id == oldId && $.articleFeedbackv5special.sortDirection == 'desc' ) {
10199 $.articleFeedbackv5special.sortDirection = 'asc';
102 - }
 100+ } else {
 101+ $.articleFeedbackv5special.sortDirection = 'desc';
 102+ }
103103
104104 $.articleFeedbackv5special.loadFeedback( true );
105105 // draw arrow and load feedback posts

Status & tagging log