ende 0.2.4 → 0.2.5

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: 256ffd95cf61eef34bd8c67bcb027d699634c0d3
4
- data.tar.gz: 9bdfdb3355ccf703026f1ed816883575dd2638d8
3
+ metadata.gz: 6137835bbadb18483b701cdfe82660931227a9b3
4
+ data.tar.gz: a229b0258f96a462f322427706c78e13f7636209
5
5
  SHA512:
6
- metadata.gz: f9ef470cb19226f3c0b8e96f7aafda66d2a8f234d260896d6fcca2d7ff1c010b7f8e76a51b72907165359cdd69396daf00124cc5233b828a4896e5a134eba347
7
- data.tar.gz: 95f2057c016fdef753a7223429809c9084514537953a33125cc561ba3fa6006d43bd9cdbc7d41af5a34cdc20aa1bc61f9b1108781e60200b5e43aae0b19b4293
6
+ metadata.gz: 42a013abfc287dfdc06e4ad818ca25fd40a0e2e65e0318ffba183e5e385ceadf30d755bbe4721eecf79a74844aa5f90e3b5cf511f284e9d56ad3ceb09cbb9cea
7
+ data.tar.gz: 2b783d672e053185fcc72e6a6a0c63c700d702a748a2f9003992af732e227c1562c731aa127dc4ed78c66739f6b0bc8d44ff02e05d939630db35323b9268a357
@@ -28,6 +28,8 @@ define ->
28
28
  {sandbox, $el: el} = widget
29
29
  @el = el
30
30
 
31
+ el.addClass 'hide' unless options.autoshow
32
+
31
33
  sandbox.inject options.content
32
34
 
33
35
  el.find '.close', (event) =>
@@ -35,11 +37,6 @@ define ->
35
37
  @hide()
36
38
  event.preventDefault()
37
39
 
38
- unless options.autoshow
39
- setTimeout ->
40
- el.addClass 'hide'
41
- , 0
42
-
43
40
  type: 'Base'
44
41
 
45
42
  dialog: null
@@ -48,6 +45,7 @@ define ->
48
45
 
49
46
  autoshow: false
50
47
  modal: false
48
+ closable: true
51
49
 
52
50
  initialize: (options) ->
53
51
  @sandbox.logger.log "initialized!"
@@ -71,8 +69,13 @@ define ->
71
69
  # https://github.com/component/dialog/issues/9 is fixed
72
70
  if @options.modal
73
71
  @dialog.on 'show', ->
74
- @_overlay = overlay closable: false
75
- @_overlay.show()
72
+ o = overlay closable: options.closable
73
+
74
+ o.on 'hide', =>
75
+ @_overlay = null
76
+ @hide()
77
+
78
+ @_overlay = o
76
79
 
77
80
 
78
81
  @sandbox.on "modal.#{@identifier}.show" , @dialog.show , @dialog
@@ -83,6 +86,7 @@ define ->
83
86
  # @presentation = presenter model
84
87
  # @bind presentation
85
88
  @sandbox.start()
89
+ @options.autoshow && @sandbox.emit "modal.#{@identifier}.show"
86
90
 
87
91
  extract_options: ->
88
92
  options = _.omit @options, 'el', 'ref', '_ref', 'name', 'require', 'baseUrl'
data/lib/ende/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ende
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ende
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Heitor Salazar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-27 00:00:00.000000000 Z
11
+ date: 2013-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler