From 45bc01cc5069651f637f945345c638dab87dad71 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sat, 7 Feb 2009 13:55:11 +0100 Subject: angstrom feed browser: reindent --- contrib/feed-browser/scripts/js/repo.js | 129 ++++++++++++++++---------------- 1 file changed, 65 insertions(+), 64 deletions(-) diff --git a/contrib/feed-browser/scripts/js/repo.js b/contrib/feed-browser/scripts/js/repo.js index 95b36f3935..edd1fd503e 100644 --- a/contrib/feed-browser/scripts/js/repo.js +++ b/contrib/feed-browser/scripts/js/repo.js @@ -26,104 +26,105 @@ qsParm['pkgname'] = null; function qs() { - var query = window.location.search.substring(1); - var parms = query.split('&'); - for (var i=0; i 0) { - var key = parms[i].substring(0,pos); - var val = parms[i].substring(pos+1); - qsParm[key] = val; - } - } - if (qsParm['pkgsearch']) { - document.getElementById('pkgsearch').value = qsParm['pkgsearch']; - pkgQuery(); - } - if (qsParm['pkgname']) { - document.getElementById('pkgsearch').value = qsParm['pkgname']; - pkgQuery(); - } - if (qsParm['section']) { - pkgQuery(); - } - + var query = window.location.search.substring(1); + var parms = query.split('&'); + for (var i=0; i 0) { + var key = parms[i].substring(0,pos); + var val = parms[i].substring(pos+1); + qsParm[key] = val; + } + } + if (qsParm['pkgsearch']) { + document.getElementById('pkgsearch').value = qsParm['pkgsearch']; + pkgQuery(); + } + if (qsParm['pkgname']) { + document.getElementById('pkgsearch').value = qsParm['pkgname']; + pkgQuery(); + } + if (qsParm['section']) { + pkgQuery(); + } + } function pkgQuery() { var action = 'pkgquery'; - var params = ''; - - if (qsParm['pkgname']) { - action = 'pkgname'; - params = '&pkgname=' + qsParm['pkgname']; - } - - if (document.getElementById('pkgsearch').value != "") { - params = params + '&pkgsearch=' + document.getElementById('pkgsearch').value; - } else { - if (qsParm['pkgsearch']) { - params = params + '&pkgsearch=' + qsParm['pkgsearch']; - } - } - if (qsParm['arch']) { - params = params + '&arch=' + qsParm['arch']; - qsParm['arch'] = null; - } - if (qsParm['section']) { - action = 'section'; - params = params + '§ion=' + qsParm['section']; - qsParm['section'] = null; - } - - params = '&action=' + action + params; - - queryHTTP.open('post', 'section.php'); + var params = ''; + + if (qsParm['pkgname']) { + action = 'pkgname'; + params = '&pkgname=' + qsParm['pkgname']; + qsParm['pkgname'] = null; + } + + if (document.getElementById('pkgsearch').value != "") { + params = params + '&pkgsearch=' + document.getElementById('pkgsearch').value; + } else { + if (qsParm['pkgsearch']) { + params = params + '&pkgsearch=' + qsParm['pkgsearch']; + } + } + if (qsParm['arch']) { + params = params + '&arch=' + qsParm['arch']; + qsParm['arch'] = null; + } + if (qsParm['section']) { + action = 'section'; + params = params + '§ion=' + qsParm['section']; + qsParm['section'] = null; + } + + params = '&action=' + action + params; + + queryHTTP.open('post', 'section.php'); queryHTTP.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); - queryHTTP.onreadystatechange = queryProgress; + queryHTTP.onreadystatechange = queryProgress; queryHTTP.send(params); - + } function getLetter() { var params = 'action=searchletter'; - http.open('post', 'section.php'); + http.open('post', 'section.php'); http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); - http.onreadystatechange = letterProgress; + http.onreadystatechange = letterProgress; http.send(params); - + } function getSection() { var params = 'action=sectionslist'; - sectionHTTP.open('post', 'section.php'); + sectionHTTP.open('post', 'section.php'); sectionHTTP.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); - sectionHTTP.onreadystatechange = sectionProgress; + sectionHTTP.onreadystatechange = sectionProgress; sectionHTTP.send(params); - + } function letterProgress() { if(http.readyState == 4){ - var response = http.responseText; - document.getElementById('searchletter').innerHTML = response; + var response = http.responseText; + document.getElementById('searchletter').innerHTML = response; } } function sectionProgress() { if(sectionHTTP.readyState == 4){ - var response = sectionHTTP.responseText; - document.getElementById('sectionslist').innerHTML = response; + var response = sectionHTTP.responseText; + document.getElementById('sectionslist').innerHTML = response; } } function queryProgress() { - document.getElementById('opkgoutput').innerHTML = "loading, please wait"; + document.getElementById('opkgoutput').innerHTML = "loading, please wait"; if(queryHTTP.readyState == 4){ - var response = queryHTTP.responseText; - document.getElementById('opkgoutput').innerHTML = response; + var response = queryHTTP.responseText; + document.getElementById('opkgoutput').innerHTML = response; } } -- cgit v1.2.3