hooch 0.16.16 → 0.16.18
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 -12
- data/lib/hooch/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60f55de30e97bcbc1041b295244daef1ca96baa58b700c4f78bdb1d850f04a47
|
4
|
+
data.tar.gz: 86bedbd24868783f5cf8545ce961b8a5bfe7e3ecd2f3a4b41dbe1af222683ab5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffc4bb125afb14cc97fcac9d9aa3be9067db38e533964a8c377e0c0ee54c01be3aceb4bf4afcae344afac8e3e14a19cedc64c414e507ac01a538d3a2b1c16df8
|
7
|
+
data.tar.gz: 2036078fbe86a085b4e46175a656b9b274e0156f9ec9fdb2c676b2fcd36a1947d2c6634768d5e1e283792138aca42f118852736643b62f3cdddc728445ccf274
|
@@ -220,21 +220,33 @@ var initHooch = function(){
|
|
220
220
|
},
|
221
221
|
dismissModal: function(){
|
222
222
|
hooch.dismisser = null
|
223
|
-
|
223
|
+
hooch.current_modal.close()
|
224
224
|
}
|
225
225
|
}),
|
226
226
|
Modal: Class.extend({
|
227
227
|
init: function($modal_content,dismissable){
|
228
|
-
|
229
|
-
|
228
|
+
if(!hooch.current_modal){
|
229
|
+
hooch.current_modal = new hooch.SingletonModal()
|
230
|
+
}
|
231
|
+
hooch.current_modal.load($modal_content,dismissable)
|
232
|
+
}
|
233
|
+
}),
|
234
|
+
SingletonModal: Class.extend({
|
235
|
+
init: function($modal_content){
|
230
236
|
this.getMask()
|
231
|
-
this.getDismisser()
|
232
237
|
this.getContentWrapper()
|
238
|
+
this.getDismisser()
|
239
|
+
},
|
240
|
+
load: function($modal_content,dismissable){
|
241
|
+
this.$modal_content = $modal_content
|
242
|
+
this.dismissable = dismissable
|
243
|
+
this.$modal_wrapper.html(this.$modal_content)
|
244
|
+
this.$modal_wrapper.append(this.$dismisser)
|
245
|
+
this.$modal_content.show()
|
233
246
|
this.attachDismisser()
|
234
247
|
this.disableScroll()
|
235
248
|
this.$modal_content.trigger('modalInitialized')
|
236
249
|
this.showModal()
|
237
|
-
hooch.current_modal = this
|
238
250
|
this.$modal_content.trigger('modalVisible')
|
239
251
|
},
|
240
252
|
getMask: function(){
|
@@ -242,17 +254,14 @@ var initHooch = function(){
|
|
242
254
|
},
|
243
255
|
getContentWrapper: function(){
|
244
256
|
this.$modal_wrapper = this.$modal_mask.find('#hooch-modal')
|
245
|
-
this.$modal_wrapper.html(this.$modal_content)
|
246
|
-
this.$modal_content.show()
|
247
257
|
},
|
248
258
|
getDismisser: function(){
|
249
|
-
this.$dismisser = this.$modal_mask.find('#hooch-dismiss')
|
250
|
-
this.
|
259
|
+
this.$dismisser = this.$modal_mask.find('#hooch-dismiss')
|
260
|
+
this.$dismisser.on('click', function(){hooch.current_modal.close()})
|
251
261
|
},
|
252
262
|
attachDismisser: function(){
|
253
263
|
if(this.dismissable){
|
254
264
|
this.$dismisser.show()
|
255
|
-
this.$modal_wrapper.append(this.$dismisser)
|
256
265
|
} else {
|
257
266
|
this.$dismisser.hide()
|
258
267
|
}
|
@@ -262,6 +271,7 @@ var initHooch = function(){
|
|
262
271
|
this.$modal_mask.show()
|
263
272
|
},
|
264
273
|
close: function(){
|
274
|
+
this.$dismisser.detach()
|
265
275
|
this.$modal_mask.hide()
|
266
276
|
this.$modal_content.hide()
|
267
277
|
this.enableScroll()
|
@@ -288,8 +298,8 @@ var initHooch = function(){
|
|
288
298
|
}
|
289
299
|
}),
|
290
300
|
closeModal: function(){
|
291
|
-
if(hooch.
|
292
|
-
hooch.
|
301
|
+
if(hooch.current_modal){
|
302
|
+
hooch.current_modal.close()
|
293
303
|
}
|
294
304
|
},
|
295
305
|
attachModalDismisser: function(){
|
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.16.
|
4
|
+
version: 0.16.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Draut
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01
|
11
|
+
date: 2019-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|