projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d05e75e
)
support multiple popup windows
author
Wolfram Schneider
<wosch@indexdata.dk>
Thu, 10 Jul 2014 09:11:28 +0000
(09:11 +0000)
committer
Wolfram Schneider
<wosch@indexdata.dk>
Thu, 10 Jul 2014 09:11:28 +0000
(09:11 +0000)
src/mkws-popup.js
patch
|
blob
|
history
diff --git
a/src/mkws-popup.js
b/src/mkws-popup.js
index
153425b
..
f5b0550
100644
(file)
--- a/
src/mkws-popup.js
+++ b/
src/mkws-popup.js
@@
-23,22
+23,25
@@
$(document).ready(function () {
debug("found popup windows: " + popup.length);
}
debug("found popup windows: " + popup.length);
}
- var width = parseInt($(popup).attr("popup_width") || "800");
- var height = parseInt($(popup).attr("popup_height") || "600");
- var autoOpen = parseInt($(popup).attr("popup_autoOpen") || "0");
+ $(popup).each(function (i) {
+ var width = parseInt(this.attr("popup_width") || "800");
+ var height = parseInt(this.attr("popup_height") || "600");
+ var autoOpen = parseInt(this.attr("popup_autoOpen") || "0");
- $(popup).dialog({
- closeOnEscape: true,
- autoOpen: autoOpen,
- height: height,
- width: width,
- modal: true,
- resizable: true,
- buttons: {
- Cancel: function () {
- $(popup).dialog("close");
- }
- },
- close: function () {}
+ debug("Popup parameters: width: " + width + ", height: " + height + ", autoOpen: " + autoOpen);
+ $(this).dialog({
+ closeOnEscape: true,
+ autoOpen: autoOpen,
+ height: height,
+ width: width,
+ modal: true,
+ resizable: true,
+ buttons: {
+ Cancel: function () {
+ $(this).dialog("close");
+ }
+ },
+ close: function () {}
+ });
});
});
});
});