Use class for toggle links on Special:Log
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 6 Feb 2016 21:01:08 +0000 (22:01 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Sat, 6 Feb 2016 21:01:08 +0000 (22:01 +0100)
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
resources/src/mediawiki/mediawiki.checkboxtoggle.js

index 28ff1c7..a164c1e 100644 (file)
@@ -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()
                );
 
index 4be4a8d..a2386b3 100644 (file)
                $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' ) );
                } );