<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>public/lowpro.jquery.js</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -27,7 +27,8 @@ Methods and Options
                          default is `:p`
       * `:form_class` - set's the class attribute for the form tag
       * `:form_id` - set's the id attribute for the form tag
-* `ujs_remote_form (selector, options)`
+      * `:wrapper_class` - set's the class for the wrapper tag. default: `nil`
+* `lowpro_remote_form (selector, options)`
    * `selector`: the CSS selector used to specify which element(s) to apply this observer to.
    * `options`:
       * all the standard `options_for_ajax` options used in all the `remote` Prototype helpers</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ module ActionButton
 
   module Helpers
 
-    ##
+    # 
     # This will add a button that will execute the given action, this is done by
     # wrapping the button in a form element. This allows destructive actions to be
     # packaged in a highly styleable element and still be &quot;safe&quot; by not using GET's.
@@ -23,13 +23,13 @@ module ActionButton
     #   * a wrapper is needed so XHTML 1.0 Strict will validate
     # * &lt;tt&gt;:form_class&lt;/tt&gt; - set's the class attribute for the form tag.
     # * &lt;tt&gt;:form_id&lt;/tt&gt; - set's the id attribute for the form tag.
+    # * &lt;tt&gt;:wrapper_class&lt;/tt&gt; - set's the class for the wrapper tag. default: &lt;tt&gt;nil&lt;/tt&gt;
     # 
     # ==== Example
     #   &lt;%= action_button 'delete_order', &quot;Delete this Order&quot;, {:action =&gt; :delete, :id =&gt; order}, {:method =&gt; :delete} %&gt; 
     #
     def action_button(name, content, url_for_options = {}, options = {}, *parameters_for_url)
-      defaults = {:class =&gt; name}
-      options = defaults.merge(options)
+      options.reverse_merge!({:class =&gt; name})
       wrapper_tag = options.delete(:wrapper_tag) || :p
       
       if options[:id].blank?
@@ -43,14 +43,13 @@ module ActionButton
       output = form_tag(url_for_options, options.merge(:class =&gt; &quot;#{form_class}&quot;, :id =&gt; &quot;#{form_id}&quot;), *parameters_for_url)
       options.delete(:method)
       
-      output &lt;&lt; &quot;\n&quot;
-      output &lt;&lt; content_tag(wrapper_tag, button_tag(id, content, 'submit', options) )
-      output &lt;&lt; &quot;\n&lt;/form&gt;&quot;
+      output &lt;&lt; &quot;\n&lt;#{wrapper_tag}#{options[:wrapper_class].blank? ? '' : ('class=&quot;'+options.delete(:wrapper_class)+'&quot;')}&quot;
+      output &lt;&lt; button_tag(id, content, 'submit', options)
+      output &lt;&lt; &quot;&lt;/#{wrapper_tag}&gt;\n&lt;/form&gt;&quot;
       
       return output
     end
     
-    ##
     # Creates a button tag with the content passed to the content parameter inside.
     # It also sets the &lt;tt&gt;name&lt;/tt&gt; attribute, and the &lt;tt&gt;type&lt;/tt&gt; attribute on the tag
     # bassed on the parameters provided.
@@ -59,11 +58,10 @@ module ActionButton
       content_tag(:button, content, html_options.merge(:type =&gt; type, :name =&gt; name, :id =&gt; name))
     end
     
-    ##
     # Creates javascript to create a remote form event observer with the lowpro library for all
     # elements that match the CSS selector specified.
     #
-    def ujs_remote_form(selector, options = {})
+    def lowpro_remote_form(selector, options = {})
       js_options = custom_remote_options(options)
       
       &lt;&lt;JS
@@ -72,6 +70,13 @@ module ActionButton
   });
 JS
     end
+    
+    # Creates javascript to create a remote form event observer with the jQuery lowpro library
+    # for all elements that match the CSS selector specified.
+    #
+    def jquery_lowpro_remote_form(selector, options = {})
+      &quot;$('#{selector}').attach(Remote.Form, #{options_for_javascript(options)});&quot;
+    end
 
     private
 </diff>
      <filename>lib/action_button.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,15 @@
 namespace :action_button do
-   require 'fileutils'
-   
-   desc &quot;Replace the old lowpro.js file witht the new one&quot;
-   task :update_js do
-      lowpro_js = File.dirname(__FILE__) + '/../../../public/javascripts/lowpro.js'
-      FileUtils.cp File.dirname(__FILE__) + '/public/lowpro.js', lowpro_js
-   end
+  require 'fileutils'
+
+  desc &quot;Install lowpro.js&quot;
+  task :install_lowpro do
+    lowpro_js = File.dirname(__FILE__) + '/../../../public/javascripts/lowpro.js'
+    FileUtils.cp File.dirname(__FILE__) + '/public/lowpro.js', lowpro_js
+  end
+
+  desc &quot;Install lowpro.jquery.js&quot;
+  task :install_jquery_lowpro do
+    jquery_lowpro_js = File.dirname(__FILE__) + '/../../../public/javascripts/lowpro.jquery.js'
+    FileUtils.cp File.dirname(__FILE__) + '/public/lowpro.jquery.js', jquery_lowpro_js
+  end
 end</diff>
      <filename>tasks/action_button_tasks.rake</filename>
    </modified>
    <modified>
      <diff>@@ -152,8 +152,8 @@ class ActionButtonTest &lt; ActiveSupport::TestCase
   
   context 'ujs_remote_form script with options' do
     setup do
-      @script = ujs_remote_form 'form.action', :confirm =&gt; 'Do you want to do this?',
-                                               :update =&gt; 'some-id', :with =&gt; &quot;'size=' + $F('itemSize')&quot;
+      @script = lowpro_remote_form 'form.action', :confirm =&gt; 'Do you want to do this?',
+                                                  :update =&gt; 'some-id', :with =&gt; &quot;'size=' + $F('itemSize')&quot;
     end
     
     should 'have lowpro event listenter and slector' do
@@ -181,8 +181,8 @@ class ActionButtonTest &lt; ActiveSupport::TestCase
   
   context 'ujs_remote_form script with options' do
     setup do
-      @script = ujs_remote_form 'form.action', :update =&gt; { :success =&gt; 'items-div-id',
-                                                            :failure =&gt; 'error-flash'}
+      @script = lowpro_remote_form 'form.action', :update =&gt; { :success =&gt; 'items-div-id',
+                                                               :failure =&gt; 'error-flash'}
     end
     
     should 'have an option for both update options' do</diff>
      <filename>test/action_button_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ require 'active_support'
 require 'action_controller'
 require 'action_view'
 require 'rexml/document'
-require 'html/document'
+require 'action_controller/vendor/html-scanner'
 require 'active_support/test_case'
 require File.join(PLUGIN_ROOT, 'lib/action_button.rb')
 </diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>install.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>1ac4c42015c00de82ed3ffe1163de27bb65627ab</id>
    </parent>
  </parents>
  <author>
    <name>Brian Landau</name>
    <email>brianjlandau@gmail.com</email>
  </author>
  <url>http://github.com/vigetlabs/action_button/commit/07fcd6e35ab44c0a42f2f5a7be4bb493f48d1420</url>
  <id>07fcd6e35ab44c0a42f2f5a7be4bb493f48d1420</id>
  <committed-date>2009-02-25T10:53:56-08:00</committed-date>
  <authored-date>2009-02-25T10:53:56-08:00</authored-date>
  <message>Add ability to have a class on the wrapper tag. Also add a helper for lowpro for jQuery.</message>
  <tree>3e6fe44126a39b9017d77978683a5492e78fd967</tree>
  <committer>
    <name>Brian Landau</name>
    <email>brianjlandau@gmail.com</email>
  </committer>
</commit>
