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 (from parent 1:
db04b1f
)
call popup with config parameters, MKWS-31
author
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 10 Jul 2013 15:12:35 +0000
(15:12 +0000)
committer
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 10 Jul 2013 15:12:35 +0000
(15:12 +0000)
tools/htdocs/mkws.js
patch
|
blob
|
history
diff --git
a/tools/htdocs/mkws.js
b/tools/htdocs/mkws.js
index
32b295b
..
c928f9c
100644
(file)
--- a/
tools/htdocs/mkws.js
+++ b/
tools/htdocs/mkws.js
@@
-902,8
+902,7
@@
jQuery.extend({
<div id="mkwsResults"></div>\
<div id="mkwsTargets"></div>\
<div id="mkwsStat"></div>\
<div id="mkwsResults"></div>\
<div id="mkwsTargets"></div>\
<div id="mkwsStat"></div>\
- </div>\
- <script> $(document).ready(function() { init_popup();}); </script>';
+ </div>'
if (config && config.layout == 'div') {
this.debug2("jquery plugin layout: div");
if (config && config.layout == 'div') {
this.debug2("jquery plugin layout: div");
@@
-911,6
+910,7
@@
jQuery.extend({
} else if (config && config.layout == 'popup') {
this.debug2("jquery plugin layout: popup");
document.write(popup);
} else if (config && config.layout == 'popup') {
this.debug2("jquery plugin layout: popup");
document.write(popup);
+ $(document).ready( function() { init_popup(config); } );
} else {
this.debug2("jquery plugin layout: table");
document.write(table);
} else {
this.debug2("jquery plugin layout: table");
document.write(table);
@@
-918,15
+918,16
@@
jQuery.extend({
}
});
}
});
-function init_popup(config) {
- if (!config)
- config = {};
+function init_popup(obj) {
+ var config = obj && obj.config ? obj.config : {};
var height = config.height || 760;
var width = config.width || 880;
var id_button = config.button || "input#mkwsButton";
var id_popup = config.popup || "#mkwsPopup";
var height = config.height || 760;
var width = config.width || 880;
var id_button = config.button || "input#mkwsButton";
var id_popup = config.popup || "#mkwsPopup";
+ debug("popup height: " + height + ", width: " + width);
+
$(id_popup).dialog({
closeOnEscape: true,
autoOpen: false,
$(id_popup).dialog({
closeOnEscape: true,
autoOpen: false,