nifty-dialog 1.1.0 → 1.1.1

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: 94f066df26a586231cbedd7d4986e6ea9d0b6178
4
- data.tar.gz: 4d6857df30c08175a381e96dc5efcfc80b429663
3
+ metadata.gz: 4dbc4286daf06141a0ab59c26c864008d21f1c46
4
+ data.tar.gz: b385211dfa36019b2e99b1960dd45dc3da132743
5
5
  SHA512:
6
- metadata.gz: a127632d0ab5a6293c6f84839eae771bb3b49bf3f32cdad3f6865f18f28a23ae5548ab2b839868d17378811f5bf5ae126158dccb6362055d62a7562eb90f1b3d
7
- data.tar.gz: 7fc98d090a9bb77c28a5864ec6aef18f193753dbe0075aea41cc2c6fc0ae5f9ff5a52665fcd0f190ac9c25378123974515df25c89f0aa2c895e2248cf925ad90
6
+ metadata.gz: f4f0f9bf00a910ee2124519e77a973cc54530e8ab7bfe17b678b92d7f1b551fe68ee0c07538025f2939cd2b66fea1ab421c83fb3016153d7f489109a5af8ef5a
7
+ data.tar.gz: 2526a6fae0737d9f60b642c4865bead6b4416d883b9272759017af94a2b94ea7183283d48a685deba3aa09b3a382f097399db0477b39c16961397c2110c81e9d
@@ -1,5 +1,5 @@
1
1
  module Nifty
2
2
  module Dialog
3
- VERSION = '1.1.0'
3
+ VERSION = '1.1.1'
4
4
  end
5
5
  end
@@ -65,17 +65,21 @@ window.Nifty.Dialog =
65
65
  # if we have a width, set the width for the dialog
66
66
  if options.width?
67
67
  insertedDialog.css('width', "#{options.width}px")
68
- insertedDialog.css('margin-left', "-#{options.width / 2}px")
69
68
 
70
69
  if options.offset?
71
- insertedDialog.css('margin-top', "#{options.offset}px")
70
+ insertedDialog.css('top', "#{options.offset}px")
71
+ insertedDialog.css('left', "#{options.offset}px")
72
72
 
73
73
  if options.stack?
74
- x = parseInt(insertedDialog.css('margin-left'), 10) + (dialogsOpen * 20)
75
- y = parseInt(insertedDialog.css('margin-top'), 10) + (dialogsOpen * 30)
74
+ currentLeft = insertedDialog.css('left')
75
+ currentTop = insertedDialog.css('left')
76
+ currentLeft = 0 if currentLeft == 'auto'
77
+ currentTop = 0 if currentTop == 'auto'
78
+ x = parseInt(currentLeft, 10) + (dialogsOpen * 20)
79
+ y = parseInt(currentTop, 10) + (dialogsOpen * 30)
76
80
  insertedDialog.css
77
- 'margin-left': "#{x}px"
78
- 'margin-top': "#{y}px"
81
+ 'left': "#{x}px"
82
+ 'top': "#{y}px"
79
83
 
80
84
 
81
85
  # Set the closing action for the inserted dialog to close dialog
@@ -11,7 +11,6 @@ div.niftyOverlay {
11
11
  display:none;
12
12
  z-index:50;
13
13
  overflow-y: scroll;
14
-
15
14
  }
16
15
 
17
16
  //
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nifty-dialog
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cooke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-01 00:00:00.000000000 Z
11
+ date: 2015-01-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A javascript library for working with dialogs
14
14
  email: