"Krinkle" posted a comment on MediaWiki.r105455.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/105455#c27147

Commit summary for MediaWiki.r105455:

work on ui

Krinkle's comment:

<pre>
+(function( $, mw ) {
+
+       var _this = this;
+       
+       $( document ).ready( function() {
+
+               $( '.review-rating-display' ).reviewRating();
+               $( '.reviews-state-controls' ).reviewState();
+       
+       } );
+       
+})( window.jQuery, window.mediaWiki );
</pre>

No need to alias window.mediaWiki to <code>mw</code> as it's a global alias. 
Also, <code>this</code> in that context is not referring to anything you 
probably need there (either <code>window</code> or some local instantiation by 
ResourceLoader around this module). See also 
[[Manual:Coding_conventions#JavaScript_code]].
Perhaps something like this ?
<pre>
jQuery( document ).ready( function( $ ) {

        $( '.review-rating-display' ).reviewRating();
        $( '.reviews-state-controls' ).reviewState();

} );
</pre>

_______________________________________________
MediaWiki-CodeReview mailing list
mediawiki-coderev...@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to