Linted playlist.js

This commit is contained in:
Anders Betnér 2006-03-26 21:24:20 +00:00
parent d662654f35
commit 31b142bef6
1 changed files with 13 additions and 4 deletions

View File

@ -33,7 +33,7 @@ var Search = {
this.timeOut = window.setTimeout(EventHandler.search,SEARCH_DELAY);
}
}
}
};
var EventHandler = {
sourceChange: function (e) {
alert('Playlist id:'+$('source').value);
@ -65,7 +65,7 @@ var EventHandler = {
});
}
}
}
};
var Query = {
genres: [],
@ -106,6 +106,9 @@ var Query = {
query = this.genres.collect(function(value){return "'daap.songgenre:"+value.encode()+"'";});
}
break;
default:
alert("Shouldn't happen 1");
break;
}
if (this.searchString) {
var search = [];
@ -151,6 +154,9 @@ var Query = {
index = '&index=0-50';
handler = rsSongs;
break;
default:
alert("Shouldn't happen 2");
break;
}
url = url + '?output=xml' + index + meta + this.getUrl(type);
new Ajax.Request(url ,{method: 'get',onComplete:handler});
@ -198,9 +204,12 @@ var ResponseHandler = {
case 'albums':
Query.send('songs');
break;
default:
alert("Shouldn't happen 3");
break;
}
}
}
};
function addOptions(type,options,selected) {
el = $(type);
var nothingSelected = true;
@ -345,7 +354,7 @@ function DataDumper(obj,n,prefix){
str+=ind+prefix+"Boolean:" + obj + "\n";
} else {
var type="Array";
for(var i in obj){ type=(type=="Array"&&i==parseInt(i))?"Array":"Object" }
for(var i in obj){ type=(type=="Array"&&i==parseInt(i))?"Array":"Object"; }
str+=ind+prefix+type+"[\n";
if(type=="Array"){
for(var i in obj){ str+=DataDumper(obj[i],n,i+"=>"); }