jquery-rails 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jquery-rails might be problematic. Click here for more details.

@@ -1,3 +1,8 @@
1
+ ## 2.1.1 (18 August 2012)
2
+
3
+ - Updated to latest jquery-ujs
4
+ - ajax:aborted:file bugfixes
5
+
1
6
  ## 2.1.0 (16 August 2012)
2
7
 
3
8
  - Updated to latest jquery-ujs
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jquery-rails (2.1.0)
4
+ jquery-rails (2.1.1)
5
5
  railties (>= 3.1.0, < 5.0)
6
6
  thor (~> 0.14)
7
7
 
@@ -1,8 +1,8 @@
1
1
  module Jquery
2
2
  module Rails
3
- VERSION = "2.1.0"
3
+ VERSION = "2.1.1"
4
4
  JQUERY_VERSION = "1.8.0"
5
5
  JQUERY_UI_VERSION = "1.8.23"
6
- JQUERY_UJS_VERSION = "12da9fc2f175c8e445413b15cf6b685deb271d6e"
6
+ JQUERY_UJS_VERSION = "8b147fb023f0d13deebea750e7e9827b6d3bc8ba"
7
7
  end
8
8
  end
@@ -257,7 +257,7 @@
257
257
  input = $(this);
258
258
  valueToCheck = input.is(':checkbox,:radio') ? input.is(':checked') : input.val();
259
259
  // If nonBlank and valueToCheck are both truthy, or nonBlank and valueToCheck are both falsey
260
- if (valueToCheck == !!nonBlank) {
260
+ if (!valueToCheck === !nonBlank) {
261
261
  inputs = inputs.add(input);
262
262
  }
263
263
  });
@@ -366,8 +366,15 @@
366
366
 
367
367
  if (remote) {
368
368
  if (nonBlankFileInputs) {
369
+ // slight timeout so that the submit button gets properly serialized
370
+ // (make it easy for event handler to serialize form without disabled values)
369
371
  setTimeout(function(){ rails.disableFormElements(form); }, 13);
370
- return rails.fire(form, 'ajax:aborted:file', [nonBlankFileInputs]);
372
+ var aborted = rails.fire(form, 'ajax:aborted:file', [nonBlankFileInputs]);
373
+
374
+ // re-enable form elements if event bindings return false (canceling normal form submission)
375
+ if (!aborted) { setTimeout(function(){ rails.enableFormElements(form); }, 13); }
376
+
377
+ return aborted;
371
378
  }
372
379
 
373
380
  // If browser does not support submit bubbling, then this live-binding will be called before direct
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-16 00:00:00.000000000Z
12
+ date: 2012-08-18 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &70255489661820 !ruby/object:Gem::Requirement
16
+ requirement: &70258115296360 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: '5.0'
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *70255489661820
27
+ version_requirements: *70258115296360
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: thor
30
- requirement: &70255489671420 !ruby/object:Gem::Requirement
30
+ requirement: &70258115307300 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ~>
@@ -35,7 +35,7 @@ dependencies:
35
35
  version: '0.14'
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *70255489671420
38
+ version_requirements: *70258115307300
39
39
  description: This gem provides jQuery and the jQuery-ujs driver for your Rails 3 application.
40
40
  email:
41
41
  - andre@arko.net
@@ -76,7 +76,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
76
76
  version: '0'
77
77
  segments:
78
78
  - 0
79
- hash: 608793451572395296
79
+ hash: -2382731131632071468
80
80
  required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  none: false
82
82
  requirements: