Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3228530
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
lfaraone
Jan 14 2016, 7:51 PM
2016-01-14 19:51:39 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
/*!
* Toggler for a list of checkboxes.
*
* @licence GNU GPL v2 or later
* @author Luke Faraone <luke at faraone dot cc>
* Based on `ext.nuke.js from https://www.mediawiki.org/wiki/Extension:Nuke by Jeroen De Dauw <jeroendedauw at gmail dot com>
*/
( function ( mw, $ ) {
'use strict';
var $checkboxes = $( 'li input[type=checkbox]' );
var $toggleOptions = mw.message('log-checkbox-select', [
$( '<a>' )
.text( mw.msg( 'log-checkbox-all' ) )
.click( function (e) {
selectAll( true );
e.preventDefault();
} ),
mw.msg( "comma-separator" ),
$( '<a>' )
.text( mw.msg( 'log-checkbox-none' ) )
.click( function (e) {
selectAll( false );
e.preventDefault();
} ),
mw.msg( "comma-separator" ),
$( '<a>' )
.text( mw.msg( 'log-checkbox-invert' ) )
.click( function (e) {
$checkboxes.each( function () {
$( this ).prop( 'checked', !$( this ).is( ':checked' ) );
} );
e.preventDefault();
} )
]).parseDom()
$ ( '.toggle-option-placeholder' ).append(
$( '<p>' ).append($toggleOptions)
);
function selectAll( check ) {
$checkboxes.prop( 'checked', check );
}
}( mediaWiki, jQuery ) );
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3236472
Default Alt Text
(1 KB)
Attached To
Mode
P2475 (An Untitled Masterwork)
Attached
Detach File
Event Timeline
Log In to Comment