server-generated-popups 1.4.6 → 1.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/popup.js +4 -1
- data/demo/index.html +5 -1
- data/server-generated-popups.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0fa18b47422da4617ef30b47b66fc8fa79b953e
|
4
|
+
data.tar.gz: 43577dfed727446d327a991a8bc75abc04605833
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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 (
|
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>
|