function my_onshow(data) {
totalRec = data.merged;
-
// move it out
var pager = document.getElementById("pager");
pager.innerHTML = "";
-
pager.innerHTML +='<hr/><div style="float: right">Displaying: '
+ data.start + ' to ' + (data.start + data.num) +
' of ' + data.merged + ' (found: '
+ data.total + ')</div>';
drawPager(pager);
-
// navi
var results = document.getElementById("results");
results.innerHTML = "";
for (var i = 0; i < data.hits.length; i++) {
var hit = data.hits[i];
- var html = '<div class="record" id="rec_' + hit.recid
- + '" onclick="showDetails(this.id);return false;">'
- +'<span>' + (i + 1 + recPerPage * ( curPage - 1)) + '. </span>'
- +'<a href="#"><b>' + hit["md-title"] +
- ' </b></a>';
+ var html = '<div class="record" id="recdiv_'+hit.recid+'" >'
+ +'<span>'+ (i + 1 + recPerPage * (curPage - 1)) +'. </span>'
+ +'<a href="#" id="rec_'+hit.recid
+ +'" onclick="showDetails(this.id);return false;"><b>'
+ + hit["md-title"] +' </b></a>';
if (hit["md-title-remainder"] !== undefined) {
html += '<span>' + hit["md-title-remainder"] + ' </span>';
}
if (hit["md-title-responsibility"] !== undefined) {
- html += '<span><i>' + hit["md-title-responsibility"] + '</i></span>';
+ html += '<span><i>'+ hit["md-title-responsibility"] +'</i></span>';
}
html += '</div>';
results.innerHTML += html;
- if ( hit.recid == curDetRecId ) {
+ if (hit.recid == curDetRecId) {
drawCurDetails();
}
}
-
}
function my_onstat(data) {
var detRecordDiv = document.getElementById('det_'+data.recid);
if ( detRecordDiv )
return;
-
curDetRecData = data;
drawCurDetails();
}
function my_onbytarget(data) {
var targetDiv = document.getElementById("bytarget");
- var table = '<table><thead><tr><td>Target ID</td><td>Hits</td><td>Diags</td>'
- +'<td>Records</td><td>State</td></tr></thead><tbody>';
+ var table ='<table><thead><tr><td>Target ID</td><td>Hits</td><td>Diags</td>'
+ +'<td>Records</td><td>State</td></tr></thead><tbody>';
for (var i = 0; i < data.length; i++ ) {
table += "<tr><td>" + data[i].id +
- "</td><td>" + data[i].hits +
- "</td><td>" + data[i].diagnostic +
- "</td><td>" + data[i].records +
- "</td><td>" + data[i].state + "</td></tr>";
+ "</td><td>" + data[i].hits +
+ "</td><td>" + data[i].diagnostic +
+ "</td><td>" + data[i].records +
+ "</td><td>" + data[i].state + "</td></tr>";
}
table += '</tbody></table>';
targetDiv.innerHTML = table;
-
}
////////////////////////////////////////////////////////////////////////////////
function drawCurDetails ()
{
var data = curDetRecData;
- var recordDiv = document.getElementById('rec_'+data.recid);
+ var recordDiv = document.getElementById('recdiv_'+data.recid);
var details = "";
if (data["md-title"] != undefined)
details += '<tr><td><b>Ttle</b></td><td><b>:</b> '+data["md-title"] + '</td></tr>';
if (data["md-author"] != undefined)
details += '<tr><td><b>Author</b></td><td><b>:</b> ' + data["md-author"] + '</td></tr>';
if (data["md-electronic-url"] != undefined)
- details += '<tr><td><b>URL</b></td><td><b>:</b> <a href="' + data["md-electronic-url"] + '">' + data["md-electronic-url"] + '</a>' + '</td></tr>';
+ details += '<tr><td><b>URL</b></td><td><b>:</b> <a href="' + data["md-electronic-url"] + '" target="_blank">' + data["md-electronic-url"] + '</a>' + '</td></tr>';
if (data["location"][0]["md-subject"] != undefined)
details += '<tr><td><b>Subject</b></td><td><b>:</b> ' + data["location"][0]["md-subject"] + '</td></tr>';
if (data["location"][0]["@name"] != undefined)