bootstrap-guardsjs-rails 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4a9c503eff7fe8de74ebf46a87669b4055a303da
4
+ data.tar.gz: 07d0119902ccf2e460453540079c9506e67ed8fb
5
+ SHA512:
6
+ metadata.gz: 18aa15e9b9718eebf6cea3442d65dc89a8c2eb9eceea1a745937218511e6da2588249deaecd809dead8291aaa17caee8c2e6d024f577504178d253d01992327b
7
+ data.tar.gz: 8e1a311db159033b9fcac5d4231b166ef93bac4b8287229d4a1c654dd07bff7cb1117c82e775f1210b3d28716d523fa25c0e5c36fd5073c74677e67a7c7d9f09
@@ -16,4 +16,18 @@
16
16
 
17
17
  // Make sure the error message class is the correct class.
18
18
  $.guards.defaults.messageClass = "help-inline";
19
+
20
+ // Add the error to the proper control group parent.
21
+ $(document).on("afterGuardError", ":guardable", function(e) {
22
+ $(e.errorElements).each(function() {
23
+ $(this).parents(".control-group:first").addClass("error");
24
+ });
25
+ });
26
+
27
+ // Remove the error from the control on clear.
28
+ $(document).on("afterClearGuardError", ":guardable", function(e) {
29
+ $(e.errorElements).each(function() {
30
+ $(this).parents(".control-group:first").removeClass("error");
31
+ });
32
+ });
19
33
  })(jQuery);
@@ -1,3 +1,4 @@
1
+ require "guardsjs-rails"
1
2
  require "bootstrap-guardsjs-rails/version"
2
3
 
3
4
  module BootstrapGuardsJS
@@ -1,5 +1,5 @@
1
1
  module BootstrapGuardsJS
2
2
  module Rails
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,22 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap-guardsjs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Mike Virata-Stone
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-09-18 00:00:00.000000000 Z
11
+ date: 2013-09-19 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: railties
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '3.0'
22
20
  - - <
@@ -25,9 +23,8 @@ dependencies:
25
23
  type: :runtime
26
24
  prerelease: false
27
25
  version_requirements: !ruby/object:Gem::Requirement
28
- none: false
29
26
  requirements:
30
- - - ! '>='
27
+ - - '>='
31
28
  - !ruby/object:Gem::Version
32
29
  version: '3.0'
33
30
  - - <
@@ -36,17 +33,15 @@ dependencies:
36
33
  - !ruby/object:Gem::Dependency
37
34
  name: guardsjs-rails
38
35
  requirement: !ruby/object:Gem::Requirement
39
- none: false
40
36
  requirements:
41
- - - ! '>='
37
+ - - '>='
42
38
  - !ruby/object:Gem::Version
43
39
  version: 1.2.0
44
40
  type: :runtime
45
41
  prerelease: false
46
42
  version_requirements: !ruby/object:Gem::Requirement
47
- none: false
48
43
  requirements:
49
- - - ! '>='
44
+ - - '>='
50
45
  - !ruby/object:Gem::Version
51
46
  version: 1.2.0
52
47
  description: This gem depends on the guardsjs-rails gem and adds Bootstrap functionality
@@ -63,29 +58,25 @@ files:
63
58
  homepage: http://guardsjs.com/
64
59
  licenses:
65
60
  - MIT
61
+ metadata: {}
66
62
  post_install_message:
67
63
  rdoc_options: []
68
64
  require_paths:
69
65
  - lib
70
66
  required_ruby_version: !ruby/object:Gem::Requirement
71
- none: false
72
67
  requirements:
73
- - - ! '>='
68
+ - - '>='
74
69
  - !ruby/object:Gem::Version
75
70
  version: '0'
76
- segments:
77
- - 0
78
- hash: 1268666820967402530
79
71
  required_rubygems_version: !ruby/object:Gem::Requirement
80
- none: false
81
72
  requirements:
82
- - - ! '>='
73
+ - - '>='
83
74
  - !ruby/object:Gem::Version
84
75
  version: '0'
85
76
  requirements: []
86
77
  rubyforge_project:
87
- rubygems_version: 1.8.25
78
+ rubygems_version: 2.0.3
88
79
  signing_key:
89
- specification_version: 3
80
+ specification_version: 4
90
81
  summary: Rails asset gem to integrate guards.js with Bootstrap.
91
82
  test_files: []