hooch 0.8.0 → 0.8.1
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 +22 -18
- data/lib/hooch/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6c8d1dade71b40b3506513ed1dd4a2218be8ab4
|
4
|
+
data.tar.gz: f516b2a7ccbff0f1db97c4a82b53acc507aade37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62f0322607b5edc25523392e9594706cb3747c59d2d77003b3047dde5ff60040bef77be6bc223b1eab485be32d781281acd7a6833356ce28478d0f09c20068d5
|
7
|
+
data.tar.gz: 62c8e576de49da0c5e68c95c19e1a2b859e9f9ec8d4c9043ed7c32cdf5431128415c79d73b2dbbd1cdf5c213d79b0f4f72066fd6575ebc060bccdd74071ac64f
|
@@ -1173,27 +1173,31 @@ var initHooch = function(){
|
|
1173
1173
|
$(window).on('keyup', function(e){key_binder.do_it_now(e)} )
|
1174
1174
|
},
|
1175
1175
|
do_it_now: function(e){
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
}
|
1185
|
-
break;
|
1186
|
-
case 'form':
|
1187
|
-
this.$bound_element.submit()
|
1188
|
-
break;
|
1189
|
-
case 'input':
|
1190
|
-
if('submit' == $this.$bound_element.prop('type')){
|
1176
|
+
var focussed_elem_name = document.activeElement.nodeName.toLowerCase()
|
1177
|
+
if('textarea' != focussed_elem_name && ('input' != focussed_elem_name ||
|
1178
|
+
'submit' == $(document.activeElement).prop('type'))){
|
1179
|
+
if(this.key_code == e.keyCode){
|
1180
|
+
e.preventDefault
|
1181
|
+
switch(this.element_type){
|
1182
|
+
case 'a':
|
1183
|
+
if(this.$bound_element.data('ajax-target')){
|
1191
1184
|
this.$bound_element.click()
|
1185
|
+
} else {
|
1186
|
+
window.location = this.$bound_element.attr('href')
|
1192
1187
|
}
|
1193
|
-
|
1194
|
-
|
1188
|
+
break;
|
1189
|
+
case 'form':
|
1190
|
+
this.$bound_element.submit()
|
1191
|
+
break;
|
1192
|
+
case 'input':
|
1193
|
+
if('submit' == $this.$bound_element.prop('type')){
|
1194
|
+
this.$bound_element.click()
|
1195
|
+
}
|
1196
|
+
default:
|
1197
|
+
break;
|
1198
|
+
}
|
1199
|
+
return false
|
1195
1200
|
}
|
1196
|
-
return false
|
1197
1201
|
}
|
1198
1202
|
}
|
1199
1203
|
})
|
data/lib/hooch/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hooch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Draut
|
@@ -116,20 +116,20 @@ dependencies:
|
|
116
116
|
requirements:
|
117
117
|
- - "~>"
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: '
|
119
|
+
version: '1'
|
120
120
|
- - "<"
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version: '
|
122
|
+
version: '2'
|
123
123
|
type: :development
|
124
124
|
prerelease: false
|
125
125
|
version_requirements: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
127
|
- - "~>"
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version: '
|
129
|
+
version: '1'
|
130
130
|
- - "<"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: '
|
132
|
+
version: '2'
|
133
133
|
description: Hooch provides tools for common UI patterns without any dom or css. You
|
134
134
|
build the html and css you want, then add data-attributes to get behavior. Keep
|
135
135
|
behavior independent of look-and-feel and you can build "anything**"(** within reason).
|