Last modified: 2013-04-08 11:01:48 UTC
Currently, if an admin goes to [[Special:Undelete]] to undelete various revisions of certain page, he may want to invert the selection of all checkboxes. If he clicks in the [ Invert selection ] button, the page will be reloaded in order to invert the selection. On [[Special:Search]], there are two buttons ([ All ] / [ None ]) which uses JavaScript to set the state of the checkboxes, so that the page doesn't needs to be reloaded. Both buttons calls the function mwToggleSearchCheckboxes() which is defined at http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/skins/common/search.js?annotate=77922#l24 I think the same idea should be applied on [[Special:Undelete]]. Indeed, right now, there is a gadget on Wikibooks which does exactly that: * [[MediaWiki:Gadget-purgetab.js]]
(In reply to comment #0) > Indeed, right now, there is a gadget on Wikibooks which does exactly that: > * [[MediaWiki:Gadget-purgetab.js]] Copy paste fail... I mean [[MediaWiki:Gadget-EnhancedUndelete.js]].
(In reply to comment #1) > (In reply to comment #0) > > Indeed, right now, there is a gadget on Wikibooks which does exactly that: > > * [[MediaWiki:Gadget-purgetab.js]] > > Copy paste fail... > I mean [[MediaWiki:Gadget-EnhancedUndelete.js]]. Err... [[b:MediaWiki:Gadget-EnhancedUndelete.js]].
This should indeed be pretty straightforward to add: * add resources/mediawiki.special/mediawiki.special.undelete.js with a little JS bits (take over the button's click handler and iterate over the checkboxes, swapping their state) * add an entry in Resources.php for it * load it with $wgOut->addModules('mediawiki.special.undelete') in SpecialUndelete::showHistory()
Created attachment 8672 [details] Proposed patch (In reply to comment #3) > This should indeed be pretty straightforward to add: > > * add resources/mediawiki.special/mediawiki.special.undelete.js with a little > JS bits (take over the button's click handler and iterate over the checkboxes, > swapping their state) > * add an entry in Resources.php for it > * load it with $wgOut->addModules('mediawiki.special.undelete') in > SpecialUndelete::showHistory() Thank you Brion for these valuable tips! The attached patch seems to solve the bug.
Commited in r90359.