From 555ce40e9d956821e2976288405937761bc7aac4 Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Fri, 9 Apr 2010 15:41:59 +0200 Subject: [PATCH] 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 --- www/jsdemo/example_client.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 1.7.10.4