projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add test of commmnd=record with esn specified
[pazpar2-moved-to-github.git]
/
www
/
jsdemo
/
example_client.js
diff --git
a/www/jsdemo/example_client.js
b/www/jsdemo/example_client.js
index
9ce4740
..
8342494
100644
(file)
--- a/
www/jsdemo/example_client.js
+++ b/
www/jsdemo/example_client.js
@@
-1,5
+1,4
@@
/* A very simple client that shows a basic usage of the pz2.js
/* A very simple client that shows a basic usage of the pz2.js
-** $Id: example_client.js,v 1.6 2008-01-15 13:59:18 jakub Exp $
*/
// create a parameters array and pass it to the pz2's constructor
*/
// create a parameters array and pass it to the pz2's constructor
@@
-7,12
+6,14
@@
// autoInit is set to true on default
var usesessions = true;
var pazpar2path = '/pazpar2/search.pz2';
// 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/';
usesessions = false;
pazpar2path = '/service-proxy/';
+ showResponseType = 'json';
}
}
-my_paz = new pz2( { "onshow": my_onshow,
+var my_paz = new pz2( { "onshow": my_onshow,
"showtime": 500, //each timer (show, stat, term, bytarget) can be specified this way
"pazpar2path": pazpar2path,
"oninit": my_oninit,
"showtime": 500, //each timer (show, stat, term, bytarget) can be specified this way
"pazpar2path": pazpar2path,
"oninit": my_oninit,
@@
-21,7
+22,7
@@
my_paz = new pz2( { "onshow": my_onshow,
"termlist": "xtargets,subject,author",
"onbytarget": my_onbytarget,
"usesessions" : usesessions,
"termlist": "xtargets,subject,author",
"onbytarget": my_onbytarget,
"usesessions" : usesessions,
- "showResponseType": "json",
+ "showResponseType": showResponseType,
"onrecord": my_onrecord } );
// some state vars
var curPage = 1;
"onrecord": my_onrecord } );
// some state vars
var curPage = 1;
@@
-244,7
+245,7
@@
function drawPager (pagerDiv)
var prev = '<span id="prev"><< Prev</span><b> | </b>';
if (curPage > 1)
var prev = '<span id="prev"><< Prev</span><b> | </b>';
if (curPage > 1)
- var prev = '<a href="#" id="prev" onclick="pagerPrev();">'
+ prev = '<a href="#" id="prev" onclick="pagerPrev();">'
+'<< Prev</a><b> | </b>';
var middle = '';
+'<< Prev</a><b> | </b>';
var middle = '';
@@
-259,14
+260,14
@@
function drawPager (pagerDiv)
var next = '<b> | </b><span id="next">Next >></span>';
if (pages - curPage > 0)
var next = '<b> | </b><span id="next">Next >></span>';
if (pages - curPage > 0)
- var next = '<b> | </b><a href="#" id="next" onclick="pagerNext()">'
+ next = '<b> | </b><a href="#" id="next" onclick="pagerNext()">'
+'Next >></a>';
+'Next >></a>';
- predots = '';
+ var predots = '';
if (firstClkbl > 1)
predots = '...';
if (firstClkbl > 1)
predots = '...';
- postdots = '';
+ var postdots = '';
if (lastClkbl < pages)
postdots = '...';
if (lastClkbl < pages)
postdots = '...';