Move rating and genres to suggestions only
This commit is contained in:
1 parent
954018fea2
commit
412627aab0
2 files changed
+13
-9
No files matched your search
@@ -71,6 +71,18 @@ var SuggestList = new Class({
|
||||
)
|
||||
);
|
||||
m.data_container.removeEvents('click');
|
||||
|
||||
// Add rating
|
||||
m.info_container.adopt(
|
||||
m.rating = m.info.rating && m.info.rating.imdb.length == 2 && parseFloat(m.info.rating.imdb[0]) > 0 ? new Element('span.rating', {
|
||||
'text': parseFloat(m.info.rating.imdb[0]),
|
||||
'title': parseInt(m.info.rating.imdb[1]) + ' votes'
|
||||
}) : null,
|
||||
m.genre = m.info.genres && m.info.genres.length > 0 ? new Element('span.genres', {
|
||||
'text': m.info.genres.slice(0, 3).join(', ')
|
||||
}) : null
|
||||
)
|
||||
|
||||
$(m).inject(self.el);
|
||||
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user