X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=tools%2Fhtdocs%2Fmkws.js;h=c928f9c872e9b5a5b76c8b2835ea7c366f7aecd7;hb=625eb2222159cf2c5144e9df0e2277e9d4edb1cd;hp=32b295b8529ad870ec37417719f125d315f7c249;hpb=db04b1fad38881b8a042c392f9bbd0227b75a18d;p=mkws-moved-to-github.git diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 32b295b..c928f9c 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -902,8 +902,7 @@ jQuery.extend({
\
\
\ - \ - '; + ' 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); + $(document).ready( function() { init_popup(config); } ); } 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"; + debug("popup height: " + height + ", width: " + width); + $(id_popup).dialog({ closeOnEscape: true, autoOpen: false,