Last modified: 2013-04-08 11:01:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31443, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29443 - [[Special:Undelete]] should use JavaScript to invert all checkboxes without reloading the page
[[Special:Undelete]] should use JavaScript to invert all checkboxes without r...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.20.x
All All
: Low enhancement (vote)
: 1.19.0 release
Assigned To: Matěj Grabovský
: easy, patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-17 00:23 UTC by Helder
Modified: 2013-04-08 11:01 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Proposed patch (1.93 KB, patch)
2011-06-18 00:30 UTC, Helder
Details

Description Helder 2011-06-17 00:23:18 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]]
Comment 1 Helder 2011-06-17 00:24:32 UTC
(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]].
Comment 2 Helder 2011-06-17 00:27:12 UTC
(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]].
Comment 3 Brion Vibber 2011-06-17 20:37:40 UTC
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()
Comment 4 Helder 2011-06-18 00:30:53 UTC
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.
Comment 5 Matěj Grabovský 2011-06-18 19:57:43 UTC
Commited in r90359.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links