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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4c5f1122397b5b26756fb220c05812710e3784d
4
- data.tar.gz: 9bc2a39f6e50a6933da60d28e6390b3992fe8816
3
+ metadata.gz: 368691b5fcaf4510004908d3253c272b278d3662
4
+ data.tar.gz: 4046d8569e7543423b8f9b00a51fd7c09a7c53ed
5
5
  SHA512:
6
- metadata.gz: d20ccba582953cb3692155526556a4770a01a2501b2ca62a4ada505e3c0eb1b896db5ad8cbb18de7563a82fed038a5e99ee957e43bb95220d02b0ca3632eb662
7
- data.tar.gz: 9cc84e19de3c4b697d38746ea0b881ab55f88f8bf9cde1c8b119202739ae9799927f77b14b547330bf0f0c27a7061af8f9784f8675d54c1bce571a3de7964136
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-revealer_id="' + this.children_id + '"]');
244
+ this.$all_children = $('[data-revealer-id="' + this.children_id + '"]');
245
245
  $revealer.bind('change',function(){
246
246
  revealer.reveal();
247
247
  });
@@ -65,24 +65,26 @@ module Hooch
65
65
  attrs = "data-remover=true data-target=" + id
66
66
  end
67
67
 
68
- def revealer(id, type: nil)
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 revealer_hash(id, type: nil)
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-revealer_id=#{id}"
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-revealer_id'] = id
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
@@ -1,3 +1,3 @@
1
1
  module Hooch
2
- VERSION = "0.6.8"
2
+ VERSION = "0.7.0"
3
3
  end
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.6.8
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: 2015-12-17 00:00:00.000000000 Z
11
+ date: 2016-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails