jquery-form-rails 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTU5MTI3NmNhOGQyMDQyNDZlMDg1NjA1NWFkNzMzNzg2Y2ExNGY5YQ==
4
+ NDBjYTBkZmQ4ODY5MGFkYzE1M2UxMjZhMjYyZDQwMWIwYzMzYjZjNQ==
5
5
  data.tar.gz: !binary |-
6
- MmZlY2Q2ZGY0OTY4YWY0NmYyNjU1MTBjZGVlYjk0MzFmMzM1ZWM5NQ==
6
+ NzM1MTQzZTQ3NjJjYmI2NWZmOWIwY2YwODE2NWIzYzZiNmVmNTkyYg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- N2Y4NjNjNTQ2ZGNlMjc2YzNjY2Q4MGMzNWFiYmZiMDYwYmYyMjg0ZjgyMjJi
10
- NjM1ZTlmM2IyY2NkZTgyYjkzMjNiNzVlM2IwYWI4ZGIxNTcwNjE2MGQyZGE0
11
- YmNhMTRkYjMyMmJhZTExYWU0NzgyZjYzYjUzYTllYjg0MjYxMTQ=
9
+ NTIyN2Y5MzMwMmM0ZTRjMjIyNDNmMjJkZWM3NjAxMTI0NTgzYTk1NGQ3Y2Rh
10
+ MWE2ZGJlMTQzZjQwNTE3ZmVjOGM5ZGJkNjQyZGEzZmZiNDJiYjRjMDNiOTk4
11
+ MDM2Mjc1MzE1ZWE1ZTVjZWI1NWVjODdjOGJlMzhlODhlMjJiNzM=
12
12
  data.tar.gz: !binary |-
13
- NDZiMDQ2NGQ0MDUxZGUxNzM3MTMxNjc3MTVkMWE0ZGNjYmEyMGI1NWVmMjYz
14
- ZTFiOGU0NDYwZjQyZjc1OGRhYzVlNzY2ZGJiOWM2MWQ4NGUyZDkyYzQzOGVh
15
- OTgwZTBhZTk0NDFkNmVkZGIxODI0MTZlMzVkYjAyNjNmYzdkYmQ=
13
+ NWY5OTZiOWYwMWE2MzBkMzhiZDgyMGJiYTY5ODU2YWUxOTgzMGNiNjA2OWRm
14
+ YmEyMmM3YjMxMDAzZDdjYTZiMDg0MGI5ZTIxZWIyNWI0YzA4Mjg0ODY1Mzhj
15
+ OTA1ZGZkNzFjMmIzYzBlMTI1MGRhY2MxMDUwNjI4MjRkM2UyYzA=
data/README.md CHANGED
@@ -1,16 +1,31 @@
1
- #[jQuery Form Plugin](http://jquery.malsup.com/form/)
1
+ ##Description
2
+ This is the Rails wrapper for the jQuery Form plugin.
2
3
 
3
- ##Overview
4
- The jQuery Form Plugin allows you to easily and unobtrusively upgrade HTML forms to use AJAX. The main methods, ajaxForm and ajaxSubmit, gather information from the form element to determine how to manage the submit process. Both of these methods support numerous options which allows you to have full control over how the data is submitted.
4
+ ##Installation
5
+ Just add the gem to your Gemfile:
6
+
7
+ gem 'jquery-form-rails'
8
+
9
+ And then use it in your application.js (or similar), via the [Assets
10
+ Pipeline](http://guides.rubyonrails.org/asset_pipeline.html):
11
+
12
+ //= require jquery.form
13
+
14
+ That's it.
15
+
16
+ ---
17
+
18
+ ##About jQuery Form
19
+ The [jQuery Form Plugin[(http://jquery.malsup.com/form/) allows you to easily and unobtrusively upgrade HTML forms to use AJAX. The main methods, ajaxForm and ajaxSubmit, gather information from the form element to determine how to manage the submit process. Both of these methods support numerous options which allows you to have full control over how the data is submitted.
5
20
 
6
21
  No special markup is needed, just a normal form. Submitting a form with AJAX doesn't get any easier than this!
7
22
 
8
23
  ---
9
-
24
+
10
25
  ##API
11
26
 
12
27
  ###ajaxForm( options )
13
- Prepares a form to be submitted via AJAX by adding all of the necessary event listeners. It does **not** submit the form. Use `ajaxForm` in your document's `ready` function to prepare existing forms for AJAX submission, or with the `delegation` option to handle forms not yet added to the DOM.
28
+ Prepares a form to be submitted via AJAX by adding all of the necessary event listeners. It does **not** submit the form. Use `ajaxForm` in your document's `ready` function to prepare existing forms for AJAX submission, or with the `delegation` option to handle forms not yet added to the DOM.
14
29
  Use ajaxForm when you want the plugin to manage all the event binding for you.
15
30
 
16
31
  ````javascript
@@ -21,7 +36,7 @@ $('form').ajaxForm({
21
36
  ````
22
37
 
23
38
  ###ajaxSubmit( options )
24
- Immediately submits the form via AJAX. In the most common use case this is invoked in response to the user clicking a submit button on the form.
39
+ Immediately submits the form via AJAX. In the most common use case this is invoked in response to the user clicking a submit button on the form.
25
40
  Use ajaxSubmit if you want to bind your own submit handler to the form.
26
41
 
27
42
  ````javascript
@@ -43,8 +58,8 @@ Note: all standard [$.ajax](http://api.jquery.com/jQuery.ajax) options can be us
43
58
  Callback function invoked prior to form serialization. Provides an opportunity to manipulate the form before its values are retrieved. Returning `false` from the callback will prevent the form from being submitted. The callback is invoked with two arguments: the jQuery wrapped form object and the options object.
44
59
 
45
60
  ````javascript
46
- beforeSerialize: function($form, options) {
47
- // return false to cancel submit
61
+ beforeSerialize: function($form, options) {
62
+ // return false to cancel submit
48
63
  }
49
64
  ````
50
65
 
@@ -52,10 +67,10 @@ beforeSerialize: function($form, options) {
52
67
  Callback function invoked prior to form submission. This provides an opportunity to manipulate the form before it's values are retrieved. Returning `false` from the callback will prevent the form from being submitted. The callback is invoked with three arguments: the form data in array format, the jQuery wrapped form object, and the options Oobject.
53
68
 
54
69
  ````javascript
55
- beforeSubmit: function(arr, $form, options) {
70
+ beforeSubmit: function(arr, $form, options) {
56
71
  // form data array is an array of objects with name and value properties
57
- // [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
58
- // return false to cancel submit
72
+ // [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
73
+ // return false to cancel submit
59
74
  }
60
75
  ````
61
76
 
@@ -92,7 +107,7 @@ Callback function to be invoked upon error.
92
107
 
93
108
  ###forceSync
94
109
  Only applicable when explicity using the iframe option or when uploading files on browses that don't support XHR2.
95
- Set to `true` to remove the short delay before posting form when uploading files. The delay is used to allow the browser to render DOM updates prior to performing a native form submit. This improves usability when displaying notifications to the user, such as "Please Wait..."
110
+ Set to `true` to remove the short delay before posting form when uploading files. The delay is used to allow the browser to render DOM updates prior to performing a native form submit. This improves usability when displaying notifications to the user, such as "Please Wait..."
96
111
 
97
112
  ###iframe
98
113
  Boolean flag indicating whether the form should *always* target the server response to an iframe instead of leveraging XHR when possible.
@@ -104,7 +119,7 @@ String value that should be used for the iframe's src attribute when/if an ifram
104
119
  Identifies the iframe element to be used as the response target for file uploads. By default, the plugin will create a temporary iframe element to capture the response when uploading files. This options allows you to use an existing iframe if you wish. When using this option the plugin will make no attempt at handling the response from the server.
105
120
 
106
121
  ###replaceTarget
107
- Optionally used along with the the target option. Set to true if the target should be replaced or false if only the target contents should be replaced.
122
+ Optionally used along with the the target option. Set to true if the target should be replaced or false if only the target contents should be replaced.
108
123
 
109
124
  ###resetForm
110
125
  Boolean flag indicating whether the form should be reset if the submit is successful
@@ -1,7 +1,7 @@
1
1
  module Jquery
2
2
  module Form
3
3
  module Rails
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery-form-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Alsup
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-23 00:00:00.000000000 Z
12
+ date: 2013-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jquery-rails