From 46c2ae820a6f9ea10fd6a283d1608f4586db89f1 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Sat, 14 Feb 2015 12:44:54 -0800 Subject: [PATCH] test: Make code pass jscs 1.5.0 with Wikimedia code style preset Change-Id: I385f7d9ca9f641b3ad936605af1f9894a57192e5 --- .jscsrc | 3 +++ collapsibleTabs.js | 2 +- vector.js | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 .jscsrc diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 0000000..9d22e3f --- /dev/null +++ b/.jscsrc @@ -0,0 +1,3 @@ +{ + "preset": "wikimedia" +} diff --git a/collapsibleTabs.js b/collapsibleTabs.js index e24bea9..6fd8c49 100644 --- a/collapsibleTabs.js +++ b/collapsibleTabs.js @@ -95,7 +95,7 @@ if ( $( data.collapsedContainer + ' ' + data.collapsible ).length > 0 && data.expandCondition( $.collapsibleTabs.getSettings( $( data.collapsedContainer ).children( data.collapsible + ':first' ) ).expandedWidth ) ) { - //move the element from the dropdown to the tab + // move the element from the dropdown to the tab $el.trigger( 'beforeTabExpand' ); $.collapsibleTabs .moveToExpanded( data.collapsedContainer + ' ' + data.collapsible + ':first' ); diff --git a/vector.js b/vector.js index 7be3535..dafe94f 100644 --- a/vector.js +++ b/vector.js @@ -54,16 +54,16 @@ jQuery( function ( $ ) { $cactions .removeClass( 'emptyPortlet' ) .find( 'h3' ) - .css( 'width', '1px' ).animate( { 'width': originalDropdownWidth }, 'normal' ); + .css( 'width', '1px' ).animate( { width: originalDropdownWidth }, 'normal' ); } } ) .bind( 'beforeTabExpand', function () { // If we're removing the last child node right now, hide the dropdown if ( $cactions.find( 'li' ).length === 1 ) { - $cactions.find( 'h3' ).animate( { 'width': '1px' }, 'normal', function () { + $cactions.find( 'h3' ).animate( { width: '1px' }, 'normal', function () { $( this ).attr( 'style', '' ) .parent().addClass( 'emptyPortlet' ); - }); + } ); } } ) .collapsibleTabs( {