server-generated-popups 1.4.6 → 1.4.7

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: aa77283b7bc2b244f3c595ff09168d1348b3bebf
4
- data.tar.gz: 50eca2cc10cd4d383d9380a19b61dd6416b76541
3
+ metadata.gz: b0fa18b47422da4617ef30b47b66fc8fa79b953e
4
+ data.tar.gz: 43577dfed727446d327a991a8bc75abc04605833
5
5
  SHA512:
6
- metadata.gz: 3c6bd8f90ab1b7a934edd46f16449b45e2049339d2d085ba92f49bd438b1a705b322f1f39ebde4324039e394111de2e489ff8e89b5ffc20b11912d277993cbd1
7
- data.tar.gz: 7b0eda5aaffbb7b96992139dfd800a45bdffd0189ebc4507ade6d0a40bb4f50e6908d662f76a7b905614e52588d6d72b0ab338f565b604ed00e9b22f5b87f20c
6
+ metadata.gz: f73b47e1bcc2553f82125a607a8be71179b7c7ef3efbb00478d38264597ec090383f54b0f4a0c4c7d766bc3f08e0a7431ec79834e77b9f67b9f25e83dc794b84
7
+ data.tar.gz: 6804aba78663d4a7f4e7c5d793d28c923e53233b051ca06b0ab9d4b9cf21326b655e5a5e3b30f193808c8bde20f3d16fd0b037b1a31cbe487329b970533c1c26
@@ -115,9 +115,12 @@
115
115
  // Slides the popup onto the screen.
116
116
  // Options: backdrop, closeButton, callback
117
117
  PopupClass.prototype.show = function (direction, callback) {
118
+ if (callback != undefined)
119
+ var callback = callback.bind(this, this.popupWindow)
120
+
118
121
  appendToBody(this.popupWindow)
119
122
  start = direction == 'up' ? 'below-screen' : 'above-screen'
120
- this.translate(start, this.distanceFromTop(), callback.bind(this, this.popupWindow))
123
+ this.translate(start, this.distanceFromTop(), callback)
121
124
 
122
125
  if (this.options.backdrop)
123
126
  this.showBackdrop()
data/demo/index.html CHANGED
@@ -8,7 +8,11 @@
8
8
  </head>
9
9
  <script type="text/javascript">
10
10
  $(document).ready(function () {
11
- Popup("<h2>Hello</h2><p>Did you notice that close button in the top-right corner? It comes with the lib too.</p>", {padding: '30px'}).show('up', function (popupWindow) { popupWindow.style.opacity = 0.7; })
11
+ Popup("<h2>Hello</h2><p>Did you notice that close button in the top-right corner? It comes with the lib too.</p>", {padding: '30px'}).show('up', function (popup) { popup.style.opacity = 0.6; })
12
+
13
+ setTimeout(function () {
14
+ Popup("<p>Popup</p>").show('up')
15
+ }, 200)
12
16
  });
13
17
  </script>
14
18
  <body>
@@ -12,6 +12,6 @@ Gem::Specification.new do |gem|
12
12
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
13
13
  gem.name = "server-generated-popups"
14
14
  gem.require_paths = ["lib"]
15
- gem.version = "1.4.6"
15
+ gem.version = "1.4.7"
16
16
  gem.license = 'MIT'
17
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: server-generated-popups
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.6
4
+ version: 1.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Khamets