display featured lists on front page even if less than eight lists are featured (fixes #534)

This commit is contained in:
rolux 2012-03-07 14:33:55 +00:00
parent ef2b1403bb
commit 4d14148524

View file

@ -271,7 +271,7 @@ pandora.ui.home = function() {
if (lists.length) { if (lists.length) {
$label = Ox.Label({ $label = Ox.Label({
textAlign: 'center', textAlign: 'center',
title: '<b>Featured List' + (lists.length >= items ? 's' : '') + '</b>', title: '<b>Featured List' + (lists.length > 1 ? 's' : '') + '</b>',
width: 512 width: 512
}) })
.css({ .css({
@ -331,7 +331,7 @@ pandora.ui.home = function() {
} }
}) })
.appendTo($lists); .appendTo($lists);
if (lists.length >= items) { if (lists.length > 1) {
$listsBox = $('<div>') $listsBox = $('<div>')
.css({ .css({
position: 'absolute', position: 'absolute',
@ -357,7 +357,10 @@ pandora.ui.home = function() {
.css({ .css({
position: 'absolute', position: 'absolute',
width: lists.length * 65 + 'px', width: lists.length * 65 + 'px',
height: '65px' height: '65px',
marginLeft: lists.length < items
? (items - lists.length) * 65 / 2 + 'px'
: 0
}) })
.appendTo($listsContainer); .appendTo($listsContainer);
if (lists.length > items) { if (lists.length > items) {