Paladox has submitted this change and it was merged.

Change subject: Recurse into sub folders for jshint and jscs
......................................................................


Recurse into sub folders for jshint and jscs

Change-Id: Ib5dfd9601ca7fa8e20d74c2acddfb5fc2739e0de
---
M .gitignore
M .jshintignore
M Gruntfile.js
M modules/ext.collapsiblevector.collapsibleNav.js
4 files changed, 25 insertions(+), 23 deletions(-)

Approvals:
  Paladox: Looks good to me, approved



diff --git a/.gitignore b/.gitignore
index b42cb43..a868d94 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,5 @@
 *.kate-swp
 .*.swp
 .DS_Store
-
+node_modules/
+vendor/
diff --git a/.jshintignore b/.jshintignore
index 3c3629e..82eaa05 100644
--- a/.jshintignore
+++ b/.jshintignore
@@ -1 +1,2 @@
-node_modules
+node_modules/**
+vendor/**
diff --git a/Gruntfile.js b/Gruntfile.js
index 0cadbeb..10ff6cd 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -12,7 +12,7 @@
                                jshintrc: true
                        },
                        all: [
-                               '*.js'
+                               '.'
                        ]
                },
                jscs: {
diff --git a/modules/ext.collapsiblevector.collapsibleNav.js 
b/modules/ext.collapsiblevector.collapsibleNav.js
index 0d5c0cc..3b1d505 100644
--- a/modules/ext.collapsiblevector.collapsibleNav.js
+++ b/modules/ext.collapsiblevector.collapsibleNav.js
@@ -12,7 +12,7 @@
                $.cookie(
                        'vector-nav-' + $element.parent().attr( 'id' ),
                        isCollapsed,
-                       { 'expires': 30, 'path': '/' }
+                       { expires: 30, path: '/' }
                );
 
                $element
@@ -37,20 +37,20 @@
                // Left-to-right languages
                ltr: {
                        // Collapsible Nav is broken in Opera < 9.6 and 
Konqueror < 4
-                       opera: [['>=', 9.6]],
-                       konqueror: [['>=', 4.0]],
+                       opera: [ [ '>=', 9.6 ] ],
+                       konqueror: [ [ '>=', 4.0 ] ],
                        blackberry: false,
-                       ipod: [['>=', 6]],
-                       iphone: [['>=', 6]],
+                       ipod: [ [ '>=', 6 ] ],
+                       iphone: [ [ '>=', 6 ] ],
                        ps3: false
                },
                // Right-to-left languages
                rtl: {
-                       opera: [['>=', 9.6]],
-                       konqueror: [['>=', 4.0]],
+                       opera: [ [ '>=', 9.6 ] ],
+                       konqueror: [ [ '>=', 4.0 ] ],
                        blackberry: false,
-                       ipod: [['>=', 6]],
-                       iphone: [['>=', 6]],
+                       ipod: [ [ '>=', 6 ] ],
+                       iphone: [ [ '>=', 6 ] ],
                        ps3: false
                }
        };
@@ -70,9 +70,9 @@
                // Use cookie data to restore preferences of what to show and 
hide
                $( '#mw-panel > .portal:not(.persistent)' )
                        .each( function ( i ) {
-                               var id = $(this).attr( 'id' ),
+                               var id = $( this ).attr( 'id' ),
                                        state = $.cookie( 'vector-nav-' + id );
-                               $(this).find( 'ul:first' ).attr( 'id', id + 
'-list' );
+                               $( this ).find( 'ul:first' ).attr( 'id', id + 
'-list' );
                                // Add anchor tag to heading for better 
accessibility
                                $( this ).find( 'h3' ).wrapInner(
                                        $( '<a>' )
@@ -90,22 +90,22 @@
                                        ( state === null && i < 1 ) ||
                                        ( state === null && id === 'p-lang' )
                                ) {
-                                       $(this)
+                                       $( this )
                                                .addClass( 'expanded' )
                                                .removeClass( 'collapsed' )
                                                .find( '.body' )
                                                .hide() // bug 34450
                                                .show();
-                                       $(this).find( 'h3 > a' )
+                                       $( this ).find( 'h3 > a' )
                                                .attr( {
                                                        'aria-pressed': 'true',
                                                        'aria-expanded': 'true'
                                                } );
                                } else {
-                                       $(this)
+                                       $( this )
                                                .addClass( 'collapsed' )
                                                .removeClass( 'expanded' );
-                                       $(this).find( 'h3 > a' )
+                                       $( this ).find( 'h3 > a' )
                                                .attr( {
                                                        'aria-pressed': 'false',
                                                        'aria-expanded': 'false'
@@ -113,7 +113,7 @@
                                }
                                // Re-save cookie
                                if ( state !== null ) {
-                                       $.cookie( 'vector-nav-' + $(this).attr( 
'id' ), state, { 'expires': 30, 'path': '/' } );
+                                       $.cookie( 'vector-nav-' + $( this 
).attr( 'id' ), state, { expires: 30, path: '/' } );
                                }
                        } );
 
@@ -129,16 +129,16 @@
                        .delegate( '.portal:not(.persistent) > h3', 'keydown', 
function ( e ) {
                                // Make the space and enter keys act as a click
                                if ( e.which === 13 /* Enter */ || e.which === 
32 /* Space */ ) {
-                                       toggle( $(this) );
+                                       toggle( $( this ) );
                                }
                        } )
                        .delegate( '.portal:not(.persistent) > h3', 
'mousedown', function ( e ) {
                                if ( e.which !== 3 ) { // Right mouse click
-                                       toggle( $(this) );
-                                       $(this).blur();
+                                       toggle( $( this ) );
+                                       $( this ).blur();
                                }
                                return false;
                        } );
-       });
+       } );
 
 }( mediaWiki, jQuery ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/249747
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib5dfd9601ca7fa8e20d74c2acddfb5fc2739e0de
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/CollapsibleVector
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to