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:
c200e1d
)
configurable popup window (width, height, submit button id, popup id)
author
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 10 Jul 2013 14:55:10 +0000
(14:55 +0000)
committer
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 10 Jul 2013 14:55:10 +0000
(14:55 +0000)
tools/htdocs/mkws.js
patch
|
blob
|
history
diff --git
a/tools/htdocs/mkws.js
b/tools/htdocs/mkws.js
index
4eb2f20
..
32b295b
100644
(file)
--- a/
tools/htdocs/mkws.js
+++ b/
tools/htdocs/mkws.js
@@
-919,11
+919,19
@@
jQuery.extend({
});
function init_popup(config) {
});
function init_popup(config) {
- $("#mkwsPopup").dialog({
+ if (!config)
+ config = {};
+
+ var height = config.height || 760;
+ var width = config.width || 880;
+ var id_button = config.button || "input#mkwsButton";
+ var id_popup = config.popup || "#mkwsPopup";
+
+ $(id_popup).dialog({
closeOnEscape: true,
autoOpen: false,
closeOnEscape: true,
autoOpen: false,
- height: 760,
- width: 880,
+ height: height,
+ width: width,
modal: true,
resizable: true,
buttons: {
modal: true,
resizable: true,
buttons: {
@@
-931,15
+939,13
@@
function init_popup(config) {
$(this).dialog("close");
}
},
$(this).dialog("close");
}
},
- close: function() {
- // allFields.val( "" ).removeClass( "ui-state-error" );
- }
+ close: function() { }
});
});
- $("input#mkwsButton")
+ $(id_button)
.button()
.click(function() {
.button()
.click(function() {
- $("#mkwsPopup").dialog("open");
+ $(id_popup).dialog("open");
});
};
});
};