User "Catrope" posted a comment on MediaWiki.r96944.

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

(bug 20919) Search & Replace: Change "Replace Next" functionality to "Replace" 
functionality. Patch by Amir E. Aharoni.

Submitter's comment: "Replace next" now replaces the currently selected text 
instead of finding the next occurrence and replacing it. To keep the location 
of the current occurrence, i added matchIndex to $(this).data.

I added some comments renamed a couple of variable for readability:
* s to textRemainder
* replace to actualReplacement

This is my first significant jQuery-style patch so it may have embarrassing 
mistakes - constructive criticism is welcome.

Comment:

<pre>
var $replaceButton = $( 'get the replace next button somehow' );
$replaceButton.button( { disabled: true } );
</pre>

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to