From d63d842aedbc1c8ce12b3efcfc986ea1c3b7ec2d Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Fri, 5 Dec 2008 17:46:45 +0100 Subject: [PATCH] Configurable length of termlist entries. Print max. 10 items for Subjects and Authors, and 16 items for Sources. --- www/jsdemo/example_client.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/www/jsdemo/example_client.js b/www/jsdemo/example_client.js index c1671e2..6a4be33 100644 --- a/www/jsdemo/example_client.js +++ b/www/jsdemo/example_client.js @@ -31,6 +31,9 @@ var curDetRecData = null; var curSort = 'relevance'; var curFilter = null; var submitted = false; +var SourceMax = 16; +var SubjectMax = 10; +var AuthorMax = 10; // // pz2.js event handlers: @@ -89,7 +92,7 @@ function my_onterm(data) { termlist.innerHTML = "
TERMLISTS:
"; termlist.innerHTML += '
.::Sources
'; - for (var i = 0; i < data.xtargets.length; i++ ) { + for (var i = 0; i < data.xtargets.length && i < SourceMax; i++ ) { termlist.innerHTML += '' @@ -102,7 +105,7 @@ function my_onterm(data) { termlist.innerHTML += "
"; termlist.innerHTML += '
.::Subjects
'; - for (var i = 0; i < data.subject.length; i++ ) { + for (var i = 0; i < data.subject.length && i < SubjectMax; i++ ) { termlist.innerHTML += '
' + data.subject[i].name + ' (' @@ -113,7 +116,7 @@ function my_onterm(data) { termlist.innerHTML += "
"; termlist.innerHTML += '
.::Authors
'; - for (var i = 0; i < data.author.length; i++ ) { + for (var i = 0; i < data.author.length && i < AuthorMax; i++ ) { termlist.innerHTML += '' + data.author[i].name + ' (' -- 1.7.10.4