From 7ff19fac0de6b47c36a44ec6b3e70d3a25a61ec3 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Wed, 10 Jul 2013 14:11:46 +0000 Subject: [PATCH] new jquery pazpar2 layout type "popup" --- tools/htdocs/mkws.js | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) 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; -- 1.7.10.4