From 5cf6caebcc8be1c26f21586286a2447571fc36f6 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 19 Jun 2013 10:54:05 +0100 Subject: [PATCH] Remove trailing ws. --- experiments/spclient/mkws.js | 60 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js index 35f3490..82b0d50 100644 --- a/experiments/spclient/mkws.js +++ b/experiments/spclient/mkws.js @@ -41,22 +41,22 @@ function my_onshow(data) { // move it out var pager = document.getElementById("pager"); pager.innerHTML = ""; - pager.innerHTML +='
Displaying: ' + pager.innerHTML +='
Displaying: ' + (data.start + 1) + ' to ' + (data.start + data.num) + - ' of ' + data.merged + ' (found: ' + ' of ' + data.merged + ' (found: ' + data.total + ')
'; drawPager(pager); // navi var results = document.getElementById("results"); - + var html = []; for (var i = 0; i < data.hits.length; i++) { var hit = data.hits[i]; html.push('
' +''+ (i + 1 + recPerPage * (curPage - 1)) +'. ' +'' - + hit["md-title"] +' '); + +'" onclick="showDetails(this.id);return false;">' + + hit["md-title"] +' '); if (hit["md-title-remainder"] !== undefined) { html.push('' + hit["md-title-remainder"] + ' '); } @@ -75,7 +75,7 @@ function my_onstat(data) { var stat = document.getElementById("stat"); if (stat == null) return; - + stat.innerHTML = 'STATUS INFO -- Active clients: ' + data.activeclients + '/' + data.clients + ' -- ' @@ -88,22 +88,22 @@ function my_onterm(data) { termlists.push('
TERMLISTS:
Sources
'); for (var i = 0; i < data.xtargets.length && i < SourceMax; i++ ) { termlists.push('' + data.xtargets[i].name + + ' onclick="limitTarget(this.getAttribute(\'target_id\'), this.firstChild.nodeValue);return false;">' + data.xtargets[i].name + ' (' + data.xtargets[i].freq + ')
'); } - + termlists.push('
Subjects
'); for (var i = 0; i < data.subject.length && i < SubjectMax; i++ ) { - termlists.push('' + data.subject[i].name + ' (' + termlists.push('' + data.subject[i].name + ' (' + data.subject[i].freq + ')
'); } - + termlists.push('
Authors
'); for (var i = 0; i < data.author.length && i < AuthorMax; i++ ) { - termlists.push('' - + data.author[i].name - + ' (' - + data.author[i].freq + termlists.push('' + + data.author[i].name + + ' (' + + data.author[i].freq + ')
'); } var termlist = document.getElementById("termlist"); @@ -126,7 +126,7 @@ function my_onbytarget(data) { var targetDiv = document.getElementById("bytarget"); var table ='' +''; - + for (var i = 0; i < data.length; i++ ) { table += "
Target IDHitsDiagsRecordsState
" + data[i].id + "" + data[i].hits + @@ -143,8 +143,8 @@ function my_onbytarget(data) { //////////////////////////////////////////////////////////////////////////////// // wait until the DOM is ready -function domReady () -{ +function domReady () +{ document.search.onsubmit = onFormSubmitEventHandler; document.search.query.value = ''; document.select.sort.onchange = onSelectDdChange; @@ -152,7 +152,7 @@ function domReady () } // when search button pressed -function onFormSubmitEventHandler() +function onFormSubmitEventHandler() { resetPage(); loadSelect(); @@ -198,7 +198,7 @@ function limitQuery (field, value) function limitTarget (id, name) { var navi = document.getElementById('navi'); - navi.innerHTML = + navi.innerHTML = 'Source: ' + name + ''; navi.innerHTML += '
'; @@ -213,7 +213,7 @@ function delimitTarget () { var navi = document.getElementById('navi'); navi.innerHTML = ''; - curFilter = null; + curFilter = null; resetPage(); loadSelect(); triggerSearch(); @@ -225,8 +225,8 @@ function drawPager (pagerDiv) //client indexes pages from 1 but pz2 from 0 var onsides = 6; var pages = Math.ceil(totalRec / recPerPage); - - var firstClkbl = ( curPage - onsides > 0 ) + + var firstClkbl = ( curPage - onsides > 0 ) ? curPage - onsides : 1; @@ -248,7 +248,7 @@ function drawPager (pagerDiv) middle += ' ' + numLabel + ' '; } - + var next = ' | Next >>'; if (pages - curPage > 0) next = ' |
", { href: '#', onclick: "switchView(\'records\')", text: "Record Browser", -- 1.7.10.4