mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-17 12:48:08 +01:00
Forgot one bit of prototype stuff to clean up
This commit is contained in:
parent
6f3dbca3e2
commit
35c9f55553
2 changed files with 0 additions and 28 deletions
|
|
@ -1,27 +0,0 @@
|
|||
module ActionView
|
||||
module Helpers
|
||||
module PrototypeHelper
|
||||
|
||||
def remote_to_href(options = {})
|
||||
remote_function(options.merge(:url => javascript_variable('this.href'))) + "\n"
|
||||
end
|
||||
|
||||
class JavaScriptGenerator #:nodoc:
|
||||
module GeneratorMethods
|
||||
|
||||
# Executes the content of the block if the user confirms the javascript confirmation. Example:
|
||||
#
|
||||
# page.confirming("Are you sure?") do
|
||||
# page.visual_effect :hide, 'information'
|
||||
# end
|
||||
def confirming(message)
|
||||
message = "'#{message}'" unless message =~ /^['"]/
|
||||
self << "if (confirm(#{message})) {"
|
||||
yield
|
||||
self << "}"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue