ende 0.4.14 → 0.4.15

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: f6b63d242b7090c3273480a71eb0f113c70d6f07
4
- data.tar.gz: e6ba7818a1b3852fd084d82235623674ddc9d755
3
+ metadata.gz: 27f5d1046eba4368d91e2cddff6dc04d33625fc8
4
+ data.tar.gz: 84d2ca06c85958ba09d76ef0ad14107da743037c
5
5
  SHA512:
6
- metadata.gz: 9221c3b7101bed5ca41795afe23d4fb4ba4e8e80f11d76a2dee70d24843a83f2bf2379649b9880ae021628ef8cfda4faddecd90b40da4099d4b84d26c33ff41f
7
- data.tar.gz: feb8888a587e6a222ab001d2369e34350602ca013ed8b83f646272156d103c211eec448df3cbf89336d466f6259a777b2003c3a2a291d86a4f70a60f07cbfc0d
6
+ metadata.gz: f828b41e587cc7b98b0724079b42a0559321deef5dec4c76eb7a49be06587d7a7bf69ac682a7b6e494817b04f0d9649621c0be5fe032972ca5144f4b50cf790a
7
+ data.tar.gz: b34d32b2260ce4f7b79c48730c40c6f6dc4bf7bb27f0c9b1c0483a8fe6e9f480c342684d9741c2c8dc6d5a99856ba860714f60b9bf7054474dc15c9a6663edae
@@ -70,10 +70,6 @@ define 'aura/extensions/widget/lifecycleable', ->
70
70
 
71
71
  recyclable.super.constructor.call @, options
72
72
 
73
- # TODO think how to initialize widgets with elements out of dom
74
- if options?.el?.length and not @$el?.length
75
- @$el = options.el
76
-
77
73
  @initialized()
78
74
 
79
75
  inject: (name, options) ->
@@ -30,9 +30,10 @@ define ->
30
30
  @emit 'showed'
31
31
 
32
32
  render: (options) ->
33
- {widget, content: child} = options
34
- {sandbox, $el: el} = widget
35
- identifier = child.identifier || child.resource || 'default'
33
+ {widget, content: child} = options
34
+ {sandbox, $el: el} = widget
35
+ identifier = child.identifier || child.resource || 'default'
36
+ @initialization = sandbox.data.deferred()
36
37
 
37
38
  @el = el
38
39
 
@@ -53,18 +54,24 @@ define ->
53
54
  @positionate() if options.autoshow
54
55
 
55
56
  # TODO get identifier through sandbox method instead of generating here
56
- sandbox.once "#{child.name}.#{identifier}.started", (widget) =>
57
+
58
+ sandbox.once "#{child.name}.#{identifier}.started", (widget) ->
57
59
  el.removeClass 'injecting'
58
60
  @positionate()
59
61
 
60
62
  # TODO better close html creation and handling
61
63
  el.prepend @close_template if options.closable
64
+ , @
62
65
 
66
+ sandbox.once "#{child.name}.#{identifier}.initialized", (widget) ->
67
+ @initialization.resolveWith @
68
+ , @
63
69
 
64
70
  remove: ->
65
- @emit 'hide'
66
- @el.detach()
67
- @
71
+ @initialization.done ->
72
+ @emit 'hide'
73
+ @el.detach()
74
+ @
68
75
 
69
76
 
70
77
  type: 'Base'
data/lib/ende/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ende
2
- VERSION = "0.4.14"
2
+ VERSION = "0.4.15"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ende
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.14
4
+ version: 0.4.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Heitor Salazar