Index: trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php |
— | — | @@ -51,6 +51,7 @@ |
52 | 52 | 'articlefeedback-form-switch-label', |
53 | 53 | 'articlefeedback-form-panel-title', |
54 | 54 | 'articlefeedback-form-panel-instructions', |
| 55 | + 'articlefeedback-form-panel-clear', |
55 | 56 | 'articlefeedback-form-panel-expertise', |
56 | 57 | 'articlefeedback-form-panel-expertise-studies', |
57 | 58 | 'articlefeedback-form-panel-expertise-profession', |
Index: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js |
— | — | @@ -264,6 +264,9 @@ |
265 | 265 | .attr( 'title', mw.msg( context.options.ratings[key].tip ) ) |
266 | 266 | .text( mw.msg( context.options.ratings[key].label ) ) |
267 | 267 | .end() |
| 268 | + .find( '.articleFeedback-rating-clear' ) |
| 269 | + .attr( 'title', mw.msg( 'articlefeedback-form-panel-clear' ) ) |
| 270 | + .end() |
268 | 271 | .appendTo( $(this) ); |
269 | 272 | } |
270 | 273 | } ) |
— | — | @@ -344,10 +347,11 @@ |
345 | 348 | .change( function() { |
346 | 349 | var $options = context.$ui.find( '.articleFeedback-expertise-options' ); |
347 | 350 | if ( $(this).is( ':checked' ) ) { |
348 | | - $options.slideDown(); |
| 351 | + $options.slideDown( 'fast' ); |
349 | 352 | } else { |
350 | | - $options.slideUp(); |
351 | | - $options.find( 'input:checkbox' ).attr( 'checked', false ); |
| 353 | + $options.slideUp( 'fast', function() { |
| 354 | + $options.find( 'input:checkbox' ).attr( 'checked', false ); |
| 355 | + } ); |
352 | 356 | } |
353 | 357 | } ) |
354 | 358 | .end() |
Index: trunk/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js |
— | — | @@ -277,6 +277,23 @@ |
278 | 278 | $( '#p-tb ul' ) |
279 | 279 | .append( '<li id="t-articlefeedback"><a href="#mw-articlefeedback"></a></li>' ) |
280 | 280 | .find( '#t-articlefeedback a' ) |
281 | | - .text( mw.msg( 'articlefeedback-form-switch-label' ) ); |
| 281 | + .text( mw.msg( 'articlefeedback-form-switch-label' ) ) |
| 282 | + .click( function() { |
| 283 | + // Get the image, set the count and an interval. |
| 284 | + var $box = $( '#mw-articlefeedback .articleFeedback' ); |
| 285 | + var count = 0; |
| 286 | + var interval = setInterval( function() { |
| 287 | + // Animate the opacity over .2 seconds |
| 288 | + $box.animate( { 'opacity': 0.5 }, 100, function() { |
| 289 | + // When finished, animate it back to solid. |
| 290 | + $box.animate( { 'opacity': 1.0 }, 100 ); |
| 291 | + } ); |
| 292 | + // Clear the interval once we've reached 3. |
| 293 | + if ( ++count >= 3 ) { |
| 294 | + clearInterval( interval ); |
| 295 | + } |
| 296 | + }, 200 ); |
| 297 | + return true; |
| 298 | + } ); |
282 | 299 | |
283 | 300 | } )( jQuery, mediaWiki ); |
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.i18n.php |
— | — | @@ -30,6 +30,7 @@ |
31 | 31 | 'articlefeedback-form-switch-label' => 'Rate this page', |
32 | 32 | 'articlefeedback-form-panel-title' => 'Rate this page', |
33 | 33 | 'articlefeedback-form-panel-instructions' => 'Please take a moment to rate this page.', |
| 34 | + 'articlefeedback-form-panel-clear' => 'Remove this rating', |
34 | 35 | 'articlefeedback-form-panel-expertise' => 'I have prior knowledge on this topic', |
35 | 36 | 'articlefeedback-form-panel-expertise-studies' => 'I\'ve studied it', |
36 | 37 | 'articlefeedback-form-panel-expertise-profession' => 'It\'s part of my profession', |