Changeset 3302
- Timestamp:
- 12/13/05 18:43:00 (3 years ago)
- Files:
-
- spinoffs/scriptaculous/CHANGELOG (modified) (1 diff)
- spinoffs/scriptaculous/lib/prototype.js (modified) (6 diffs)
- spinoffs/scriptaculous/Rakefile (modified) (1 diff)
- spinoffs/scriptaculous/src/scriptaculous.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
spinoffs/scriptaculous/CHANGELOG
r3286 r3302 1 *V1.5.0* 2 3 * Prepared for V1.5.0 final 4 5 * Update lib/prototype.js to Prototype 1.4.0 final 6 1 7 *V1.5.0_rc6* 2 8 spinoffs/scriptaculous/lib/prototype.js
r3286 r3302 1 /* Prototype JavaScript framework, version 1.4.0 _rc41 /* Prototype JavaScript framework, version 1.4.0 2 2 * (c) 2005 Sam Stephenson <sam@conio.net> 3 3 * … … 12 12 13 13 var Prototype = { 14 Version: '1.4.0 _rc4',14 Version: '1.4.0', 15 15 ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)', 16 16 … … 47 47 } 48 48 49 Function.prototype.bind = function( object) {50 var __method = this ;49 Function.prototype.bind = function() { 50 var __method = this, args = $A(arguments), object = args.shift(); 51 51 return function() { 52 return __method.apply(object, arg uments);52 return __method.apply(object, args.concat($A(arguments))); 53 53 } 54 54 } … … 394 394 }); 395 395 var $A = Array.from = function(iterable) { 396 if (!iterable) return []; 396 397 if (iterable.toArray) { 397 398 return iterable.toArray(); … … 455 456 reverse: function(inline) { 456 457 return (inline !== false ? this : this.toArray())._reverse(); 458 }, 459 460 shift: function() { 461 var result = this[0]; 462 for (var i = 0; i < this.length - 1; i++) 463 this[i] = this[i + 1]; 464 this.length--; 465 return result; 457 466 }, 458 467 … … 1254 1263 var parameter = Form.Element.Serializers[method](element); 1255 1264 1256 if (parameter) 1257 return encodeURIComponent(parameter[0]) + '=' + 1258 encodeURIComponent(parameter[1]); 1265 if (parameter) { 1266 var key = encodeURIComponent(parameter[0]); 1267 if (key.length == 0) return; 1268 1269 if (parameter[1].constructor != Array) 1270 parameter[1] = [parameter[1]]; 1271 1272 return parameter[1].map(function(value) { 1273 return key + '=' + encodeURIComponent(value); 1274 }).join('&'); 1275 } 1259 1276 }, 1260 1277 spinoffs/scriptaculous/Rakefile
r3286 r3302 5 5 PKG_NAME = 'scriptaculous-js' 6 6 PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : '' 7 PKG_VERSION = '1.5 _rc6' + PKG_BUILD7 PKG_VERSION = '1.5.0' + PKG_BUILD 8 8 PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}" 9 9 PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "dist" spinoffs/scriptaculous/src/scriptaculous.js
r3286 r3302 21 21 22 22 var Scriptaculous = { 23 Version: '1.5 _rc6',23 Version: '1.5.0', 24 24 require: function(libraryName) { 25 25 // inserting via DOM fails in Safari 2.0, so brute force approach