r109419 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109418‎ | r109419 | r109420 >
Date:18:30, 18 January 2012
Author:yonishostak
Status:ok (Comments)
Tags:
Comment:
AFTv5: toolbox animation
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
@@ -104,9 +104,15 @@
105105 }
106106
107107 // 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 ) {
109109 return $( object ).attr( 'id' ).replace( toRemove, '' );
110110 }
 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+ }
111117
112118 // }}}
113119 // {{{ Moderation methods
@@ -238,6 +244,12 @@
239245 }
240246 $( '#articleFeedbackv5-feedback-count-total' ).text( data['articlefeedbackv5-view-feedback'].count );
241247 $.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+ );
242254 } else {
243255 $( '#articleFeedbackv5-show-feedback' ).text( mw.msg( 'articlefeedbackv5-error-loading-feedback' ) );
244256 }

Comments

#Comment by Nikerabbit (talk | contribs)   09:01, 19 January 2012

Inconsistent whitespace:

+var id = $.articleFeedbackv5special.stripID(container, 'articleFeedbackv5-feedback-tools-');

Status & tagging log