--- /dev/null
+<VirtualHost *:80>
+ ServerName x.example.indexdata.com
+ DocumentRoot /usr/local/src/git/mkws/examples/htdocs/
+ ErrorLog /var/log/apache2/mkws-examples-error.log
+ CustomLog /var/log/apache2/mkws-examples-access.log combined
+
+ ProxyPass /service-proxy-auth-mike http://mkws.indexdata.com/service-proxy/?command=auth&action=login&username=demo&password=demo
+ ProxyPassReverse /service-proxy-auth-mike http://mkws.indexdata.com/service-proxy/?command=auth&action=login&username=demo&password=demo
+</VirtualHost>
+
+<VirtualHost *:80>
+ ServerName x.mkws.indexdata.com
+ DocumentRoot /usr/local/src/git/mkws/tools/htdocs/
+ ErrorLog /var/log/apache2/mkws-tools-error.log
+ CustomLog /var/log/apache2/mkws-tools-access.log combined
+
+ Alias /libjs-pz2/ /usr/local/src/git/libjs-pz2/
+</VirtualHost>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MKWS demo: jQuery plugin</title>
+ <link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="http://mkws.indexdata.com/mkwsStyle.css" />
<script type="text/javascript" src="http://mkws.indexdata.com/mkws-complete.js"></script>
+ <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
</head>
<body>
- <script type="text/javascript">jQuery.pazpar2()</script>
+ <script type="text/javascript">
+ jQuery.pazpar2({
+ "layout": "popup", /* "table" [default], "div", "popup" */
+ "id_button": "input#mkwsButton", /* submit button id in search field */
+ "id_popup": "#mkwsPopup", /* internal id of popup window */
+ "width": 880, /* popup width, should be at least 800 */
+ "height": 760 /* popup height, should be at least 600 */
+ });
+ </script>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MKWS demo: Mike's playground</title>
- <link rel="stylesheet" type="text/css" href="../../tools/htdocs/mkwsStyle.css" />
+ <link rel="stylesheet" type="text/css" href="http://x.mkws.indexdata.com/mkwsStyle.css" />
<script type="text/javascript">
var mkws_config = {
responsive_design: true,
responsive_design_width: 600,
- switch_menu: true
+ switch_menu: true,
+ service_proxy_auth: "/service-proxy-auth-mike"
};
</script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.0.min.js"></script>
- <script type="text/javascript" src="http://mkws.indexdata.com/libjs-pz2/pz2api.1.js"></script>
- <script type="text/javascript" src="../../tools/htdocs/mkws.js"></script>
+ <script type="text/javascript" src="http://x.mkws.indexdata.com/libjs-pz2/pz2api.1.js"></script>
+ <script type="text/javascript" src="http://x.mkws.indexdata.com/mkws.js"></script>
</head>
<body>
- <div id="mkwsSwitch"></div><!-- ### does not work -->
+ <div id="mkwsSwitch"></div><!-- optional, must be enabled by switch_menu:true -->
<div id="mkwsLang"></div><!-- optional -->
<div id="mkwsSearch"></div><!-- MANDATORY -->
<div id="mkwsResults"></div><!-- MANDATORY but components may be used -->
RewriteLogLevel 1
RewriteLog /var/log/apache2/mkws-rewrite.log
RewriteRule /service-proxy-auth /service-proxy/?command=auth&action=login&username=demo&password=demo [P] # [NE,P]
+ RewriteRule /service-proxy/%3F /service-proxy/? [P] # [NE,P]
Header set Access-Control-Allow-Credentials true
mkws-js ${MKWS_JS}: pz2api-check ${PZ2API_JS} mkws.js
( echo "/* created at: $$(date)"; \
echo " mkws.js GIT id: $$(git log mkws.js | head -n 1 | perl -npe 's,\S+\s+,,') */"; \
- curl -sSf ${JQUERY_URL}; \
+ curl -sSf ${JQUERY_URL} | perl -npe 's,sourceMappingURL=jquery.*map,,'; \
cat ../../../libjs-pz2/pz2api.1.js mkws.js ) > ${MKWS_JS}.new
mv -f ${MKWS_JS}.new ${MKWS_JS}
- The search page is fully configurable by a JSON object
+Checklist before doing a release
+---------------------------------
+- open the site, e.g. http://mkws-dev.indexdata.com/index-mike.html
+- open the debug/error console in your browser (alt-cmd-J, shift-cmd-J)
+- check the language links ("de", "da", "en")
+- run a search with few, but not to few results, e.g.: freebsd
+- check "Targets" | "Records" links
+- check "Next" and "Prev" links
+- click on the first hit and display details, click on an "URL" to jump to
+ the local catalog or full text
+- limit search to a "Source"
+- limit search to an "Author"
+- sort results by "Title" and "newest"
+- what else?
+
+
+
What next?
----------
debug("Run service proxy auth URL: " + auth_url);
- var request = new pzHttpRequest(auth_url);
+ var request = new pzHttpRequest(auth_url, function(err) {
+ alert("HTTP call for authentication failed: " + err)
+ return;
+ });
request.get(null, function(data) {
if (!$.isXMLDoc(data)) {
alert("service proxy auth response document is not valid XML document, give up!");
// service-proxy or pazpar2
pazpar2: function(config) {
+ var id_popup = config.id_popup || "#mkwsPopup";
+ id_popup = id_popup.replace(/^#/, "");
+
// simple layout
var div = '<div id="mkwsSwitch"></div>\
<div id="mkwsLang"></div>\
var popup = '\
<div id="mkwsSearch"></div>\
- <div id="mkwsPopup">\
+ <div id="' + id_popup + '">\
<div id="mkwsSwitch"></div>\
<div id="mkwsLang"></div>\
<div id="mkwsResults"></div>\
this.debug2("jquery plugin layout: div");
document.write(div);
} else if (config && config.layout == 'popup') {
- this.debug2("jquery plugin layout: popup");
+ this.debug2("jquery plugin layout: popup with id: " + id_popup);
document.write(popup);
$(document).ready( function() { init_popup(config); } );
} else {
var height = config.height || 760;
var width = config.width || 880;
- var id_button = config.button || "input#mkwsButton";
- var id_popup = config.popup || "#mkwsPopup";
+ var id_button = config.id_button || "input#mkwsButton";
+ var id_popup = config.id_popup || "#mkwsPopup";
debug("popup height: " + height + ", width: " + width);
+ // make sure that jquery-ui was loaded afte jQuery core lib, e.g.:
+ // <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
+ if (!$.ui) {
+ debug("Error: jquery-ui.js is missing, did you included it after jquery core in the HTML file?");
+ return;
+ }
+
$(id_popup).dialog({
closeOnEscape: true,
autoOpen: false,