diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-13 05:21:37 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-13 05:21:37 +0000 |
commit | 2ad8dc6a1f805315d4a1173fe988e15098c59364 (patch) | |
tree | 371706e0b11e9f18c05e7cda70cb0975cb5e4338 /actionpack | |
parent | 908e9a17d8166d9b83609ec3aa877717a21d8ab7 (diff) | |
download | rails-2ad8dc6a1f805315d4a1173fe988e15098c59364.tar.gz rails-2ad8dc6a1f805315d4a1173fe988e15098c59364.tar.bz2 rails-2ad8dc6a1f805315d4a1173fe988e15098c59364.zip |
Added :confirm option to link_to_remote just like link_to has #1082 [yrashk@fp.org.ua]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/javascript_helper.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 591fe91b4e..a648cbcd70 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Added :confirm option to link_to_remote just like link_to has #1082 [yrashk@fp.org.ua] + * Added minute_step as an option to select_minute (and the helpers that use it) to jump in larger increments than just 1 minute. At 15, it would return 0, 15, 30, 45 options #1085 [ordwaye@evergreen.edu] * Fixed that an exception would be thrown when an empty form was submitted #1090 [jan@ulbrich-boerwang.de] diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index ba418b15b3..584f33f81d 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -106,7 +106,8 @@ module ActionView function = "#{options[:before]}; #{function}" if options[:before] function = "#{function}; #{options[:after]}" if options[:after] function = "if (#{options[:condition]}) { #{function}; }" if options[:condition] - + function = "if (confirm('#{escape_javascript(options[:confirm])}')) { #{function}; }" if options[:confirm] + return function end |