ende 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c5f22303deda0bf4eb522b9bf6e309799b8a51a
4
- data.tar.gz: c8b55c0a4273f6f3c43d2cda9d23a1e933868354
3
+ metadata.gz: a43d1f2847080ff697b021741b23c5e8f70a2d2d
4
+ data.tar.gz: e95635f01eef3bbd4a12c3e8ebc567d4166a390c
5
5
  SHA512:
6
- metadata.gz: b5d009eab592c636d968638bae07e8518d08816c8c2b64207d505813213e904a10da50f723da6c94978ffc02e7995ced875fce6c61b87a4733dca816b24322a8
7
- data.tar.gz: c4dae1bfb9bac7a152d605b31d0fa5ecf8480b44477323c1e6ddff863f6908005293e5d54d2eb5a1e6b00089f1de4e56558a7f6cbb96cc8db795d0533f90b385
6
+ metadata.gz: 9d61938ca51a95be7a1f48ccae19e85644bbdbcbc9f85b5689966864f0962c5aba93471d886a46c2b785803538566d59d77cab913d96ee8c8879321ba1f66023
7
+ data.tar.gz: f9f8a934fe14328409c26e0065f3bd76e8d5cc5fa4f99e494471e56e2ac2edb2525543c60237201eb3ded8ee88f4f10ef3e07a5463f17be996b4164d4e4fd793
@@ -3,6 +3,9 @@
3
3
  define ->
4
4
 
5
5
  dialog_extensions =
6
+ positionate: ->
7
+ @el.css marginLeft: -(this.el.width() / 2) + 'px'
8
+
6
9
  show: ->
7
10
  @emit 'show'
8
11
 
@@ -19,7 +22,7 @@ define ->
19
22
  # position
20
23
  @el.removeClass 'hide'
21
24
  @el.appendTo 'body'
22
- @el.css marginLeft: -(this.el.width() / 2) + 'px'
25
+ @positionate()
23
26
 
24
27
  @emit 'showed'
25
28
 
@@ -33,6 +36,7 @@ define ->
33
36
  sandbox.inject options.content
34
37
 
35
38
  sandbox.once "#{child.name}.#{child.identifier || 'default'}.started", (widget) =>
39
+ @positionate()
36
40
 
37
41
  el.find('.close').click (event) =>
38
42
  @emit 'close'
@@ -49,6 +53,7 @@ define ->
49
53
  modal: false
50
54
  closable: true
51
55
  size: null
56
+ theme: null
52
57
 
53
58
  initialize: (options) ->
54
59
  @sandbox.logger.log "initialized!"
@@ -72,6 +77,7 @@ define ->
72
77
  @identifier = widget_options.name if @identifier == 'default'
73
78
  @$el.attr 'id', 'dialog'
74
79
  options.size && @$el.addClass options.size
80
+ options.theme && @$el.addClass options.theme
75
81
 
76
82
 
77
83
  # TODO update dialog and remove this code when issue
@@ -111,7 +117,7 @@ define ->
111
117
  @dialog.hide()
112
118
 
113
119
  extract_options: ->
114
- options = _.omit @options, 'el', 'ref', '_ref', 'name', 'require', 'baseUrl', 'size'
120
+ options = _.omit @options, 'el', 'ref', '_ref', 'name', 'require', 'baseUrl', 'theme'
115
121
 
116
122
  dynamic_options = _.omit options, Object.keys(@constructor.__super__.options)
117
123
 
@@ -4,10 +4,11 @@ define ->
4
4
 
5
5
  type: 'Base'
6
6
 
7
- version: '0.1.0'
7
+ version: '0.1.2'
8
8
 
9
9
  initialize: (options) ->
10
10
  names = []
11
+ {identifier} = options
11
12
 
12
13
  # TODO access omit method throuhgh underscore
13
14
  widget_options = _.omit options, 'el', 'ref', '_ref', 'name', 'require', 'baseUrl'
@@ -19,8 +20,13 @@ define ->
19
20
 
20
21
  @$el.addClass ['tray', 'widget'].concat(names).join(' ')
21
22
 
22
- # TODO find a way to build the id based on content
23
- @$el.attr 'id', options.identifier if options.identifier?
23
+ @identifier = options.identifier
24
+ # TODO find a way to build the id beased on content
25
+ if identifier?
26
+ @identifier = identifier
27
+ @$el.attr 'id', identifier
28
+
29
+ @sandbox.start()
24
30
 
25
31
  add: (name, options) ->
26
32
 
data/lib/ende/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ende
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
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.6
4
+ version: 0.2.7
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-12-02 00:00:00.000000000 Z
11
+ date: 2013-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler