From 79414f83c289ee2064a54467eb4605b426c6f659 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 6 Feb 2016 22:01:08 +0100 Subject: [PATCH] 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 --- includes/specials/SpecialLog.php | 6 +++--- resources/src/mediawiki/mediawiki.checkboxtoggle.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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' ) ); } ); -- 2.20.1