hooch 0.15.24 → 0.15.25

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: '091bedb5eed98d7ed1dfea1bf768a745286d3107'
4
- data.tar.gz: 1c2b2b68684afbff2563d9b6c54d4ad4f8e86064
3
+ metadata.gz: d39e0f396af90cdca1b611435c7c525aec7c08c0
4
+ data.tar.gz: 307cad30ed8a53f872856456bb3558e679ee100b
5
5
  SHA512:
6
- metadata.gz: 9d37881ab25b39b55fffd3472ec9f247dc0b62fc5adbfbed02e407c73f6bacc0a7d2dc1b750dc0c8b6e791a1e1ff4ed93205fec32fc93fa89e0f7f2b2ebb1d8c
7
- data.tar.gz: 21dbad6f050516f5c642f96c896fa88639ef970312fbeb18a209ef314c342e486dff7dcc8289bc086e911a9c11dcad94755f7c9373df66b8f678552c9b72cab1
6
+ metadata.gz: 22d2a400b45c3bd4e4e99705517e7b65d50634914620fad0ef2ff7f676998e6437476f929433ae761c7aa53d89af73246990f762211bd4d21a085c619f630e0e
7
+ data.tar.gz: 253f6c2988188b354be26a9715c35041addb9bea3c9fbb583eda5c915807db3fb6b03e1c3b386c7c58a22fb25150d38025d94b2fd0231a722821745219b16033
@@ -945,6 +945,7 @@ var initHooch = function(){
945
945
  this.$fake_checkbox = $fake_checkbox
946
946
  this.$form = this.getForm()
947
947
  this.prepDeselectors()
948
+ this.prepSelectors()
948
949
  this.$field = this.getField()
949
950
  var fake_checkbox = this
950
951
  this.$fake_checkbox.click(function(){ fake_checkbox.change() })
@@ -1008,6 +1009,15 @@ var initHooch = function(){
1008
1009
  }
1009
1010
  })
1010
1011
  },
1012
+ prepSelectors: function(){
1013
+ var $selector = $('body').find('[data-fake-selector]')
1014
+ var fake_checkbox = this
1015
+ $selector.on('click', function(){
1016
+ if(!(fake_checkbox.$fake_checkbox.hasClass('checked'))){
1017
+ fake_checkbox.select()
1018
+ }
1019
+ })
1020
+ },
1011
1021
  addValue: function(){
1012
1022
  this.$form.append(this.$field)
1013
1023
  this.possiblyShowForm()
@@ -195,6 +195,18 @@ module Hooch
195
195
  end
196
196
  end
197
197
 
198
+ def fake_select
199
+ {}.tap do |params|
200
+ params['data-fake-selector'] = true
201
+ end
202
+ end
203
+
204
+ def fake_select_attrs
205
+ ''.tap do |attrs|
206
+ attrs.concat 'data-fake-selector=true'
207
+ end
208
+ end
209
+
198
210
  def field_filler(target, value)
199
211
  ''.tap do |attrs|
200
212
  attrs.concat 'data-field-filler=true'
@@ -1,3 +1,3 @@
1
1
  module Hooch
2
- VERSION = "0.15.24"
2
+ VERSION = "0.15.25"
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.15.24
4
+ version: 0.15.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-01 00:00:00.000000000 Z
11
+ date: 2018-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -170,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  version: '0'
171
171
  requirements: []
172
172
  rubyforge_project:
173
- rubygems_version: 2.6.12
173
+ rubygems_version: 2.6.13
174
174
  signing_key:
175
175
  specification_version: 4
176
176
  summary: Tools for building a browser UI. Get the good stuff.