hooch 0.15.22 → 0.15.23
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 +4 -4
- data/app/assets/javascripts/hooch.js +24 -2
- 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: c6788c9c60a2caf174c51ec87262413fb1e895e3
|
|
4
|
+
data.tar.gz: 4420eeaf68065fe3a3e1cbd0e7822aa6dd9fa7a5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 496455d7ab46420cf47a35670e127c13db153ba128e1ac2e9b57b0d8fa8c7fb46f88e9ce0d7a65118208d9cfde07b7fb288c274a3df9f67f12c6c863606234b9
|
|
7
|
+
data.tar.gz: 636c2d5ea8e80ae24206385d6f3ba2bf4d64b822cbd719117822a8b1c4d2073a94a2ebc01283205291734750359f047fe900ef5c65c13a623561feb2eb563619
|
|
@@ -850,8 +850,30 @@ var initHooch = function(){
|
|
|
850
850
|
}),
|
|
851
851
|
Link: Class.extend({
|
|
852
852
|
init: function($link){
|
|
853
|
-
$link
|
|
854
|
-
|
|
853
|
+
this.$link = $link;
|
|
854
|
+
this.getTarget()
|
|
855
|
+
this.bindLink()
|
|
856
|
+
},
|
|
857
|
+
getTarget: function($link){
|
|
858
|
+
this.target = this.$link.data('link-target')
|
|
859
|
+
},
|
|
860
|
+
bindLink: function(){
|
|
861
|
+
if(this.target){
|
|
862
|
+
this.bindWithTarget()
|
|
863
|
+
} else {
|
|
864
|
+
this.bindWithoutTarget()
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
bindWithTarget: function(){
|
|
868
|
+
var link = this
|
|
869
|
+
this.$link.on('click', function(){
|
|
870
|
+
window.open(link.$link.attr('href'), this.$target)
|
|
871
|
+
})
|
|
872
|
+
},
|
|
873
|
+
bindWithoutTarget: function(){
|
|
874
|
+
var link = this
|
|
875
|
+
this.$link.on('click', function(){
|
|
876
|
+
window.location = link.$link.attr('href');
|
|
855
877
|
})
|
|
856
878
|
}
|
|
857
879
|
}),
|
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.15.
|
|
4
|
+
version: 0.15.23
|
|
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-02-
|
|
11
|
+
date: 2018-02-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|