Chris Leonello avatar Chris Leonello committed cf5ec76

Whitespace and clean up for proper build.

Comments (0)

Files changed (5)

         <replaceregexp match=".*?\(function\(\$\) \{" replace="" flags="s">
           <fileset dir="${BUILD_DIR}">
             <include name="jqplot.*.js" />
+            <include name="jqplot.effects.*.js" />
             <include name="jsdate.js" />
             <exclude name="jqplot.core.js" />
           </fileset>
         <replaceregexp match="\}\)\(jQuery\)\;(?!.*\}\)\(jQuery\)\;)" replace="">
           <fileset dir="${BUILD_DIR}">
             <include name="jqplot.*.js" />
+            <include name="jqplot.effects.*.js" />
             <include name="jsdate.js" />
             <exclude name="jqplot.sprintf.js" />
           </fileset>
               <include name="jsdate.js" />
               <exclude name="jqplot.core.js" />
               <exclude name="jqplot.sprintf.js" />
+              <exclude name="jqplot.effects.core.js" />
+              <exclude name="jqplot.effects.blind.js" />
             </fileset>
             <fileset dir="${BUILD_DIR}" includes="jqplot.sprintf.js" />
+            <fileset dir="${BUILD_DIR}" includes="jqplot.effects.core.js" />
+            <fileset dir="${BUILD_DIR}" includes="jqplot.effects.blind.js" />
         </concat>
         
     </target>

src/jqplot.core.js

     
     $.jqplot.EventListenerManager.prototype.addOnce = function(ev, fn) {
         var havehook = false, h, i;
-        for (i=0, l=this.hooks.length; i<l; i++) {
+        for (var i=0, l=this.hooks.length; i<l; i++) {
             h = this.hooks[i];
             if (h[0] == ev && h[1] == fn) {
                 havehook = true;

src/jqplot.effects.blind.js

  * http://docs.jquery.com/UI/Effects/Blind
  *
  * Depends:
- *	jquery.effects.core.js
+ *  jquery.effects.core.js
  */
 
  //////
  // jquery ui blind effect used for series animation in jqplot.
  //////
-(function( $ ) {
+(function($) {
 
-var rvertical = /up|down|vertical/,
-	rpositivemotion = /up|left|vertical|horizontal/;
+    var rvertical = /up|down|vertical/,
+        rpositivemotion = /up|left|vertical|horizontal/;
 
-$.jqplot.effects.effect.blind = function( o, done ) {
-	// Create element
-	var el = $( this ),
-		props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
-		mode = $.jqplot.effects.setMode( el, o.mode || "hide" ),
-		direction = o.direction || "up",
-		vertical = rvertical.test( direction ),
-		ref = vertical ? "height" : "width",
-		ref2 = vertical ? "top" : "left",
-		motion = rpositivemotion.test( direction ),
-		animation = {},
-		show = mode === "show",
-		wrapper, distance, top;
+    $.jqplot.effects.effect.blind = function( o, done ) {
+        // Create element
+        var el = $( this ),
+            props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
+            mode = $.jqplot.effects.setMode( el, o.mode || "hide" ),
+            direction = o.direction || "up",
+            vertical = rvertical.test( direction ),
+            ref = vertical ? "height" : "width",
+            ref2 = vertical ? "top" : "left",
+            motion = rpositivemotion.test( direction ),
+            animation = {},
+            show = mode === "show",
+            wrapper, distance, top;
 
-	// if already wrapped, the wrapper's properties are my property. #6245
-	if ( el.parent().is( ".ui-effects-wrapper" ) ) {
-		$.jqplot.effects.save( el.parent(), props );
-	} else {
-		$.jqplot.effects.save( el, props );
-	}
-	el.show();
-	top = parseInt(el.css('top'), 10);
-	wrapper = $.jqplot.effects.createWrapper( el ).css({
-		overflow: "hidden"
-	});
+        // if already wrapped, the wrapper's properties are my property. #6245
+        if ( el.parent().is( ".ui-effects-wrapper" ) ) {
+            $.jqplot.effects.save( el.parent(), props );
+        } else {
+            $.jqplot.effects.save( el, props );
+        }
+        el.show();
+        top = parseInt(el.css('top'), 10);
+        wrapper = $.jqplot.effects.createWrapper( el ).css({
+            overflow: "hidden"
+        });
 
-	distance = vertical ? wrapper[ ref ]() + top : wrapper[ ref ]();
+        distance = vertical ? wrapper[ ref ]() + top : wrapper[ ref ]();
 
-	animation[ ref ] = show ? distance : 0;
-	if ( !motion ) {
-		el
-			.css( vertical ? "bottom" : "right", 0 )
-			.css( vertical ? "top" : "left", "" )
-			.css({ position: "absolute" });
-		animation[ ref2 ] = show ? 0 : distance;
-	}
+        animation[ ref ] = show ? distance : 0;
+        if ( !motion ) {
+            el
+                .css( vertical ? "bottom" : "right", 0 )
+                .css( vertical ? "top" : "left", "" )
+                .css({ position: "absolute" });
+            animation[ ref2 ] = show ? 0 : distance;
+        }
 
-	// start at 0 if we are showing
-	if ( show ) {
-		wrapper.css( ref, 0 );
-		if ( ! motion ) {
-			wrapper.css( ref2, distance );
-		}
-	}
+        // start at 0 if we are showing
+        if ( show ) {
+            wrapper.css( ref, 0 );
+            if ( ! motion ) {
+                wrapper.css( ref2, distance );
+            }
+        }
 
-	// Animate
-	wrapper.animate( animation, {
-		duration: o.duration,
-		easing: o.easing,
-		queue: false,
-		complete: function() {
-			if ( mode === "hide" ) {
-				el.hide();
-			}
-			$.jqplot.effects.restore( el, props );
-			$.jqplot.effects.removeWrapper( el );
-			done();
-		}
-	});
+        // Animate
+        wrapper.animate( animation, {
+            duration: o.duration,
+            easing: o.easing,
+            queue: false,
+            complete: function() {
+                if ( mode === "hide" ) {
+                    el.hide();
+                }
+                $.jqplot.effects.restore( el, props );
+                $.jqplot.effects.removeWrapper( el );
+                done();
+            }
+        });
 
-};
+    };
 
 })(jQuery);

src/jqplot.effects.core.js

  //////
 (function($) {
 
-	var backCompat = $.uiBackCompat !== false;
+    var backCompat = $.uiBackCompat !== false;
 
-	$.jqplot.effects = {
-		effect: {}
-	};
+    $.jqplot.effects = {
+        effect: {}
+    };
 
-	// prefix used for storing data on .data()
-	var dataSpace = "jqplot.storage.";
+    // prefix used for storing data on .data()
+    var dataSpace = "jqplot.storage.";
 
-	/******************************************************************************/
-	/*********************************** EFFECTS **********************************/
-	/******************************************************************************/
+    /******************************************************************************/
+    /*********************************** EFFECTS **********************************/
+    /******************************************************************************/
 
-	$.extend( $.jqplot.effects, {
-		version: "1.9pre",
+    $.extend( $.jqplot.effects, {
+        version: "1.9pre",
 
-		// Saves a set of properties in a data storage
-		save: function( element, set ) {
-			for( var i=0; i < set.length; i++ ) {
-				if ( set[ i ] !== null ) {
-					element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
-				}
-			}
-		},
+        // Saves a set of properties in a data storage
+        save: function( element, set ) {
+            for( var i=0; i < set.length; i++ ) {
+                if ( set[ i ] !== null ) {
+                    element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
+                }
+            }
+        },
 
-		// Restores a set of previously saved properties from a data storage
-		restore: function( element, set ) {
-			for( var i=0; i < set.length; i++ ) {
-				if ( set[ i ] !== null ) {
-					element.css( set[ i ], element.data( dataSpace + set[ i ] ) );
-				}
-			}
-		},
+        // Restores a set of previously saved properties from a data storage
+        restore: function( element, set ) {
+            for( var i=0; i < set.length; i++ ) {
+                if ( set[ i ] !== null ) {
+                    element.css( set[ i ], element.data( dataSpace + set[ i ] ) );
+                }
+            }
+        },
 
-		setMode: function( el, mode ) {
-			if (mode === "toggle") {
-				mode = el.is( ":hidden" ) ? "show" : "hide";
-			}
-			return mode;
-		},
+        setMode: function( el, mode ) {
+            if (mode === "toggle") {
+                mode = el.is( ":hidden" ) ? "show" : "hide";
+            }
+            return mode;
+        },
 
-		// Wraps the element around a wrapper that copies position properties
-		createWrapper: function( element ) {
+        // Wraps the element around a wrapper that copies position properties
+        createWrapper: function( element ) {
 
-			// if the element is already wrapped, return it
-			if ( element.parent().is( ".ui-effects-wrapper" )) {
-				return element.parent();
-			}
+            // if the element is already wrapped, return it
+            if ( element.parent().is( ".ui-effects-wrapper" )) {
+                return element.parent();
+            }
 
-			// wrap the element
-			var props = {
-					width: element.outerWidth(true),
-					height: element.outerHeight(true),
-					"float": element.css( "float" )
-				},
-				wrapper = $( "<div></div>" )
-					.addClass( "ui-effects-wrapper" )
-					.css({
-						fontSize: "100%",
-						background: "transparent",
-						border: "none",
-						margin: 0,
-						padding: 0
-					}),
-				// Store the size in case width/height are defined in % - Fixes #5245
-				size = {
-					width: element.width(),
-					height: element.height()
-				},
-				active = document.activeElement;
+            // wrap the element
+            var props = {
+                    width: element.outerWidth(true),
+                    height: element.outerHeight(true),
+                    "float": element.css( "float" )
+                },
+                wrapper = $( "<div></div>" )
+                    .addClass( "ui-effects-wrapper" )
+                    .css({
+                        fontSize: "100%",
+                        background: "transparent",
+                        border: "none",
+                        margin: 0,
+                        padding: 0
+                    }),
+                // Store the size in case width/height are defined in % - Fixes #5245
+                size = {
+                    width: element.width(),
+                    height: element.height()
+                },
+                active = document.activeElement;
 
-			element.wrap( wrapper );
+            element.wrap( wrapper );
 
-			// Fixes #7595 - Elements lose focus when wrapped.
-			if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
-				$( active ).focus();
-			}
+            // Fixes #7595 - Elements lose focus when wrapped.
+            if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
+                $( active ).focus();
+            }
 
-			wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually loose the reference to the wrapped element
+            wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually loose the reference to the wrapped element
 
-			// transfer positioning properties to the wrapper
-			if ( element.css( "position" ) === "static" ) {
-				wrapper.css({ position: "relative" });
-				element.css({ position: "relative" });
-			} else {
-				$.extend( props, {
-					position: element.css( "position" ),
-					zIndex: element.css( "z-index" )
-				});
-				$.each([ "top", "left", "bottom", "right" ], function(i, pos) {
-					props[ pos ] = element.css( pos );
-					if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
-						props[ pos ] = "auto";
-					}
-				});
-				element.css({
-					position: "relative",
-					top: 0,
-					left: 0,
-					right: "auto",
-					bottom: "auto"
-				});
-			}
-			element.css(size);
+            // transfer positioning properties to the wrapper
+            if ( element.css( "position" ) === "static" ) {
+                wrapper.css({ position: "relative" });
+                element.css({ position: "relative" });
+            } else {
+                $.extend( props, {
+                    position: element.css( "position" ),
+                    zIndex: element.css( "z-index" )
+                });
+                $.each([ "top", "left", "bottom", "right" ], function(i, pos) {
+                    props[ pos ] = element.css( pos );
+                    if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
+                        props[ pos ] = "auto";
+                    }
+                });
+                element.css({
+                    position: "relative",
+                    top: 0,
+                    left: 0,
+                    right: "auto",
+                    bottom: "auto"
+                });
+            }
+            element.css(size);
 
-			return wrapper.css( props ).show();
-		},
+            return wrapper.css( props ).show();
+        },
 
-		removeWrapper: function( element ) {
-			var active = document.activeElement;
+        removeWrapper: function( element ) {
+            var active = document.activeElement;
 
-			if ( element.parent().is( ".ui-effects-wrapper" ) ) {
-				element.parent().replaceWith( element );
+            if ( element.parent().is( ".ui-effects-wrapper" ) ) {
+                element.parent().replaceWith( element );
 
-				// Fixes #7595 - Elements lose focus when wrapped.
-				if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
-					$( active ).focus();
-				}
-			}
+                // Fixes #7595 - Elements lose focus when wrapped.
+                if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
+                    $( active ).focus();
+                }
+            }
 
 
-			return element;
-		}
-	});
+            return element;
+        }
+    });
 
-	// return an effect options object for the given parameters:
-	function _normalizeArguments( effect, options, speed, callback ) {
+    // return an effect options object for the given parameters:
+    function _normalizeArguments( effect, options, speed, callback ) {
 
-		// short path for passing an effect options object:
-		if ( $.isPlainObject( effect ) ) {
-			return effect;
-		}
+        // short path for passing an effect options object:
+        if ( $.isPlainObject( effect ) ) {
+            return effect;
+        }
 
-		// convert to an object
-		effect = { effect: effect };
+        // convert to an object
+        effect = { effect: effect };
 
-		// catch (effect)
-		if ( options === undefined ) {
-			options = {};
-		}
+        // catch (effect)
+        if ( options === undefined ) {
+            options = {};
+        }
 
-		// catch (effect, callback)
-		if ( $.isFunction( options ) ) {
-			callback = options;
-			speed = null;
-			options = {};
-		}
+        // catch (effect, callback)
+        if ( $.isFunction( options ) ) {
+            callback = options;
+            speed = null;
+            options = {};
+        }
 
-		// catch (effect, speed, ?)
-		if ( $.type( options ) === "number" || $.fx.speeds[ options ]) {
-			callback = speed;
-			speed = options;
-			options = {};
-		}
+        // catch (effect, speed, ?)
+        if ( $.type( options ) === "number" || $.fx.speeds[ options ]) {
+            callback = speed;
+            speed = options;
+            options = {};
+        }
 
-		// catch (effect, options, callback)
-		if ( $.isFunction( speed ) ) {
-			callback = speed;
-			speed = null;
-		}
+        // catch (effect, options, callback)
+        if ( $.isFunction( speed ) ) {
+            callback = speed;
+            speed = null;
+        }
 
-		// add options to effect
-		if ( options ) {
-			$.extend( effect, options );
-		}
+        // add options to effect
+        if ( options ) {
+            $.extend( effect, options );
+        }
 
-		speed = speed || options.duration;
-		effect.duration = $.fx.off ? 0 : typeof speed === "number"
-			? speed : speed in $.fx.speeds ? $.fx.speeds[ speed ] : $.fx.speeds._default;
+        speed = speed || options.duration;
+        effect.duration = $.fx.off ? 0 : typeof speed === "number"
+            ? speed : speed in $.fx.speeds ? $.fx.speeds[ speed ] : $.fx.speeds._default;
 
-		effect.complete = callback || options.complete;
+        effect.complete = callback || options.complete;
 
-		return effect;
-	}
+        return effect;
+    }
 
-	function standardSpeed( speed ) {
-		// valid standard speeds
-		if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) {
-			return true;
-		}
+    function standardSpeed( speed ) {
+        // valid standard speeds
+        if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) {
+            return true;
+        }
 
-		// invalid strings - treat as "normal" speed
-		if ( typeof speed === "string" && !$.jqplot.effects.effect[ speed ] ) {
-			// TODO: remove in 2.0 (#7115)
-			if ( backCompat && $.jqplot.effects[ speed ] ) {
-				return false;
-			}
-			return true;
-		}
+        // invalid strings - treat as "normal" speed
+        if ( typeof speed === "string" && !$.jqplot.effects.effect[ speed ] ) {
+            // TODO: remove in 2.0 (#7115)
+            if ( backCompat && $.jqplot.effects[ speed ] ) {
+                return false;
+            }
+            return true;
+        }
 
-		return false;
-	}
+        return false;
+    }
 
-	$.fn.extend({
-		jqplotEffect: function( effect, options, speed, callback ) {
-			var args = _normalizeArguments.apply( this, arguments ),
-				mode = args.mode,
-				queue = args.queue,
-				effectMethod = $.jqplot.effects.effect[ args.effect ],
+    $.fn.extend({
+        jqplotEffect: function( effect, options, speed, callback ) {
+            var args = _normalizeArguments.apply( this, arguments ),
+                mode = args.mode,
+                queue = args.queue,
+                effectMethod = $.jqplot.effects.effect[ args.effect ],
 
-				// DEPRECATED: remove in 2.0 (#7115)
-				oldEffectMethod = !effectMethod && backCompat && $.jqplot.effects[ args.effect ];
+                // DEPRECATED: remove in 2.0 (#7115)
+                oldEffectMethod = !effectMethod && backCompat && $.jqplot.effects[ args.effect ];
 
-			if ( $.fx.off || !( effectMethod || oldEffectMethod ) ) {
-				// delegate to the original method (e.g., .show()) if possible
-				if ( mode ) {
-					return this[ mode ]( args.duration, args.complete );
-				} else {
-					return this.each( function() {
-						if ( args.complete ) {
-							args.complete.call( this );
-						}
-					});
-				}
-			}
+            if ( $.fx.off || !( effectMethod || oldEffectMethod ) ) {
+                // delegate to the original method (e.g., .show()) if possible
+                if ( mode ) {
+                    return this[ mode ]( args.duration, args.complete );
+                } else {
+                    return this.each( function() {
+                        if ( args.complete ) {
+                            args.complete.call( this );
+                        }
+                    });
+                }
+            }
 
-			function run( next ) {
-				var elem = $( this ),
-					complete = args.complete,
-					mode = args.mode;
+            function run( next ) {
+                var elem = $( this ),
+                    complete = args.complete,
+                    mode = args.mode;
 
-				function done() {
-					if ( $.isFunction( complete ) ) {
-						complete.call( elem[0] );
-					}
-					if ( $.isFunction( next ) ) {
-						next();
-					}
-				}
+                function done() {
+                    if ( $.isFunction( complete ) ) {
+                        complete.call( elem[0] );
+                    }
+                    if ( $.isFunction( next ) ) {
+                        next();
+                    }
+                }
 
-				// if the element is hiddden and mode is hide,
-				// or element is visible and mode is show
-				if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
-					done();
-				} else {
-					effectMethod.call( elem[0], args, done );
-				}
-			}
+                // if the element is hiddden and mode is hide,
+                // or element is visible and mode is show
+                if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
+                    done();
+                } else {
+                    effectMethod.call( elem[0], args, done );
+                }
+            }
 
-			// TODO: remove this check in 2.0, effectMethod will always be true
-			if ( effectMethod ) {
-				return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
-			} else {
-				// DEPRECATED: remove in 2.0 (#7115)
-				return oldEffectMethod.call(this, {
-					options: args,
-					duration: args.duration,
-					callback: args.complete,
-					mode: args.mode
-				});
-			}
-		}
-	});
+            // TODO: remove this check in 2.0, effectMethod will always be true
+            if ( effectMethod ) {
+                return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
+            } else {
+                // DEPRECATED: remove in 2.0 (#7115)
+                return oldEffectMethod.call(this, {
+                    options: args,
+                    duration: args.duration,
+                    callback: args.complete,
+                    mode: args.mode
+                });
+            }
+        }
+    });
 
 })(jQuery);

src/plugins/jqplot.pointLabels.js

         // add a pointLabels attribute to the series plugins
         this.plugins.pointLabels = new $.jqplot.PointLabels(options.pointLabels);
         this.plugins.pointLabels.setLabels.call(this);
-
-        if (this.renderer.animation && this.renderer.animation._supported && this.renderer.animation.show) {
-            
-        }
     };
     
     // called with scope of series
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.