mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Update Prototype in trunk to [5550]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5551 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
*SVN*
|
||||
|
||||
* Update to Prototype 1.5.0_rc2 [5550] which makes it work in Opera again [Thomas Fuchs]
|
||||
|
||||
* Reuse named route helper module between Routing reloads. Use remove_method to delete named route methods after each load. Since the module is never collected, this fixes a significant memory leak. [Nicholas Seckar]
|
||||
|
||||
* ActionView::Base.erb_variable accessor names the buffer variable used to render templates. Defaults to _erbout; use _buf for erubis. [Rick Olson]
|
||||
|
||||
@@ -261,6 +261,14 @@ Object.extend(String.prototype, {
|
||||
return camelizedString;
|
||||
},
|
||||
|
||||
underscore: function() {
|
||||
return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'-').toLowerCase();
|
||||
},
|
||||
|
||||
dasherize: function() {
|
||||
return this.gsub(/_/,'-');
|
||||
},
|
||||
|
||||
inspect: function(useDoubleQuotes) {
|
||||
var escapedString = this.replace(/\\/g, '\\\\');
|
||||
if (useDoubleQuotes)
|
||||
@@ -580,6 +588,22 @@ Object.extend(Array.prototype, {
|
||||
});
|
||||
|
||||
Array.prototype.toArray = Array.prototype.clone;
|
||||
|
||||
if(window.opera){
|
||||
Array.prototype.concat = function(){
|
||||
var array = [];
|
||||
for(var i = 0, length = this.length; i < length; i++) array.push(this[i]);
|
||||
for(var i = 0, length = arguments.length; i < length; i++) {
|
||||
if(arguments[i].constructor == Array) {
|
||||
for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
|
||||
array.push(arguments[i][j]);
|
||||
} else {
|
||||
array.push(arguments[i]);
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
}
|
||||
var Hash = {
|
||||
_each: function(iterator) {
|
||||
for (var key in this) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
*SVN*
|
||||
|
||||
* Update to Prototype 1.5.0_rc2 [5550] which makes it work in Opera again [Thomas Fuchs]
|
||||
|
||||
* Make sure that exceptions which are thrown outside of the user code try their best to be handeled in ApplicationController#rescue_action [Tobias Luetke]
|
||||
|
||||
* Rails::VERSION::STRING should always be available without having to require 'rails/version'. #6244 [fearoffish]
|
||||
|
||||
24
railties/html/javascripts/prototype.js
vendored
24
railties/html/javascripts/prototype.js
vendored
@@ -261,6 +261,14 @@ Object.extend(String.prototype, {
|
||||
return camelizedString;
|
||||
},
|
||||
|
||||
underscore: function() {
|
||||
return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'-').toLowerCase();
|
||||
},
|
||||
|
||||
dasherize: function() {
|
||||
return this.gsub(/_/,'-');
|
||||
},
|
||||
|
||||
inspect: function(useDoubleQuotes) {
|
||||
var escapedString = this.replace(/\\/g, '\\\\');
|
||||
if (useDoubleQuotes)
|
||||
@@ -580,6 +588,22 @@ Object.extend(Array.prototype, {
|
||||
});
|
||||
|
||||
Array.prototype.toArray = Array.prototype.clone;
|
||||
|
||||
if(window.opera){
|
||||
Array.prototype.concat = function(){
|
||||
var array = [];
|
||||
for(var i = 0, length = this.length; i < length; i++) array.push(this[i]);
|
||||
for(var i = 0, length = arguments.length; i < length; i++) {
|
||||
if(arguments[i].constructor == Array) {
|
||||
for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
|
||||
array.push(arguments[i][j]);
|
||||
} else {
|
||||
array.push(arguments[i]);
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
}
|
||||
var Hash = {
|
||||
_each: function(iterator) {
|
||||
for (var key in this) {
|
||||
|
||||
Reference in New Issue
Block a user