Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js |
— | — | @@ -104,9 +104,15 @@ |
105 | 105 | } |
106 | 106 | |
107 | 107 | // Utility method for stripping long IDs down to the specific bits we care about. |
108 | | - $.articleFeedbackv5special.stripID = function ( object, toRemove ) { |
| 108 | + $.articleFeedbackv5special.stripID = function( object, toRemove ) { |
109 | 109 | return $( object ).attr( 'id' ).replace( toRemove, '' ); |
110 | 110 | } |
| 111 | + |
| 112 | + // Display/hide the toolbox |
| 113 | + $.articleFeedbackv5special.toggleToolbox = function( container ) { |
| 114 | + var id = $.articleFeedbackv5special.stripID(container, 'articleFeedbackv5-feedback-tools-'); |
| 115 | + $( '#articleFeedbackv5-feedback-tools-list-' + id ).slideToggle( 300 ); |
| 116 | + } |
111 | 117 | |
112 | 118 | // }}} |
113 | 119 | // {{{ Moderation methods |
— | — | @@ -238,6 +244,12 @@ |
239 | 245 | } |
240 | 246 | $( '#articleFeedbackv5-feedback-count-total' ).text( data['articlefeedbackv5-view-feedback'].count ); |
241 | 247 | $.articleFeedbackv5special.continue = data['articlefeedbackv5-view-feedback'].continue; |
| 248 | + // set effects on toolboxes |
| 249 | + $( '.articleFeedbackv5-feedback-tools > ul' ).hide(); |
| 250 | + $( '.articleFeedbackv5-feedback-tools' ).hover( |
| 251 | + function( eventObj ) { $.articleFeedbackv5special.toggleToolbox( this ); }, |
| 252 | + function( eventObj ) { $.articleFeedbackv5special.toggleToolbox( this ); } |
| 253 | + ); |
242 | 254 | } else { |
243 | 255 | $( '#articleFeedbackv5-show-feedback' ).text( mw.msg( 'articlefeedbackv5-error-loading-feedback' ) ); |
244 | 256 | } |