ende 0.3.10 → 0.3.11

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: ca61eeee757b0fd079334ea1ec7d77db468fa657
4
- data.tar.gz: fb597842cbf0a8f65adb036a3dc5006897715aac
3
+ metadata.gz: 651a1f0a7bf111187f08f0eeab0f48b2a566d908
4
+ data.tar.gz: 7ee2ab2f06f2adaf262962166e4a2117593dc06b
5
5
  SHA512:
6
- metadata.gz: 196c7c1d796ae8273fc8a171e0eb9bbd202a239fd7d6551571e52551a7597f3a3c29463bed5f8568426c72963cab0bcdc913a918d0984f7fe8c3eede4e5694f6
7
- data.tar.gz: 5bd4e5d9e4f4b1d6d31642eab8193d6d4ef22aa3683517e1a4efe45f447175a652b221a87552a2ad64d96b92f83144b0df7277d6085978bf9e34b6887b5ad72b
6
+ metadata.gz: 2fc675100ab3df6bc3d1f53795caba3baa5221e18deea33410e8e480e38ecac4c8b369a04d920c09859b89e344db495afa5b4e6559f1e72a13b7b550e7dc36d3
7
+ data.tar.gz: 8cd7cdff7a658afe0a2fad0156362c982fd439973df268e22508e40049ec10934a6a6d4d0bec3a062f58c8fe22fcc9e1e0515ae2d0322748af50253b59c443fe
@@ -22,6 +22,7 @@ end
22
22
 
23
23
  'use strict'
24
24
 
25
+
25
26
  root = exports ? this
26
27
 
27
28
  define 'aura/extensions/models', <%= models_list.to_json %>, (models...) ->
@@ -74,6 +74,9 @@ define 'aura/extensions/widget/lifecycleable', ->
74
74
  core.inject name, options
75
75
 
76
76
  initialized: ->
77
+ # TODO think how to access parent widget in children ones
78
+ @sandbox._widget ||= @
79
+
77
80
  @sandbox.emit "#{@name}.#{@identifier}.initialized", @
78
81
 
79
82
  started: ->
@@ -83,6 +86,7 @@ define 'aura/extensions/widget/lifecycleable', ->
83
86
  stopped: ->
84
87
  @$el.remove()
85
88
 
89
+
86
90
  (application) ->
87
91
 
88
92
  version: '0.2.0'
@@ -20,7 +20,7 @@ define ->
20
20
 
21
21
  @$el.addClass ['tray', 'widget'].concat(names).join(' ')
22
22
 
23
- @identifier = options.identifier
23
+ @identifier ||= identifier
24
24
 
25
25
  # TODO find a way to build the id based on content
26
26
  if identifier?
@@ -129,7 +129,7 @@ define [
129
129
  viewed: (event, in_view, horizontal, vertical) ->
130
130
  boo[if in_view then 'pride' else 'shame'] event.target
131
131
 
132
- version: '0.2.1'
132
+ version: '0.2.2'
133
133
 
134
134
  # TODO better separation of concerns
135
135
  # TODO Current remote page that is beign displayed
@@ -160,8 +160,16 @@ define [
160
160
  # We extend presentation.selected just to assign all values of the item model
161
161
  # TODO call presenter to do this job
162
162
  @sandbox.util.extend @presentation.selected , item.model.json?() || item.model
163
+
164
+ # TODO change paramters to item, item.model
163
165
  @sandbox.emit "viewer.#{@identifier}.selected", item.model
164
166
 
167
+ # Called when hover in and out from model
168
+ hover: (item) ->
169
+ # TODO call presenter to do this job
170
+ # @sandbox.util.extend @presentation.hovered , item.model.json?() || item.model
171
+ @sandbox.emit "viewer.#{@identifier}.hovered", item, item && item.model
172
+
165
173
  scope_to: (scope, child_scope) ->
166
174
  # Singuralize in order to accept association scopes, since
167
175
  # association scopes return almost the same kind as of it's
@@ -313,6 +321,7 @@ define [
313
321
  # TODO move this method to an extension
314
322
  syncronize_children: ->
315
323
  @sandbox._children ||= []
324
+ @sandbox._widget ||= @
316
325
 
317
326
  # Add possible new childs
318
327
  @constructor.startAll(@$el).done (widgets...) =>
@@ -322,6 +331,12 @@ define [
322
331
 
323
332
  @sandbox._children = @sandbox._children.concat widgets
324
333
 
334
+ for widget in widgets
335
+ # TODO emit this event only when all siblings have initialized
336
+ @sandbox.emit "#{widget.name}.#{widget.identifier}.siblings_initialized", @sandbox._children
337
+
338
+ true
339
+
325
340
  # TODO better internal aura widget selection
326
341
  # Prevent other child to be instantiated
327
342
  @$el.find('[data-aura-widget]').each (i, element) ->
@@ -429,8 +444,17 @@ define [
429
444
  ], (custom_default_template, custom_presenter) =>
430
445
 
431
446
  # TODO Better way to preserve widgets handlers
447
+ # TODO Move each handler to independent features
432
448
  handlers =
433
449
  item:
450
+ hover: (event, models) =>
451
+ if event.type == 'mouseenter'
452
+ @hover models.item
453
+ else if event.type == 'mouseleave'
454
+ @hover null
455
+ else
456
+ throw new TypeError 'viewer.handlers.hover: Event type incompatible with hovering.'
457
+
434
458
  clicked: (event, models) =>
435
459
  @select models.item
436
460
 
data/lib/ende/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ende
2
- VERSION = "0.3.10"
2
+ VERSION = "0.3.11"
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.3.10
4
+ version: 0.3.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Heitor Salazar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-24 00:00:00.000000000 Z
11
+ date: 2014-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler