Check-in Number:
|
16 | |
Date: |
2007-Mar-17 09:30:25 (local)
2007-Mar-17 08:30:25 (UTC) |
User: | rse |
Branch: | |
Comment: |
update to latest version
|
Tickets: |
|
Inspections: |
|
Files: |
|
Modified: jquery/jquery.fixes.diff
===================================================================
--- jquery/jquery.fixes.diff 2007-03-17 07:20:45 UTC (rev 15)
+++ jquery/jquery.fixes.diff 2007-03-17 08:30:25 UTC (rev 16)
@@ -1,17 +1,8 @@
-Index: jquery/src/jquery/jquery.js
+Index: src/jquery/jquery.js
===================================================================
---- jquery/src/jquery/jquery.js (revision 1339)
-+++ jquery/src/jquery/jquery.js (working copy)
-@@ -225,7 +225,7 @@
- *
- * @example $("img").get(0);
- * @before <img src="test1.jpg"/> <img src="test2.jpg"/>
-- * @result [ <img src="test1.jpg"/> ]
-+ * @result <img src="test1.jpg"/>
- * @desc Selects all images in the document and returns the first one
- *
- * @name get
-@@ -1418,7 +1418,7 @@
+--- src/jquery/jquery.js (revision 1539)
++++ src/jquery/jquery.js (working copy)
+@@ -1447,7 +1447,7 @@
if ( arg.constructor == Number )
arg = arg.toString();
@@ -20,11 +11,33 @@
if ( typeof arg == "string" ) {
// Trim whitespace, otherwise indexOf won't work as expected
var s = jQuery.trim(arg), div = document.createElement("div"), tb = [];
-Index: jquery/src/event/event.js
+Index: src/selector/selector.js
===================================================================
---- jquery/src/event/event.js (revision 1339)
-+++ jquery/src/event/event.js (working copy)
-@@ -240,7 +240,7 @@
+--- src/selector/selector.js (revision 1539)
++++ src/selector/selector.js (working copy)
+@@ -52,6 +52,8 @@
+ "@": {
+ "=": "z==m[4]",
+ "!=": "z!=m[4]",
++ "=~": "z.match(RegExp(m[4]))!=null",
++ "!~": "z.match(RegExp(m[4]))==null",
+ "^=": "z&&!z.indexOf(m[4])",
+ "$=": "z&&z.substr(z.length - m[4].length,m[4].length)==m[4]",
+ "*=": "z&&z.indexOf(m[4])>=0",
+@@ -67,7 +69,7 @@
+ // The regular expressions that power the parsing engine
+ parse: [
+ // Match: [@value='test'], [@foo]
+- /^\[ *(@)([a-z0-9_-]*) *([!*$^=]*) *('?"?)(.*?)\4 *\]/i,
++ /^\[ *(@)([a-z0-9_-]*) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/i,
+
+ // Match: [div], [div p]
+ /^(\[)\s*(.*?(\[.*?\])?[^[]*?)\s*\]/,
+Index: src/event/event.js
+===================================================================
+--- src/event/event.js (revision 1539)
++++ 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
* as described in bind() apply.
@@ -33,43 +46,213 @@
* default behaviour. To stop both default action and event bubbling, your handler
* has to return false.
*
-Index: plugins/methods/string.js
-===================================================================
---- plugins/methods/string.js (revision 1339)
-+++ 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.
+@@ -545,6 +545,7 @@
*
- * @private
-@@ -150,4 +150,4 @@
- return this.replace(/<\/?[^>]+>/gi, '');
+ * @name scroll
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the scroll event on each of the matched elements.
+ * @cat Events
+ */
+@@ -560,6 +561,7 @@
+ *
+ * @name submit
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the submit event on each of the matched elements.
+ * @cat Events
+ */
+@@ -590,6 +592,7 @@
+ *
+ * @name focus
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the focus event on each of the matched elements.
+ * @cat Events
+ */
+@@ -619,6 +622,7 @@
+ *
+ * @name keydown
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the keydown event on each of the matched elements.
+ * @cat Events
+ */
+@@ -632,6 +636,7 @@
+ *
+ * @name dblclick
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the dblclick event on each of the matched elements.
+ * @cat Events
+ */
+@@ -645,6 +650,7 @@
+ *
+ * @name keypress
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the keypress event on each of the matched elements.
+ * @cat Events
+ */
+@@ -658,6 +664,7 @@
+ *
+ * @name error
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the error event on each of the matched elements.
+ * @cat Events
+ */
+@@ -671,6 +678,7 @@
+ *
+ * @name blur
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the blur event on each of the matched elements.
+ * @cat Events
+ */
+@@ -702,6 +710,7 @@
+ *
+ * @name load
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the load event on each of the matched elements.
+ * @cat Events
+ */
+@@ -715,6 +724,7 @@
+ *
+ * @name select
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the select event on each of the matched elements.
+ * @cat Events
+ */
+@@ -743,6 +753,7 @@
+ *
+ * @name mouseup
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the mouseup event on each of the matched elements.
+ * @cat Events
+ */
+@@ -756,6 +767,7 @@
+ *
+ * @name unload
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the unload event on each of the matched elements.
+ * @cat Events
+ */
+@@ -769,6 +781,7 @@
+ *
+ * @name change
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the change event on each of the matched elements.
+ * @cat Events
+ */
+@@ -782,6 +795,7 @@
+ *
+ * @name mouseout
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the mouseout event on each of the matched elements.
+ * @cat Events
+ */
+@@ -795,6 +809,7 @@
+ *
+ * @name keyup
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the keyup event on each of the matched elements.
+ * @cat Events
+ */
+@@ -808,6 +823,7 @@
+ *
+ * @name click
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the click event on each of the matched elements.
+ * @cat Events
+ */
+@@ -834,6 +850,7 @@
+ *
+ * @name resize
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the resize event on each of the matched elements.
+ * @cat Events
+ */
+@@ -847,6 +864,7 @@
+ *
+ * @name mousemove
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the mousemove event on each of the matched elements.
+ * @cat Events
+ */
+@@ -860,6 +878,7 @@
+ *
+ * @name mousedown
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the mousedown event on each of the matched elements.
+ * @cat Events
+ */
+@@ -873,6 +892,7 @@
+ *
+ * @name mouseover
+ * @type jQuery
++ * @param Object data (optional) Additional data passed to the event handler as event.data
+ * @param Function fn A function to bind to the mousedown event on each of the matched elements.
+ * @cat Events
+ */
+@@ -881,8 +901,8 @@
+ "submit,keydown,keypress,keyup,error").split(","), function(i,o){
+
+ // Handle event binding
+- jQuery.fn[o] = function(f){
+- return f ? this.bind(o, f) : this.trigger(o);
++ jQuery.fn[o] = function(d,f){
++ return (f || d) ? this.bind(o, d, f) : this.trigger(o);
+ };
+
});
-
--})();
-\ No newline at end of file
-+})();
-Index: plugins/methods/array.js
+Index: src/fx/fx.js
===================================================================
---- plugins/methods/array.js (revision 1339)
-+++ plugins/methods/array.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 Array prototype if it doesn't
- * currently exist.
+--- src/fx/fx.js (revision 1539)
++++ src/fx/fx.js (working copy)
+@@ -304,7 +304,7 @@
+ * @example $("p").animate({
+ * opacity: 'show'
+ * }, "slow", "easein");
+- * @desc An example of using an 'easing' function to provide a different style of animation. This will only work if you have a plugin that provides this easing function (Only 'linear' is provided by default, with jQuery).
++ * @desc An example of using an 'easing' function to provide a different style of animation. This will only work if you have a plugin that provides this easing function (Only 'swing' and 'linear' are provided by default, with jQuery).
*
- * @private
-@@ -194,4 +194,4 @@
- });
- });
+ * @name animate
+ * @type jQuery
+@@ -382,7 +382,14 @@
+ return opt;
+ },
--})();
-\ No newline at end of file
-+})();
+- easing: {},
++ easing: {
++ linear: function(percentage_elapsed, time_elapsed, value_start, value_difference, time_duration) {
++ return value_start + value_difference * percentage_elapsed;
++ },
++ 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: {},
+
+@@ -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);
+
+ // Perform the next step of the animation
+ z.a();