hooch 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 894a2f5d23f73798e80f163337aa6e397dbbecc8
4
- data.tar.gz: f98d443c40f882d6de822f86dfd97eade89e02f3
3
+ metadata.gz: 67713a02335f32e68fe3adcdc1c353be5c3b3c86
4
+ data.tar.gz: 00b3e37f59f72f0276a717ba245b15ae5b988994
5
5
  SHA512:
6
- metadata.gz: d3566b1022d47791c0afc4c5987145f88577cd2a834b84169e8a543880731342077180135a8d88877488d02f61ebcc68fe8dc5a354b26c3ef3c938db51b46542
7
- data.tar.gz: 204b12632a4bd2f5131f54da2534c1b19f9ec572832306f0e303a52fbf438047504a5a236b65062ba125286be1c6d80087f337d69838f1b853aa22cf0a25f1ee
6
+ metadata.gz: 12befd1f997b000cda21809f047cfa048f5a65169a50ef0b2b8c14099a375ab8877ed1301398badaceb43e07017f6dab7e8fb542a359310e48b8f7243102c87b
7
+ data.tar.gz: 6fdea98e423eb9fce511a728f93426dae859d92683cf002da2ccad85ec76adf8db9f975baa77286d5422b92d420d610caada4d911986d4aae2d13de2995fc626
@@ -443,6 +443,32 @@ var initHooch = function(){
443
443
  return false;
444
444
  }
445
445
  }),
446
+ CheckboxProxy: Class.extend({
447
+ init: function($proxy){
448
+ this.$proxy = $proxy;
449
+ this.target = $($proxy.data('target'));
450
+ var checkbox_proxy = this;
451
+ if(checkbox_proxy.target.prop('checked')){
452
+ this.$proxy.html("✓");
453
+ }
454
+ $proxy.on('click',function(){
455
+ debugger
456
+ if(checkbox_proxy.target.prop('checked')){
457
+ checkbox_proxy.uncheck();
458
+ }else{
459
+ checkbox_proxy.check();
460
+ }
461
+ })
462
+ },
463
+ uncheck: function(){
464
+ this.target.prop('checked', false);
465
+ this.$proxy.html("");
466
+ },
467
+ check: function(){
468
+ this.target.prop('checked', true);
469
+ this.$proxy.html("✓");
470
+ }
471
+ }),
446
472
  Remover: Class.extend({
447
473
  init: function($remover){
448
474
  $target = $($remover.data('target'));
@@ -620,7 +646,7 @@ var initHooch = function(){
620
646
  window.any_time_manager.registerList(
621
647
  ['hover_overflow','hidey_button','submit-proxy','click-proxy','field-filler','revealer',
622
648
  'checkbox-hidden-proxy','prevent-double-submit','prevent-double-link-click', 'tab-group',
623
- 'hover-reveal', 'emptier', 'remover'],'hooch');
649
+ 'hover-reveal', 'emptier', 'remover', 'checkbox-proxy'],'hooch');
624
650
  window.any_time_manager.load();
625
651
  };
626
652
  $(document).ready(function(){
data/lib/hooch/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hooch
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
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.0.6
4
+ version: 0.0.7
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-06-01 00:00:00.000000000 Z
11
+ date: 2015-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails