diff options
author | Thomas Fuchs <thomas@fesch.at> | 2006-11-17 23:52:54 +0000 |
---|---|---|
committer | Thomas Fuchs <thomas@fesch.at> | 2006-11-17 23:52:54 +0000 |
commit | bc76044fde8701d19ab85d244789a69ba5ed9bbd (patch) | |
tree | cc0082fc4ed90e19a81fefe520bdae11d8ee5d52 | |
parent | f92d6a07d0d01226fb80c82608d332843c01f2d6 (diff) | |
download | rails-bc76044fde8701d19ab85d244789a69ba5ed9bbd.tar.gz rails-bc76044fde8701d19ab85d244789a69ba5ed9bbd.tar.bz2 rails-bc76044fde8701d19ab85d244789a69ba5ed9bbd.zip |
Update Prototype in trunk to [5550]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5551 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/javascripts/prototype.js | 24 | ||||
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/html/javascripts/prototype.js | 24 |
4 files changed, 52 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index dcfb88f37f..8cb95c56b3 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -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] diff --git a/actionpack/lib/action_view/helpers/javascripts/prototype.js b/actionpack/lib/action_view/helpers/javascripts/prototype.js index ce1e5a028b..ba2d9e501b 100644 --- a/actionpack/lib/action_view/helpers/javascripts/prototype.js +++ b/actionpack/lib/action_view/helpers/javascripts/prototype.js @@ -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) { diff --git a/railties/CHANGELOG b/railties/CHANGELOG index e8d84df447..b0e6bb04e7 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -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] diff --git a/railties/html/javascripts/prototype.js b/railties/html/javascripts/prototype.js index ce1e5a028b..ba2d9e501b 100644 --- a/railties/html/javascripts/prototype.js +++ b/railties/html/javascripts/prototype.js @@ -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) { |