hooch 0.6.8 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/hooch.js +1 -1
- data/lib/hooch/hooch_helper.rb +12 -4
- data/lib/hooch/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 368691b5fcaf4510004908d3253c272b278d3662
|
4
|
+
data.tar.gz: 4046d8569e7543423b8f9b00a51fd7c09a7c53ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 331e83f9d2160d3bcf2bddd5cf12c3dd9cc196f5aa15c8f3f3d9010fe0ac4f18ec56ad36e57cf694c7ab7b364c8433592601e93d596450786869f4bfd7efdc47
|
7
|
+
data.tar.gz: 7573a11b703d77621f4ce97bbfe94c5d4a1350f7ca5e8ab92d339d480293f9424f9dcd11ba121d2675beea2cef21f9b2886eb3440beb57ec994cda26c1e28f81
|
@@ -241,7 +241,7 @@ var initHooch = function(){
|
|
241
241
|
var revealer = this;
|
242
242
|
this.$revealer = $revealer;
|
243
243
|
this.children_id = this.$revealer.data('revealer-children-id');
|
244
|
-
this.$all_children = $('[data-
|
244
|
+
this.$all_children = $('[data-revealer-id="' + this.children_id + '"]');
|
245
245
|
$revealer.bind('change',function(){
|
246
246
|
revealer.reveal();
|
247
247
|
});
|
data/lib/hooch/hooch_helper.rb
CHANGED
@@ -65,24 +65,26 @@ module Hooch
|
|
65
65
|
attrs = "data-remover=true data-target=" + id
|
66
66
|
end
|
67
67
|
|
68
|
-
def
|
68
|
+
def revealer_attrs(id, type: nil, highlander: false)
|
69
69
|
''.tap do |attrs|
|
70
70
|
attrs.concat "data-revealer=true data-revealer-children-id=#{id}"
|
71
71
|
attrs.concat " data-sub-type=#{type}" if type.present?
|
72
|
+
attrs.concat " data-sub-type=FormFieldRevealer" if highlander
|
72
73
|
end
|
73
74
|
end
|
74
75
|
|
75
|
-
def
|
76
|
+
def revealer(id, type: nil, highlander: false)
|
76
77
|
{}.tap do |params|
|
77
78
|
params['data-revealer'] = true
|
78
79
|
params['data-revealer-children-id'] = id
|
79
80
|
params['data-sub-type'] = type if type.present?
|
81
|
+
params['data-sub-type'] = 'FormFieldRevealer' if highlander
|
80
82
|
end
|
81
83
|
end
|
82
84
|
|
83
85
|
def revealer_option_attrs(id, trigger: nil, triggers: nil)
|
84
86
|
''.tap do |attrs|
|
85
|
-
attrs.concat "data-
|
87
|
+
attrs.concat "data-revealer-id=#{id}"
|
86
88
|
attrs.concat " data-revealer-trigger=#{trigger}" if trigger.present?
|
87
89
|
attrs.concat " data-revealer-triggers=#{triggers}" if triggers.present?
|
88
90
|
end
|
@@ -90,12 +92,18 @@ module Hooch
|
|
90
92
|
|
91
93
|
def revealer_option(id, trigger: nil, triggers: nil)
|
92
94
|
{}.tap do |params|
|
93
|
-
params['data-
|
95
|
+
params['data-revealer-id'] = id
|
94
96
|
params['data-revealer-trigger'] = trigger if trigger.present?
|
95
97
|
params['data-revealer-triggers'] = triggers if triggers.present?
|
96
98
|
end
|
97
99
|
end
|
98
100
|
|
101
|
+
def revealer_target_attrs(id)
|
102
|
+
''.tap do |attrs|
|
103
|
+
attrs.concat "data-revealer-target=#{id}"
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
99
107
|
def click_proxy(target = nil)
|
100
108
|
''.tap do |attrs|
|
101
109
|
attrs.concat "data-click-proxy=true"
|
data/lib/hooch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hooch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Draut
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|