User "Krinkle" posted a comment on MediaWiki.r86056.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/86056#c16066
Commit summary:

Followup to r86047: Rewrite the radio-button updater & move everything to 
action.history. Also move to fixCompare version by Helder, since HTMLdiff is 
scrapped

Comment:

Nice work. Rewrite from legacy to mw-lib for the history looks pretty good 
here! 

<pre>
+                       var $this = $(this);
+               var diffLi = false, // the li where the diff radio is checked
+                       oldLi = false; // the li where the oldid radio is 
checked

+                               oldLi = $this;
+                               diffLi = $this;

+                               if ( diffLi && oldLi ) {
+                               } else if ( diffLi ) {
</pre>

jQuery objects don't return boolean false when they don't contain elements, use 
<code>.length</code> instead.


<pre>
+ [..] .click( function() { updateDiffRadios(); } );
</pre>
No need to create an anonymous function, you can pass the function directly by 
reference.




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

Reply via email to