Index: trunk/extensions/ArticleAssessmentPilot/js/ArticleAssessment.js |
— | — | @@ -101,7 +101,10 @@ |
102 | 102 | .find( '.article-assessment-rate-feedback' ) |
103 | 103 | .html( feedback ) |
104 | 104 | .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() |
106 | 109 | .end() |
107 | 110 | .end() |
108 | 111 | .find( '#article-assessment-ratings legend' ) |
— | — | @@ -110,13 +113,19 @@ |
111 | 114 | .find( '.article-assessment-show-ratings' ) |
112 | 115 | .html( resultsshow ) |
113 | 116 | .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() |
115 | 121 | .end() |
116 | 122 | .end() |
117 | 123 | .find( '.article-assessment-hide-ratings' ) |
118 | 124 | .html( resultshide ) |
119 | 125 | .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() |
121 | 130 | .end() |
122 | 131 | .end(); |
123 | 132 | for ( var i = 0; i < settings.fieldMessages.length; i++ ) { |
— | — | @@ -270,7 +279,7 @@ |
271 | 280 | } |
272 | 281 | } |
273 | 282 | // 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 ) { |
275 | 284 | // add the stale star class to each on star |
276 | 285 | $( '.ui-stars-star-on' ) |
277 | 286 | .addClass( 'ui-stars-star-stale' ); |