In library check for search
This commit is contained in:
@@ -322,6 +322,13 @@ Block.Search.Item = new Class({
|
||||
var self = this;
|
||||
|
||||
if(!self.options.hasClass('set')){
|
||||
|
||||
if(self.info.in_library){
|
||||
var in_library = [];
|
||||
self.info.in_library.releases.each(function(release){
|
||||
in_library.include(release.quality.label)
|
||||
});
|
||||
}
|
||||
|
||||
self.options.adopt(
|
||||
new Element('div').adopt(
|
||||
@@ -330,8 +337,8 @@ Block.Search.Item = new Class({
|
||||
}) : null,
|
||||
self.info.in_wanted ? new Element('span.in_wanted', {
|
||||
'text': 'Already in wanted list: ' + self.info.in_wanted.profile.label
|
||||
}) : (self.info.in_library ? new Element('span.in_library', {
|
||||
'text': 'Already in library: ' + self.info.in_library.profile.label
|
||||
}) : (in_library ? new Element('span.in_library', {
|
||||
'text': 'Already in library: ' + in_library.join(', ')
|
||||
}) : null),
|
||||
self.title_select = new Element('select', {
|
||||
'name': 'title'
|
||||
|
||||
Reference in New Issue
Block a user