r73069 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73068‎ | r73069 | r73070 >
Date:15:42, 15 September 2010
Author:adam
Status:resolved (Comments)
Tags:
Comment:
Fixing click binding on the links and going back to looking for the stale flag on returned results
Modified paths:
  • /trunk/extensions/ArticleAssessmentPilot/js/ArticleAssessment.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleAssessmentPilot/js/ArticleAssessment.js
@@ -101,7 +101,10 @@
102102 .find( '.article-assessment-rate-feedback' )
103103 .html( feedback )
104104 .find( '.feedbacklink' )
105 - .wrap( $( '<a href="#"></a>' ).click( $.ArticleAssessment.fn.showFeedback ) )
 105+ .wrap( '<a href="#"></a>' )
 106+ .parent()
 107+ .click( $.ArticleAssessment.fn.showFeedback )
 108+ .end()
106109 .end()
107110 .end()
108111 .find( '#article-assessment-ratings legend' )
@@ -110,13 +113,19 @@
111114 .find( '.article-assessment-show-ratings' )
112115 .html( resultsshow )
113116 .find( '.showlink' )
114 - .wrap( $( '<a href="#"></a>' ).click( $.ArticleAssessment.fn.showRatings ) )
 117+ .wrap( '<a href="#"></a>' )
 118+ .parent()
 119+ .click( $.ArticleAssessment.fn.showRatings )
 120+ .end()
115121 .end()
116122 .end()
117123 .find( '.article-assessment-hide-ratings' )
118124 .html( resultshide )
119125 .find ( '.hidelink' )
120 - .wrap( $( '<a href="#"></a>' ).click( $.ArticleAssessment.fn.hideRatings ) )
 126+ .wrap( '<a href="#"></a>' )
 127+ .parent()
 128+ .click( $.ArticleAssessment.fn.hideRatings )
 129+ .end()
121130 .end()
122131 .end();
123132 for ( var i = 0; i < settings.fieldMessages.length; i++ ) {
@@ -270,7 +279,7 @@
271280 }
272281 }
273282 // if the rating is more than 5 revisions old, mark it as stale
274 - if( data.query.articleassessment[0].revid < wgCurRevisionId - 5 ) {
 283+ if( data.query.articleassessment.stale ) {
275284 // add the stale star class to each on star
276285 $( '.ui-stars-star-on' )
277286 .addClass( 'ui-stars-star-stale' );

Comments

#Comment by Catrope (talk | contribs)   12:45, 22 September 2010

Staleness detection fixed in r73138.

Status & tagging log