private function checkboxLink( $checkboxType ) {
return Html::element(
// CSS classes: mw-checkbox-all, mw-checkbox-none, mw-checkbox-invert
- 'a', [ 'href' => '#', 'class' => 'mw-checkbox-' . $checkboxType ],
+ 'a', [ 'class' => 'mw-checkbox-' . $checkboxType, 'role' => 'button', 'tabindex' => 0 ],
$this->output->msg( 'checkbox-' . $checkboxType )->text()
);
}
$checkboxes.prop( 'checked', check );
}
- $( '.mw-checkbox-all' ).click( function ( e ) {
- e.preventDefault();
+ $( '.mw-checkbox-all' ).click( function () {
selectAll( true );
} );
- $( '.mw-checkbox-none' ).click( function ( e ) {
- e.preventDefault();
+ $( '.mw-checkbox-none' ).click( function () {
selectAll( false );
} );
- $( '.mw-checkbox-invert' ).click( function ( e ) {
- e.preventDefault();
+ $( '.mw-checkbox-invert' ).click( function () {
$checkboxes.prop( 'checked', function ( i, val ) {
return !val;
} );