Return active profiles

This commit is contained in:
Ruud
2011-09-07 18:27:05 +02:00
parent 517e79dfce
commit 5489215ffe
3 changed files with 9 additions and 2 deletions
@@ -303,7 +303,7 @@ Block.Search.Item = new Class({
}).inject(self.title_select)
})
Object.each(Quality.profiles, function(profile){
Object.each(Quality.getActiveProfiles(), function(profile){
new Element('option', {
'value': profile.id ? profile.id : profile.data.id,
'text': profile.label ? profile.label : profile.data.label
@@ -19,6 +19,13 @@ var QualityBase = new Class({
return this.profiles[id]
},
// Hide items when getting profiles
getActiveProfiles: function(){
return Object.filter(this.profiles, function(profile){
return !profile.data.hide
});
},
getQuality: function(id){
return this.qualities.filter(function(q){
return q.id == id;
+1 -1
View File
@@ -78,7 +78,7 @@ MovieActions.Wanted = {
}).inject(self.title_select);
});
Object.each(Quality.profiles, function(profile){
Object.each(Quality.getActiveProfiles(), function(profile){
new Element('option', {
'value': profile.id ? profile.id : profile.data.id,
'text': profile.label ? profile.label : profile.data.label