nifty-dialog 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Nifty
2
2
  module Dialog
3
- VERSION = '1.0.1'
3
+ VERSION = '1.0.2'
4
4
  end
5
5
  end
@@ -27,6 +27,8 @@ window.Nifty.Dialog =
27
27
  #
28
28
  # offset => specifies a vertical offset (in px)
29
29
  #
30
+ # stack => adds an offset if this is not the first open dialog
31
+ #
30
32
  # class => the CSS class to assign to this dialog
31
33
  #
32
34
  # behavior => the name of a behavior set to be invoked on dialog open/close.
@@ -60,7 +62,15 @@ window.Nifty.Dialog =
60
62
 
61
63
  if options.offset?
62
64
  insertedDialog.css('margin-top', "#{options.offset}px")
63
-
65
+
66
+ if options.stack?
67
+ x = parseInt(insertedDialog.css('margin-left'), 10) + (dialogsOpen * 20)
68
+ y = parseInt(insertedDialog.css('margin-top'), 10) + (dialogsOpen * 30)
69
+ insertedDialog.css
70
+ 'margin-left': "#{x}px"
71
+ 'margin-top': "#{y}px"
72
+
73
+
64
74
  # Set the closing action for the inserted dialog to close dialog
65
75
  # and fade out the appropriate overlay
66
76
  insertedDialog.data 'closeAction', =>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nifty-dialog
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-22 00:00:00.000000000 Z
12
+ date: 2014-05-21 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A javascript library for working with dialogs
15
15
  email:
@@ -42,8 +42,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
42
  version: '0'
43
43
  requirements: []
44
44
  rubyforge_project:
45
- rubygems_version: 1.8.23
45
+ rubygems_version: 1.8.23.2
46
46
  signing_key:
47
47
  specification_version: 3
48
48
  summary: A javascript library for working with dialogs
49
49
  test_files: []
50
+ has_rdoc: