X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-jquery.js;h=41456529842ba32caf58e37e46f3414394e20a5a;hb=e32341fa8876fbada43f2a8b38bcc8e3c06d8f33;hp=41810ea3e9998c3bd28355aa95784990c827cc02;hpb=06a5000b8e0634e2475b4441b3231adcfd438529;p=mkws-moved-to-github.git diff --git a/src/mkws-jquery.js b/src/mkws-jquery.js index 41810ea..4145652 100644 --- a/src/mkws-jquery.js +++ b/src/mkws-jquery.js @@ -11,7 +11,7 @@ */ function _mkws_jquery_plugin($) { function debug(string) { - mkws.log("jquery.pazpar2: " + string); + mkws.log("jQuery.pazpar2: " + string); } function init_popup(obj) { @@ -39,9 +39,9 @@ function _mkws_jquery_plugin($) { modal: true, resizable: true, buttons: { - Cancel: function() { - $(this).dialog("close"); - } + Cancel: function() { + $(this).dialog("close"); + } }, close: function() { } }); @@ -49,7 +49,7 @@ function _mkws_jquery_plugin($) { $(id_button) .button() .click(function() { - $(id_popup).dialog("open"); + $(id_popup).dialog("open"); }); }; @@ -58,7 +58,7 @@ function _mkws_jquery_plugin($) { // service-proxy or pazpar2 pazpar2: function(config) { if (config == null || typeof config != 'object') { - config = {}; + config = {}; } var id_popup = config.id_popup || ".mkwsPopup"; id_popup = id_popup.replace(/^[#\.]/, ""); @@ -96,18 +96,18 @@ function _mkws_jquery_plugin($) { \ \
\ -
\ -
\ -
\ -
\ -
\ +
\ +
\ +
\ +
\ +
\
\ \ \ \ \
\ -
\ +
\
\ \ \ @@ -129,20 +129,21 @@ function _mkws_jquery_plugin($) { ' if (config && config.layout == 'div') { - debug("jquery plugin layout: div"); - document.write(div); + debug("jquery plugin layout: div"); + document.write(div); } else if (config && config.layout == 'popup') { - debug("jquery plugin layout: popup with id: " + id_popup); - document.write(popup); - $(document).ready(function() { init_popup(config); }); + debug("jquery plugin layout: popup with id: " + id_popup); + document.write(popup); + $(document).ready(function() { init_popup(config); }); } else { - debug("jquery plugin layout: table"); - document.write(table); + debug("jquery plugin layout: table"); + document.write(table); } } }); }; -// enable before page load, so we could call it before mkws() runs -_mkws_jquery_plugin(jQuery); +// XXX: enable before page load, so we could call it before mkws() runs +_mkws_jquery_plugin(mkws.$); +