From: Wolfram Schneider Date: Wed, 10 Jul 2013 14:11:46 +0000 (+0000) Subject: new jquery pazpar2 layout type "popup" X-Git-Tag: 0.9.1~282 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=7ff19fac0de6b47c36a44ec6b3e70d3a25a61ec3;hp=c48bcaf780c117e18ddc2454d0a5438350ac9d0c new jquery pazpar2 layout type "popup" --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index bac4ccb..12e2c92 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -897,9 +897,25 @@ jQuery.extend({ \ '; + var popup = '\ +
\ + \ + '; + if (config && config.layout == 'div') { this.debug2("jquery plugin layout: div"); document.write(div); + } else if (config && config.layout == 'popup') { + this.debug2("jquery plugin layout: popup"); + document.write(popup); } else { this.debug2("jquery plugin layout: table"); document.write(table); @@ -907,6 +923,31 @@ jQuery.extend({ } }); +function init_popup(config) { + $("#popup-form").dialog({ + closeOnEscape: true, + autoOpen: false, + height: 760, + width: 880, + modal: true, + resizable: true, + buttons: { + Cancel: function() { + $(this).dialog("close"); + } + }, + close: function() { + // allFields.val( "" ).removeClass( "ui-state-error" ); + } + }); + + $("input#mkwsButton") + .button() + .click(function() { + $("#popup-form").dialog("open"); + }); +}; + function debug(string) { if (!mkws_debug) return;