From: umherirrender Date: Sat, 6 Feb 2016 21:01:08 +0000 (+0100) Subject: Use class for toggle links on Special:Log X-Git-Tag: 1.31.0-rc.0~8060^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=79414f83c289ee2064a54467eb4605b426c6f659;p=lhc%2Fweb%2Fwiklou.git Use class for toggle links on Special:Log The toogle links All, None, Invert on Special:Log are shown at top and at bottom, but using the same id, which make the page invalid and the second link not working. Change to class. Follow up: I92141a7079fc7fcd7152ef418d82f4f7969b163b Change-Id: I1107b320efe5d3b63ea091ea986e35158d24c098 --- diff --git a/includes/specials/SpecialLog.php b/includes/specials/SpecialLog.php index 28ff1c77fa..a164c1e0d2 100644 --- a/includes/specials/SpecialLog.php +++ b/includes/specials/SpecialLog.php @@ -262,15 +262,15 @@ class SpecialLog extends SpecialPage { // Select: All, None, Invert $links = array(); $links[] = Html::element( - 'a', array( 'href' => '#', 'id' => 'checkbox-all' ), + 'a', array( 'href' => '#', 'class' => 'mw-checkbox-all' ), $this->msg( 'checkbox-all' )->text() ); $links[] = Html::element( - 'a', array( 'href' => '#', 'id' => 'checkbox-none' ), + 'a', array( 'href' => '#', 'class' => 'mw-checkbox-none' ), $this->msg( 'checkbox-none' )->text() ); $links[] = Html::element( - 'a', array( 'href' => '#', 'id' => 'checkbox-invert' ), + 'a', array( 'href' => '#', 'class' => 'mw-checkbox-invert' ), $this->msg( 'checkbox-invert' )->text() ); diff --git a/resources/src/mediawiki/mediawiki.checkboxtoggle.js b/resources/src/mediawiki/mediawiki.checkboxtoggle.js index 4be4a8da0d..a2386b353f 100644 --- a/resources/src/mediawiki/mediawiki.checkboxtoggle.js +++ b/resources/src/mediawiki/mediawiki.checkboxtoggle.js @@ -18,15 +18,15 @@ $checkboxes.prop( 'checked', check ); } - $( '#checkbox-all' ).click( function ( e ) { + $( '.mw-checkbox-all' ).click( function ( e ) { selectAll( true ); e.preventDefault(); } ); - $( '#checkbox-none' ).click( function ( e ) { + $( '.mw-checkbox-none' ).click( function ( e ) { selectAll( false ); e.preventDefault(); } ); - $( '#checkbox-invert' ).click( function ( e ) { + $( '.mw-checkbox-invert' ).click( function ( e ) { $checkboxes.each( function () { $( this ).prop( 'checked', !$( this ).is( ':checked' ) ); } );