ende 0.2.5 → 0.2.6
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 +4 -4
- data/lib/assets/javascripts/aura/extensions/models.js.coffee.erb +4 -0
- data/lib/assets/javascripts/aura/extensions/widget/lifecycleable.js.coffee +1 -0
- data/lib/assets/javascripts/widgets/content/main.js.coffee +1 -1
- data/lib/assets/javascripts/widgets/dialog/main.js.coffee +34 -12
- data/lib/ende/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c5f22303deda0bf4eb522b9bf6e309799b8a51a
|
4
|
+
data.tar.gz: c8b55c0a4273f6f3c43d2cda9d23a1e933868354
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5d009eab592c636d968638bae07e8518d08816c8c2b64207d505813213e904a10da50f723da6c94978ffc02e7995ced875fce6c61b87a4733dca816b24322a8
|
7
|
+
data.tar.gz: c4dae1bfb9bac7a152d605b31d0fa5ecf8480b44477323c1e6ddff863f6908005293e5d54d2eb5a1e6b00089f1de4e56558a7f6cbb96cc8db795d0533f90b385
|
@@ -20,6 +20,7 @@ end
|
|
20
20
|
|
21
21
|
%>
|
22
22
|
|
23
|
+
|
23
24
|
'use strict'
|
24
25
|
|
25
26
|
root = exports ? this
|
@@ -31,6 +32,9 @@ define 'aura/extensions/models', <%= models_list.to_json %>, (models...) ->
|
|
31
32
|
require 'indefinido-indemma/lib/extensions/rivets'
|
32
33
|
require 'indefinido-indemma/lib/record/rest'
|
33
34
|
require 'indefinido-indemma/lib/record/associable'
|
35
|
+
require 'indefinido-indemma/lib/record/storable'
|
36
|
+
require 'indefinido-indemma/lib/record/persistable'
|
37
|
+
require 'indefinido-indemma/lib/record/queryable'
|
34
38
|
require 'indefinido-indemma/lib/record/scopable'
|
35
39
|
require 'indefinido-indemma/lib/record/restfulable'
|
36
40
|
require 'indefinido-indemma/lib/record/resource'
|
@@ -28,7 +28,7 @@ define ->
|
|
28
28
|
@sandbox.once "content.#{@identifier}.load", @, @load
|
29
29
|
|
30
30
|
@$el.addClass "content"
|
31
|
-
@$el.attr 'id', @identifier
|
31
|
+
@$el.attr 'id', @identifier unless @$el.attr 'id'
|
32
32
|
load: ->
|
33
33
|
options = @sandbox.util._.omit @options, 'el', 'ref', '_ref', 'name', 'require', 'baseUrl'
|
34
34
|
options = $.extend {}, defaults, options
|
@@ -11,7 +11,7 @@ define ->
|
|
11
11
|
# overlay
|
12
12
|
if overlay
|
13
13
|
overlay.show()
|
14
|
-
@el.addClass '
|
14
|
+
@el.addClass 'modal'
|
15
15
|
|
16
16
|
# escapable
|
17
17
|
@escapable() if !overlay || overlay.closable
|
@@ -24,7 +24,7 @@ define ->
|
|
24
24
|
@emit 'showed'
|
25
25
|
|
26
26
|
render: (options) ->
|
27
|
-
{widget} = options
|
27
|
+
{widget, content: child} = options
|
28
28
|
{sandbox, $el: el} = widget
|
29
29
|
@el = el
|
30
30
|
|
@@ -32,10 +32,12 @@ define ->
|
|
32
32
|
|
33
33
|
sandbox.inject options.content
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
35
|
+
sandbox.once "#{child.name}.#{child.identifier || 'default'}.started", (widget) =>
|
36
|
+
|
37
|
+
el.find('.close').click (event) =>
|
38
|
+
@emit 'close'
|
39
|
+
@hide()
|
40
|
+
event.preventDefault()
|
39
41
|
|
40
42
|
type: 'Base'
|
41
43
|
|
@@ -46,6 +48,7 @@ define ->
|
|
46
48
|
autoshow: false
|
47
49
|
modal: false
|
48
50
|
closable: true
|
51
|
+
size: null
|
49
52
|
|
50
53
|
initialize: (options) ->
|
51
54
|
@sandbox.logger.log "initialized!"
|
@@ -57,13 +60,19 @@ define ->
|
|
57
60
|
|
58
61
|
widget_options = @extract_options()
|
59
62
|
@dialog = new dialog
|
60
|
-
widget: @,
|
63
|
+
widget: @, # TODO forward only element of the widget
|
61
64
|
autoshow: @options.autoshow
|
62
65
|
content: widget_options
|
63
66
|
|
67
|
+
# TODO forward only element of the widget
|
68
|
+
# sandbox: @sandbox
|
69
|
+
# el: @$el
|
70
|
+
|
71
|
+
|
64
72
|
@identifier = widget_options.name if @identifier == 'default'
|
65
73
|
@$el.attr 'id', 'dialog'
|
66
|
-
@$el.addClass
|
74
|
+
options.size && @$el.addClass options.size
|
75
|
+
|
67
76
|
|
68
77
|
# TODO update dialog and remove this code when issue
|
69
78
|
# https://github.com/component/dialog/issues/9 is fixed
|
@@ -78,18 +87,31 @@ define ->
|
|
78
87
|
@_overlay = o
|
79
88
|
|
80
89
|
|
81
|
-
|
82
|
-
@sandbox.on "modal.#{@identifier}.
|
90
|
+
# TODO add deprecation warning messages to modal commands
|
91
|
+
@sandbox.on "modal.#{@identifier}.show" , @dialog.show , @dialog
|
92
|
+
@sandbox.on "modal.#{@identifier}.hide" , @dialog.hide , @dialog
|
93
|
+
|
94
|
+
@sandbox.on "dialog.#{@identifier}.show" , @dialog.show , @dialog
|
95
|
+
@sandbox.on "dialog.#{@identifier}.hide" , @dialog.hide , @dialog
|
96
|
+
@sandbox.on "dialog.#{@identifier}.destroy" , @sandbox.stop , @sandbox
|
97
|
+
@dialog.on 'hide', => @sandbox.emit "dialog.#{@identifier}.hidden"
|
83
98
|
# @sandbox.on "modal.#{@identifier}.overlay", @dialog.overlay, @dialog
|
84
99
|
|
85
100
|
# TODO build a custom presenter for the widget?
|
86
101
|
# @presentation = presenter model
|
87
102
|
# @bind presentation
|
88
103
|
@sandbox.start()
|
89
|
-
@options.autoshow && @sandbox.emit "
|
104
|
+
@options.autoshow && @sandbox.emit "dialog.#{@identifier}.show"
|
105
|
+
|
106
|
+
stopped: ->
|
107
|
+
@dialog.on 'hide', =>
|
108
|
+
# TODO Remove when updating to aura 0.9
|
109
|
+
@$el.remove()
|
110
|
+
|
111
|
+
@dialog.hide()
|
90
112
|
|
91
113
|
extract_options: ->
|
92
|
-
options = _.omit @options, 'el', 'ref', '_ref', 'name', 'require', 'baseUrl'
|
114
|
+
options = _.omit @options, 'el', 'ref', '_ref', 'name', 'require', 'baseUrl', 'size'
|
93
115
|
|
94
116
|
dynamic_options = _.omit options, Object.keys(@constructor.__super__.options)
|
95
117
|
|
data/lib/ende/version.rb
CHANGED
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
|
+
version: 0.2.6
|
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
|
+
date: 2013-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|