tot - Check-in [25]
Not logged in
[Browse]  [Home]  [Login]  [Reports]  [Search]  [Timeline
  [Patchset
Check-in Number: 25
Date: 2007-Apr-01 11:19:04 (local)
2007-Apr-01 09:19:04 (UTC)
User:rse
Branch:
Comment: update to my latest change set
Tickets:
Inspections:
Files:
jquery/jquery.fixes.diff      16 -> 25
Modified: jquery/jquery.fixes.diff
===================================================================
--- jquery/jquery.fixes.diff	2007-04-01 09:18:00 UTC (rev 24)
+++ jquery/jquery.fixes.diff	2007-04-01 09:19:04 UTC (rev 25)
@@ -1,8 +1,34 @@
-Index: src/jquery/jquery.js
+Index: jquery/version.txt
 ===================================================================
---- src/jquery/jquery.js	(revision 1539)
-+++ src/jquery/jquery.js	(working copy)
-@@ -1447,7 +1447,7 @@
+--- jquery/version.txt	(revision 1611)
++++ jquery/version.txt	(working copy)
+@@ -1 +1 @@
+-1.1.2
++1.1.2+RSE
+Index: jquery/src/jquery/jquery.js
+===================================================================
+--- jquery/src/jquery/jquery.js	(revision 1611)
++++ jquery/src/jquery/jquery.js	(working copy)
+@@ -1043,6 +1043,18 @@
+ 	is: function(expr) {
+ 		return expr ? jQuery.multiFilter(expr,this).length > 0 : false;
+ 	},
++
++	/**
++	 * Sort and reverse the nodes in an jQuery object
++	 * (see http://dev.jquery.com/ticket/255)
++	 */
++	sort: function () {
++		return this.pushStack(jQuery.makeArray([].sort.apply(this, arguments)));
++	},
++
++	reverse: function () {
++		return this.pushStack(this.get().reverse(), arguments);
++	},
+ 	
+ 	/**
+ 	 * Get the content of the value attribute of the first matched element.
+@@ -1453,7 +1465,7 @@
  			if ( arg.constructor == Number )
  				arg = arg.toString();
  			
@@ -10,11 +36,11 @@
 +			// Convert html string into DOM nodes
  			if ( typeof arg == "string" ) {
  				// Trim whitespace, otherwise indexOf won't work as expected
- 				var s = jQuery.trim(arg), div = document.createElement("div"), tb = [];
-Index: src/selector/selector.js
+ 				var s = jQuery.trim(arg), div = doc.createElement("div"), tb = [];
+Index: jquery/src/selector/selector.js
 ===================================================================
---- src/selector/selector.js	(revision 1539)
-+++ src/selector/selector.js	(working copy)
+--- jquery/src/selector/selector.js	(revision 1611)
++++ jquery/src/selector/selector.js	(working copy)
 @@ -52,6 +52,8 @@
  		"@": {
  			"=": "z==m[4]",
@@ -28,15 +54,15 @@
  	// The regular expressions that power the parsing engine
  	parse: [
  		// Match: [@value='test'], [@foo]
--		/^\[ *(@)([a-z0-9_-]*) *([!*$^=]*) *('?"?)(.*?)\4 *\]/i,
-+		/^\[ *(@)([a-z0-9_-]*) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/i,
+-		/^\[ *(@)([\w-]+) *([!*$^=]*) *('?"?)(.*?)\4 *\]/,
++		/^\[ *(@)([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,
  
  		// Match: [div], [div p]
  		/^(\[)\s*(.*?(\[.*?\])?[^[]*?)\s*\]/,
-Index: src/event/event.js
+Index: jquery/src/event/event.js
 ===================================================================
---- src/event/event.js	(revision 1539)
-+++ src/event/event.js	(working copy)
+--- jquery/src/event/event.js	(revision 1611)
++++ jquery/src/event/event.js	(working copy)
 @@ -264,7 +264,7 @@
  	 * Binds a handler to a particular event (like click) for each matched element.
  	 * The handler is executed only once for each element. Otherwise, the same rules
@@ -217,10 +243,10 @@
  		};
  			
  	});
-Index: src/fx/fx.js
+Index: jquery/src/fx/fx.js
 ===================================================================
---- src/fx/fx.js	(revision 1539)
-+++ src/fx/fx.js	(working copy)
+--- jquery/src/fx/fx.js	(revision 1611)
++++ jquery/src/fx/fx.js	(working copy)
 @@ -304,7 +304,7 @@
  	 * @example $("p").animate({
  	 *   opacity: 'show'
@@ -230,29 +256,222 @@
  	 *
  	 * @name animate
  	 * @type jQuery
-@@ -382,7 +382,14 @@
- 		return opt;
- 	},
- 	
--	easing: {},
-+	easing: {
-+		linear: function(percentage_elapsed, time_elapsed, value_start, value_difference, time_duration) {
-+			return value_start + value_difference * percentage_elapsed;
+Index: plugins/validate/jquery.validate.js
+===================================================================
+--- plugins/validate/jquery.validate.js	(revision 1611)
++++ plugins/validate/jquery.validate.js	(working copy)
+@@ -756,6 +756,17 @@
+ 				return value.length > 0;
+ 			}
+ 		},
++
++		/**
++		 * Return true, if the value matches a regex.
++		 *
++		 * @name jQuery.validator.methods.regex
++		 * @type Boolean
++		 * @cat Plugins/Validate/Methods
++		 */
++		regex: function(value, element, param) {
++			return !jQuery.validator.methods.required(value, element) || param.test(value);
 +		},
-+		swing: function(percentage_elapsed, time_elapsed, value_start, value_difference, time_duration) {
-+			return value_start + value_difference * ((- Math.cos(percentage_elapsed * Math.PI) / 2) + 0.5);
-+		}
-+	},
  	
- 	queue: {},
+ 		/**
+ 		 * Return false, if the element is
+@@ -1115,8 +1126,8 @@
+ 	 * Add a new validation method. It must consist of a name (must be a legal
+ 	 * javascript identifier), a function and a default message.
+ 	 *
+-	 * Please note: While the temptation is great to
+-	 * add a regex method that checks it's paramter against the value,
++	 * Please note: While the "regex" method above can be used
++	 * to checks it's paramter against the value,
+ 	 * it is much cleaner to encapsulate those regular expressions
+ 	 * inside their own method. If you need lots of slightly different
+ 	 * expressions, try to extract a common parameter.
+Index: plugins/methods/string.js
+===================================================================
+--- plugins/methods/string.js	(revision 1611)
++++ plugins/methods/string.js	(working copy)
+@@ -16,7 +16,7 @@
+ 
+ 	/**
+ 	 * Adds a given method under the given name 
+-	 * to the Date prototype if it doesn't
++	 * to the String prototype if it doesn't
+ 	 * currently exist.
+ 	 *
+ 	 * @private
+@@ -147,7 +147,7 @@
+ 	 * @cat Plugins/Methods/String
+ 	 */
+ 	add("stripTags", function() {
+-		return this.replace(/<\/?[^>]+>/gi, '');
++		return this.replace(/<([a-zA-Z][a-zA-Z0-9:_-]*(\s+[a-zA-Z][a-zA-Z0-9:_-]*=("[^"]*"|'[^']*'))*|\/?[a-zA-Z][a-zA-Z0-9:_-])>/gi, '');
+ 	});
+ 
+-})();
+\ No newline at end of file
++})();
+Index: plugins/methods/array.js
+===================================================================
+--- plugins/methods/array.js	(revision 1611)
++++ plugins/methods/array.js	(working copy)
+@@ -16,7 +16,7 @@
  	
-@@ -574,8 +581,7 @@
- 				// If the easing function exists, then use it 
- 				z.now = options.easing && jQuery.easing[options.easing] ?
- 					jQuery.easing[options.easing](p, n,  firstNum, (lastNum-firstNum), options.duration) :
--					// else use default linear easing
--					((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum;
-+					jQuery.easing["swing"](p, n, firstNum, (lastNum-firstNum), options.duration);
+ 	/**
+ 	 * Adds a given method under the given name 
+-	 * to the Date prototype if it doesn't
++	 * to the Array prototype if it doesn't
+ 	 * currently exist.
+ 	 *
+ 	 * @private
+@@ -47,7 +47,7 @@
+ 		for( var i = 0; i < this.length; i++)
+ 			handler.call(scope, this[i], i, this);
+ 	});
+-	
++
+ 	/**
+ 	 * Tests whether all elements in the array pass the test
+ 	 * implemented by the provided function.
+@@ -194,4 +194,4 @@
+ 		});
+ 	});
+ 	
+-})();
+\ No newline at end of file
++})();
+Index: plugins/cookie/jquery.cookie.js
+===================================================================
+--- plugins/cookie/jquery.cookie.js	(revision 1611)
++++ plugins/cookie/jquery.cookie.js	(working copy)
+@@ -17,6 +17,8 @@
+  * @desc Create a cookie with all available options.
+  * @example $.cookie('the_cookie', 'the_value');
+  * @desc Create a session cookie.
++ * @example $.cookie('the_cookie', null);
++ * @desc Delete a cookie by passing a null value.
+  * @example $.cookie('the_cookie', '', {expires: -1});
+  * @desc Delete a cookie by setting a date in the past.
+  *
+@@ -55,15 +57,35 @@
+ jQuery.cookie = function(name, value, options) {
+     if (typeof value != 'undefined') { // name and value given, set cookie
+         options = options || {};
++        if (value === null) {
++            value = "";
++            options.expires = -1;
++        }
+         var expires = '';
+-        if (options.expires && (typeof options.expires == 'number' || options.expires.toGMTString)) {
++        if (options.expires) {
+             var date;
+-            if (typeof options.expires == 'number') {
++            if (typeof options.expires == 'string' && options.expires.match(/^[+-]?[0-9]+[YMWDhms]$/) !== null) {
++                var match = options.expires.match(/^([+-]?[0-9]+)([YMDWhms])$/);
++                options.expires = parseInt(match[0], 10) * (({
++                    "Y": (60 * 60 * 24 * 365),
++                    "M": (60 * 60 * 24 * 365/12),
++                    "W": (60 * 60 * 24 * 7),
++                    "D": (60 * 60 * 24),
++                    "h": (60 * 60),
++                    "m": (60),
++                    "s": (1)
++                }[match[1]]) || 0);
+                 date = new Date();
+-                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
+-            } else {
++                date.setTime(date.getTime() + options.expires * 1000);
++            }
++            else if (typeof options.expires == 'number') {
++                date = new Date();
++                date.setTime(date.getTime() + options.expires * 24 * 60 * 60 * 1000);
++            }
++            else if (typeof options.expires.toGMTString != 'undefined')
+                 date = options.expires;
+-            }
++            else
++                throw "invalid \"expires\" option";
+             expires = '; expires=' + date.toGMTString(); // use expires attribute, max-age is not supported by IE
+         }
+         var path = options.path ? '; path=' + options.path : '';
+@@ -85,4 +107,4 @@
+         }
+         return cookieValue;
+     }
+-};
+\ No newline at end of file
++};
+Index: plugins/squeezebox/index.html
+===================================================================
+--- plugins/squeezebox/index.html	(revision 1611)
++++ plugins/squeezebox/index.html	(working copy)
+@@ -8,7 +8,7 @@
+ 	
+ 	<link rel="stylesheet" href="squeezebox.css" />
+ 	
+-	<script type="text/javascript" src="../../jquery/dist/jquery.js"></script>
++	<script type="text/javascript" src="http://jquery.com/src/jquery-latest.pack.js"></script>
+ 	<script type="text/javascript" src="jquery.squeezebox.js"></script>
  
- 				// Perform the next step of the animation
- 				z.a();
+ 	<script type="text/javascript">
+@@ -233,4 +233,4 @@
+ 		<div id="log"><div><strong>Log of the 2nd accordion</strong></div></div>
+ 
+ 	</body>
+-</html>
+\ No newline at end of file
++</html>
+Index: plugins/interface/easing.js
+===================================================================
+--- plugins/interface/easing.js	(revision 1611)
++++ plugins/interface/easing.js	(working copy)
+@@ -24,6 +24,10 @@
+ 	 */
+ 	easing :  {
+ 		linear: function(p, n, firstNum, delta, duration) {
++			return p * delta + firstNum;
++		},
++
++		swing: function(p, n, firstNum, delta, duration) {
+ 			return ((-Math.cos(p*Math.PI)/2) + 0.5) * delta + firstNum;
+ 		},
+ 		
+@@ -121,4 +125,4 @@
+ 			return a*Math.pow(2,-10*(n-=1)) * Math.sin( (n*duration-s)*(2*Math.PI)/p )*.5 + delta + firstNum; 
+ 		}
+ 	}
+-});
+\ No newline at end of file
++});
+Index: plugins/interface/ifx.js
+===================================================================
+--- plugins/interface/ifx.js	(revision 1611)
++++ plugins/interface/ifx.js	(working copy)
+@@ -288,7 +288,7 @@
+ 	}
+ });
+ /**
+- * Improved FX function that aniamtes collection of properties per timer. Accepts inline styles and class names to animate
++ * Improved FX function that animates collection of properties per timer. Accepts inline styles and class names to animate
+  */
+ jQuery.extend({
+ 	pause: function(elem, options)
+@@ -304,6 +304,9 @@
+ 	},
+ 	easing :  {
+ 		linear: function(p, n, firstNum, delta, duration) {
++			return p * delta + firstNum;
++		},
++		swing: function(p, n, firstNum, delta, duration) {
+ 			return ((-Math.cos(p*Math.PI)/2) + 0.5) * delta + firstNum;
+ 		}
+ 	},
+@@ -485,4 +488,4 @@
+ 		}
+ 	}
+ 	return newStyles;
+-};
+\ No newline at end of file
++};