search for: options_for_javascript

Displaying 5 results from an estimated 5 matches for "options_for_javascript".

2006 Oct 23
0
Using ActiveSupport::JSON in PrototypeHelper, ScriptaculousHelper
...I was looking at this ticket: http://dev.rubyonrails.org/ticket/6265 and it got me thinking: is there any reason we''re not using the tasty ActiveSupport::JSON encoder to assemble options for the various helper methods in PrototypeHelper and ScriptaculousHelper? At the moment, they use options_for_javascript() in JavaScriptHelper, which is a half-hearted JSON generator that doesn''t handle strings vs. literals very well, let alone nested hashes, arrays, etc. The result is a bunch of scattered JSON-generating code in the individual helper methods (e.g. visual_effect()). It would seem logical to...
2006 Jan 17
0
:afterFinish not getting called?
...s[''exercise_id''] }, :complete => visual_effect(:squish, "item_#{wc_line.attributes[''id''].to_s}", { :afterFinish => "function(effect) { Element.Destroy(effect.element); Sortable.create(''#{dow}eList'', #{options_for_javascript(sortable_options)}) }" }) ) %> After I click the above link the squish effect hides the element properly, but when I reorder my list and go to update each element''s position, the element ID still exists within the list (showing that the item was hidden, but that my Element.Des...
2006 Aug 02
2
Passing Ajax.InPlaceEditor options
I''ve followed the instructions in the Rails Recipe #1 and have the in_place_editor_field working but now I want to tweak how it looks and behaves. I''d like to be able to override the default yellow highlight color, which is done using the highlightcolor param according to the scriptaculous documentation (unless I''m missing something). I''m new to Ruby and Rails
2006 Nov 04
2
in_place_editor_field submitOnBlur & okButton=false options?
I have a few in_place_editor_fields working fine. I can access some of the script.aculo.us options such as :cols, :save_text, :cancel_text, but how do I access the okButton = false & submitOnBlur options? Basically, I want no submit button, a cancel button, and the ability to submit when I tab out of the field. Is this doable without writing a helper? (avoiding digging that deep so
2006 Mar 25
0
in_place_collection_editor
...[:load_text_url] + js_options[''ajaxOptions''] = options[:options] if options[:options] + js_options[''callback''] = "function(form) { return #{options[:with]} }" if options[:with] + function << ('', '' + options_for_javascript(js_options)) unless js_options.empty? + + function << '')'' + + javascript_tag(function) + end + + # Renders the value of the specified object and method with in-place editing capabilities. + # + def in_place_collection_editor_field(object,...