Browse Source

Merge branch 'suggestdescription' of git://github.com/jerbob92/CouchPotatoServer into jerbob92-suggestdescription

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
pull/2436/head
Ruud 12 years ago
parent
commit
ba3dd263ac
  1. 10
      couchpotato/core/media/movie/suggestion/static/suggest.css
  2. 11
      couchpotato/core/media/movie/suggestion/static/suggest.js

10
couchpotato/core/media/movie/suggestion/static/suggest.css

@ -77,6 +77,16 @@
}
.suggestions .media_result .data .info .plot {
display: block;
font-size: 11px;
height: 54px;
overflow: hidden;
}
.suggestions .media_result:hover .data .info .plot {
height: 35px;
}
.suggestions .media_result .data {
cursor: default;
}

11
couchpotato/core/media/movie/suggestion/static/suggest.js

@ -95,6 +95,14 @@ var SuggestList = new Class({
);
m.data_container.removeEvents('click');
var plot = '';
if(m.info.plot && m.info.plot.length > 0) {
plot = m.info.plot.substr(0, 90);
if(m.info.plot.length > 90) {
plot = plot.replace(/\s+$/,'') + '...';
}
}
// 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', {
@ -103,6 +111,9 @@ var SuggestList = new Class({
}) : 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.plot = m.info.plot && m.info.plot.length > 0 ? new Element('span.plot', {
'text': plot
}) : null
)

Loading…
Cancel
Save