summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2009-02-07 13:55:11 +0100
committerKoen Kooi <koen@openembedded.org>2009-02-07 13:55:11 +0100
commit45bc01cc5069651f637f945345c638dab87dad71 (patch)
tree76db8ba4463dc675db38edcd1aab00189027d6c4
parentadc8f713b4c5a6e552e955b85d5840c0add73871 (diff)
angstrom feed browser: reindent
-rw-r--r--contrib/feed-browser/scripts/js/repo.js129
1 files 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<parms.length; i++) {
- var pos = parms[i].indexOf('=');
- if (pos > 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<parms.length; i++) {
+ var pos = parms[i].indexOf('=');
+ if (pos > 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 + '&section=' + 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 + '&section=' + 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;
}
}