Last modified: 2008-10-04 18:10:35 UTC
Special:Undelete should have "select all" checkbox or "inverse selection" button (or both), because sometimes is necessary to undelete many revisions except for some, therefore is very annoying to click on every single checkbox.
Using the first or second solution would make it much more comfortable.
*** This bug has been marked as a duplicate of bug 10056 ***
This is not a dupe of bug 10056, it takes different approach.
However, regarding to the bug 10056, the "select all" checkbox can be omitted in favour of "inverse selection" which will do the same job.
Also the script can not let the user submit the form, if all items checked.
This should not be done until bug 10056 comment 3 has been addressed, so that we don't have to add irritating and confusing restrictions on when the user can submit the form; the handler should be altered such that the user can cause no accidental increase in complexity by operating the user interface in an apparently intuitive manner.
Actually, the script can check befor submit if all items checked and if yes then uncheck them all, which would solve it.
That doesn't seem like a particularly clever solution either, to be honest, because it will look extremely strange to most users who don't know what's going on, or why.
I could have sworn there were already "select all" and "clear" buttons, I guess I was thinking of a different form. :)
Nothing additional is required, just add standard JS-friendly buttons. (If sufficiently adventurous, the 'check all' could be done in a non-JS-requiring way as well, where submitting with it will cause the resubmit to check the buttons instead of performing an action, while JS can still do the checks without submission. But, eh, details.)
Danny B: the script is already there, hold Shift while clicking the checkbox on the other end. Of course, the problem is that very few people know about this feature. (Well, at least I managed to insert the info into http://en.wikipedia.org/wiki/MediaWiki:Watcheditlist/Check_all )
Created attachment 4363 [details]
Preliminary patch to add the "invert selection" feature
I created a patch which adds "invert selection" feature. I added a new message for the link, and added the relevant lines of code to Wikibits.js to make sure it is available in all skins.
This is a preliminary patch, and your comments are needed to improve it, in terms of a better look in user interface, etc.
Created attachment 4373 [details]
"Invert selection" button acting on the server-side
Hopefully, it can be applied after being reviewed by a more experienced developer.
In order to put less load on the servers, a possible solution will be to mix the patches I provided above, so if JS is enabled, the client-side script is run, and if JS is disabled, the server-side code is run. What do you think about this?
These features -- select all, select inverse, clear -- are badly needed in Special:Undelete for merging page histories. In these situations one always have to restore virtually all deleted versions.
I committed the server-side version of the "Invert selection" button with r41659. If a client-side solution is also desirable, it can be added separately. A "select all" button is not needed; if it is intended to restore all revesions, then all checkboxes can be left unchecked; if the intent is to use "select all" and then uncheck a few items, this can be done now by selecting those items first and then inverting the selection.
I had to revert r41659 and re-commit the changes in r41661 due to accidental breakage.