From: Jakub Skoczen Date: Fri, 9 Apr 2010 13:41:59 +0000 (+0200) Subject: SP usage is configurable. X-Git-Tag: v1.4.0~42^2^2 X-Git-Url: http://git.indexdata.com/?p=pazpar2-moved-to-github.git;a=commitdiff_plain;h=555ce40e9d956821e2976288405937761bc7aac4 SP usage is configurable. If jsdemo is to be used in the in SP mode, append '#useproxy' to the URL SP mode requires no polling and supports JSON response types --- diff --git a/www/jsdemo/example_client.js b/www/jsdemo/example_client.js index 9ce4740..6c93157 100644 --- a/www/jsdemo/example_client.js +++ b/www/jsdemo/example_client.js @@ -7,9 +7,11 @@ // autoInit is set to true on default var usesessions = true; var pazpar2path = '/pazpar2/search.pz2'; -if (true || document.location.hash == '#nosessions') { +var showResponseType = ''; +if (document.location.hash == '#useproxy') { usesessions = false; pazpar2path = '/service-proxy/'; + showResponseType = 'json'; } my_paz = new pz2( { "onshow": my_onshow, @@ -21,7 +23,7 @@ my_paz = new pz2( { "onshow": my_onshow, "termlist": "xtargets,subject,author", "onbytarget": my_onbytarget, "usesessions" : usesessions, - "showResponseType": "json", + "showResponseType": showResponseType, "onrecord": my_onrecord } ); // some state vars var curPage = 1;