hooch 0.12.0 → 0.13.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 +10 -1
- data/lib/hooch/hooch_helper.rb +12 -0
- 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: 37724309fcde2fc0d12013d55d370e9c956a0428
|
4
|
+
data.tar.gz: 03b50dd276b60bb4d6f3726412f7405d03174bf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15dd6af2ee95aa3233dcde52ef0860cc68c23f70346820dc13bc80c97f6e7f2a432a46c45635222917b707c010cffbcc378ff51884981492bf0dcab0e3c19257
|
7
|
+
data.tar.gz: 1d06de7c07c7e93833e6774f083aaba19efe8178ae6ac580afbebcf475336db685aa46b240f6e95c09377c5f3483372fec67503a1d0691738fe19ba5753746f9
|
@@ -18,6 +18,15 @@ var initHooch = function(){
|
|
18
18
|
this.targets.filter('[data-toggle_value="' + this.value + '"]').show();
|
19
19
|
}
|
20
20
|
}),
|
21
|
+
HideShow: Class.extend({
|
22
|
+
init: function($trigger){
|
23
|
+
this.$target = $($trigger.data('target'))
|
24
|
+
var trigger = this
|
25
|
+
$trigger.on('click', function(){
|
26
|
+
trigger.$target.toggle()
|
27
|
+
})
|
28
|
+
}
|
29
|
+
}),
|
21
30
|
HoverOverflow: Class.extend({
|
22
31
|
init: function(jq_obj){
|
23
32
|
this.old_border = jq_obj.css('border-right');
|
@@ -1587,7 +1596,7 @@ var initHooch = function(){
|
|
1587
1596
|
'expand-state' : 'Expandable', 'prevent-double-click' : 'PreventDoubleLinkClick'
|
1588
1597
|
},'hooch');
|
1589
1598
|
window.any_time_manager.registerList(
|
1590
|
-
['hover_overflow','hidey_button','submit-proxy','click-proxy','field-filler','revealer',
|
1599
|
+
['hover_overflow','hidey_button','hide-show','submit-proxy','click-proxy','field-filler','revealer',
|
1591
1600
|
'checkbox-hidden-proxy','prevent-double-submit','prevent-double-link-click', 'tab-group',
|
1592
1601
|
'hover-reveal', 'emptier', 'remover', 'checkbox-proxy', 'fake-select', 'select-action-changer',
|
1593
1602
|
'sorter','bind-key','modal-trigger','history-pusher', 'history-replacer'],'hooch');
|
data/lib/hooch/hooch_helper.rb
CHANGED
@@ -29,6 +29,18 @@ module Hooch
|
|
29
29
|
attrs += " data-content-target=\"#{target}\""
|
30
30
|
end
|
31
31
|
|
32
|
+
def hide_show(target)
|
33
|
+
{}.tap do |params|
|
34
|
+
params['data-hide-show'] = true
|
35
|
+
params['data-target'] = target
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def hide_show_attrs(target)
|
40
|
+
attrs = "data-hide-show=true data-target=" + target
|
41
|
+
attrs
|
42
|
+
end
|
43
|
+
|
32
44
|
def expander(id, expand_class: nil, collapse_class: nil)
|
33
45
|
attrs = "data-expander=true data-expand-id=" + id
|
34
46
|
attrs += " data-expand-class=" + expand_class if expand_class.present?
|
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.13.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: 2016-09-
|
11
|
+
date: 2016-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|