]> source.dussan.org Git - jquery-ui.git/commitdiff
Remove trailing whitespace.
authorScott González <scott.gonzalez@gmail.com>
Thu, 19 Apr 2012 01:57:51 +0000 (21:57 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 19 Apr 2012 01:57:51 +0000 (21:57 -0400)
grunt.js
ui/jquery.effects.bounce.js
ui/jquery.effects.drop.js
ui/jquery.effects.fade.js
ui/jquery.effects.scale.js
ui/jquery.effects.slide.js
ui/jquery.ui.dialog.js

index eddf89b1a972861c2c3a06e3fbebc56ac0365e2b..02c889d7491f14c2f21701318be7269c1fe71e1a 100644 (file)
--- a/grunt.js
+++ b/grunt.js
@@ -306,8 +306,7 @@ grunt.initConfig({
                        smarttabs: true,
                        // TODO: use "faux strict mode" https://github.com/jshint/jshint/issues/504
                        // strict: true,
-                       // TODO: enable trailing
-                       // trailing: true,
+                       trailing: true,
                        undef: true
                };
 
index 94d73644e6c3dc5fb185cd16caf5880648eaee93..934fb16ef7e3d22463633c7e7a89fb65113456c2 100644 (file)
 (function( $, undefined ) {
 
 $.effects.effect.bounce = function( o, done ) {
-       var el = $( this ), 
+       var el = $( this ),
                props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
 
                // defaults:
                mode = $.effects.setMode( el, o.mode || "effect" ),
                hide = mode === "hide",
                show = mode === "show",
-               direction = o.direction || "up", 
+               direction = o.direction || "up",
                distance = o.distance,
                times = o.times || 5,
 
@@ -31,7 +31,7 @@ $.effects.effect.bounce = function( o, done ) {
 
                // utility:
                ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
-               motion = ( direction === "up" || direction === "left" ), 
+               motion = ( direction === "up" || direction === "left" ),
                i,
                upAnim,
                downAnim,
@@ -40,13 +40,13 @@ $.effects.effect.bounce = function( o, done ) {
                queue = el.queue(),
                queuelen = queue.length;
 
-       // Avoid touching opacity to prevent clearType and PNG issues in IE     
+       // Avoid touching opacity to prevent clearType and PNG issues in IE
        if ( show || hide ) {
                props.push( "opacity" );
-       } 
+       }
 
-       $.effects.save( el, props ); 
-       el.show(); 
+       $.effects.save( el, props );
+       el.show();
        $.effects.createWrapper( el ); // Create Wrapper
 
        // default distance for the BIGGEST bounce is the outer Distance / 3
@@ -90,7 +90,7 @@ $.effects.effect.bounce = function( o, done ) {
 
                el.animate( upAnim, speed, easing );
        }
-       
+
        el.queue(function() {
                if ( hide ) {
                        el.hide();
index 6c72be9e58f0820e6c6cdd3f9fe03b78ed5414be..ea8d242d5ac94da641f0279900366b2428daa33c 100644 (file)
@@ -14,7 +14,7 @@
 
 $.effects.effect.drop = function( o, done ) {
 
-       var el = $( this ), 
+       var el = $( this ),
                props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
                mode = $.effects.setMode( el, o.mode || "hide" ),
                show = mode === "show",
@@ -27,9 +27,9 @@ $.effects.effect.drop = function( o, done ) {
                distance;
 
        // Adjust
-       $.effects.save( el, props ); 
-       el.show(); 
-       $.effects.createWrapper( el ); 
+       $.effects.save( el, props );
+       el.show();
+       $.effects.createWrapper( el );
 
        distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]({ margin: true }) / 2;
 
@@ -40,22 +40,22 @@ $.effects.effect.drop = function( o, done ) {
        }
 
        // Animation
-       animation[ ref ] = ( show ? 
-               ( motion === "pos" ? "+=" : "-=" ) : 
+       animation[ ref ] = ( show ?
+               ( motion === "pos" ? "+=" : "-=" ) :
                ( motion === "pos" ? "-=" : "+=" ) ) +
                distance;
 
        // Animate
-       el.animate( animation, { 
-               queue: false, 
-               duration: o.duration, 
-               easing: o.easing, 
+       el.animate( animation, {
+               queue: false,
+               duration: o.duration,
+               easing: o.easing,
                complete: function() {
                        if ( mode === "hide" ) {
                                el.hide();
                        }
-                       $.effects.restore( el, props ); 
-                       $.effects.removeWrapper( el ); 
+                       $.effects.restore( el, props );
+                       $.effects.removeWrapper( el );
                        done();
                }
        });
index 89784bd081c7a18373cb57844dba247d33da78c2..66029b51c4cf0f025cb1b7f7a7acb9a2c813a700 100644 (file)
@@ -18,7 +18,7 @@ $.effects.effect.fade = function( o, done ) {
                hide = mode === "hide";
 
        el.show();
-       el.animate({ 
+       el.animate({
                opacity: hide ? 0 : 1
        }, {
                queue: false,
index 83b41d3c26e8d3c8c3dd16ee0f6ce0dd39134b76..1eedb44ebc978b877c6765111c889e4c3077a275 100644 (file)
@@ -18,9 +18,9 @@ $.effects.effect.puff = function( o, done ) {
                hide = mode === "hide",
                percent = parseInt( o.percent, 10 ) || 150,
                factor = percent / 100,
-               original = { 
-                       height: elem.height(), 
-                       width: elem.width() 
+               original = {
+                       height: elem.height(),
+                       width: elem.width()
                };
 
        $.extend( o, {
@@ -51,8 +51,8 @@ $.effects.effect.scale = function( o, done ) {
                        ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ),
                direction = o.direction || "both",
                origin = o.origin,
-               original = { 
-                       height: el.height(), 
+               original = {
+                       height: el.height(),
                        width: el.width(),
                        outerHeight: el.outerHeight(),
                        outerWidth: el.outerWidth()
@@ -60,7 +60,7 @@ $.effects.effect.scale = function( o, done ) {
                factor = {
                        y: direction !== "horizontal" ? (percent / 100) : 1,
                        x: direction !== "vertical" ? (percent / 100) : 1
-               }; 
+               };
 
        // We are going to pass this effect to the size effect:
        options.effect = "size";
@@ -68,27 +68,27 @@ $.effects.effect.scale = function( o, done ) {
        options.complete = done;
 
        // Set default origin and restore for show/hide
-       if ( mode !== "effect" ) { 
+       if ( mode !== "effect" ) {
                options.origin = origin || ["middle","center"];
                options.restore = true;
        }
 
-       options.from = o.from || ( mode === "show" ? { height: 0, width: 0 } : original ); 
+       options.from = o.from || ( mode === "show" ? { height: 0, width: 0 } : original );
        options.to = {
-               height: original.height * factor.y, 
+               height: original.height * factor.y,
                width: original.width * factor.x,
-               outerHeight: original.outerHeight * factor.y, 
+               outerHeight: original.outerHeight * factor.y,
                outerWidth: original.outerWidth * factor.x
-       }; 
+       };
 
        // Fade option to support puff
        if ( options.fade ) {
                if ( mode === "show" ) {
-                       options.from.opacity = 0; 
+                       options.from.opacity = 0;
                        options.to.opacity = 1;
                }
                if ( mode === "hide" ) {
-                       options.from.opacity = 1; 
+                       options.from.opacity = 1;
                        options.to.opacity = 0;
                }
        }
@@ -101,7 +101,7 @@ $.effects.effect.scale = function( o, done ) {
 $.effects.effect.size = function( o, done ) {
 
        // Create element
-       var el = $( this ), 
+       var el = $( this ),
                props = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
 
                // Always restore
@@ -125,7 +125,7 @@ $.effects.effect.size = function( o, done ) {
                el.show();
        }
        original = {
-               height: el.height(), 
+               height: el.height(),
                width: el.width(),
                outerHeight: el.outerHeight(),
                outerWidth: el.outerWidth()
@@ -137,11 +137,11 @@ $.effects.effect.size = function( o, done ) {
        // Set scaling factor
        factor = {
                from: {
-                       y: el.from.height / original.height, 
+                       y: el.from.height / original.height,
                        x: el.from.width / original.width
                },
                to: {
-                       y: el.to.height / original.height, 
+                       y: el.to.height / original.height,
                        x: el.to.width / original.width
                }
        };
@@ -150,14 +150,14 @@ $.effects.effect.size = function( o, done ) {
        if ( scale === "box" || scale === "both" ) {
 
                // Vertical props scaling
-               if ( factor.from.y !== factor.to.y ) { 
+               if ( factor.from.y !== factor.to.y ) {
                        props = props.concat( vProps );
                        el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
                        el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
                }
 
                // Horizontal props scaling
-               if ( factor.from.x !== factor.to.x ) { 
+               if ( factor.from.x !== factor.to.x ) {
                        props = props.concat( hProps );
                        el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
                        el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
@@ -165,20 +165,20 @@ $.effects.effect.size = function( o, done ) {
        }
 
        // Scale the content
-       if ( scale === "content" || scale === "both" ) { 
+       if ( scale === "content" || scale === "both" ) {
 
                // Vertical props scaling
-               if ( factor.from.y !== factor.to.y ) { 
+               if ( factor.from.y !== factor.to.y ) {
                        props = props.concat( cProps );
                        el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
                        el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
                }
        }
 
-       $.effects.save( el, restore ? props : props1 ); 
-       el.show(); 
+       $.effects.save( el, restore ? props : props1 );
+       el.show();
        $.effects.createWrapper( el );
-       el.css( "overflow", "hidden" ).css( el.from ); 
+       el.css( "overflow", "hidden" ).css( el.from );
 
        // Adjust
        if (origin) { // Calculate baseline shifts
@@ -200,8 +200,8 @@ $.effects.effect.size = function( o, done ) {
 
                el.find( "*[width]" ).each( function(){
                        var child = $( this ),
-                               c_original = { 
-                                       height: child.height(), 
+                               c_original = {
+                                       height: child.height(),
                                        width: child.width()
                                };
                        if (restore) {
@@ -209,16 +209,16 @@ $.effects.effect.size = function( o, done ) {
                        }
 
                        child.from = {
-                               height: c_original.height * factor.from.y, 
+                               height: c_original.height * factor.from.y,
                                width: c_original.width * factor.from.x
                        };
                        child.to = {
-                               height: c_original.height * factor.to.y, 
+                               height: c_original.height * factor.to.y,
                                width: c_original.width * factor.to.x
                        };
 
                        // Vertical props scaling
-                       if ( factor.from.y !== factor.to.y ) { 
+                       if ( factor.from.y !== factor.to.y ) {
                                child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
                                child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
                        }
@@ -242,10 +242,10 @@ $.effects.effect.size = function( o, done ) {
        }
 
        // Animate
-       el.animate( el.to, { 
-               queue: false, 
-               duration: o.duration, 
-               easing: o.easing, 
+       el.animate( el.to, {
+               queue: false,
+               duration: o.duration,
+               easing: o.easing,
                complete: function() {
                        if ( el.to.opacity === 0 ) {
                                el.css( "opacity", el.from.opacity );
@@ -277,7 +277,7 @@ $.effects.effect.size = function( o, done ) {
                                                                return toRef + "px";
                                                        }
 
-                                                       return val + toRef + "px"; 
+                                                       return val + toRef + "px";
                                                });
                                        });
                                }
index 77d540a9c166b9038d179c3742e0f099f7a020f0..e57a21264439c691842a779ead9848f5fe1989bd 100644 (file)
@@ -29,32 +29,32 @@ $.effects.effect.slide = function( o, done ) {
        // Adjust
        $.effects.save( el, props );
        el.show();
-       distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]({ 
+       distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]({
                margin: true
        });
-       
+
        $.effects.createWrapper( el ).css({
                overflow: "hidden"
        });
-       
+
        if ( show ) {
                el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance );
        }
 
        // Animation
-       animation[ ref ] = ( show ? 
-               ( positiveMotion ? "+=" : "-=") : 
+       animation[ ref ] = ( show ?
+               ( positiveMotion ? "+=" : "-=") :
                ( positiveMotion ? "-=" : "+=")) +
                distance;
 
        // Animate
-       el.animate( animation, { 
-               queue: false, 
-               duration: o.duration, 
-               easing: o.easing, 
+       el.animate( animation, {
+               queue: false,
+               duration: o.duration,
+               easing: o.easing,
                complete: function() {
                        if ( mode === "hide" ) {
-                               el.hide(); 
+                               el.hide();
                        }
                        $.effects.restore( el, props );
                        $.effects.removeWrapper( el );
index 3a9bd5dc6c44c3656610055ff2e09b8c9060f101..144cf97255e3c8d35332412e1991356c1c5ca8c6 100644 (file)
@@ -77,10 +77,10 @@ $.widget("ui.dialog", {
                // #5742 - .attr() might return a DOMElement
                if ( typeof this.originalTitle !== "string" ) {
                        this.originalTitle = "";
-               }               
-               this.oldPosition = { 
-                       parent: this.element.parent(), 
-                       index: this.element.parent().children().index( this.element ) 
+               }
+               this.oldPosition = {
+                       parent: this.element.parent(),
+                       index: this.element.parent().children().index( this.element )
                };
                this.options.title = this.options.title || this.originalTitle;
                var self = this,
@@ -171,7 +171,7 @@ $.widget("ui.dialog", {
        },
 
        _destroy: function() {
-               var self = this, next, 
+               var self = this, next,
                        oldPosition = this.oldPosition;
 
                if ( self.overlay ) {
@@ -187,13 +187,13 @@ $.widget("ui.dialog", {
                if ( self.originalTitle ) {
                        self.element.attr( "title", self.originalTitle );
                }
-               
+
                next = oldPosition.parent.children().eq( oldPosition.index );
                if ( next.length ) {
                        next.before( self.element );
                } else {
                        oldPosition.parent.append( self.element );
-               }               
+               }
        },
 
        widget: function() {