the ui pref is 'showSitePosters', not 'showSitePoster'

This commit is contained in:
rolux 2012-03-20 12:56:30 +01:00
parent 528e46731d
commit e8e9458fce
4 changed files with 15 additions and 15 deletions

View file

@ -57,10 +57,10 @@ pandora.ui.browser = function() {
size = size || 64; size = size || 64;
var ui = pandora.user.ui, var ui = pandora.user.ui,
ratio = ui.icons == 'posters' ratio = ui.icons == 'posters'
? (ui.showSitePoster ? 5/8 : data.posterRatio) : 1, ? (ui.showSitePosters ? 5/8 : data.posterRatio) : 1,
url = '/' + data.id + '/' + ( url = '/' + data.id + '/' + (
ui.icons == 'posters' ui.icons == 'posters'
? (ui.showSitePoster ? 'siteposter' : 'poster') : 'icon' ? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
) + '128.jpg', ) + '128.jpg',
format, info, sortKey = sort[0].key; format, info, sortKey = sort[0].key;
if (['title', 'director', 'random'].indexOf(sortKey) > -1) { if (['title', 'director', 'random'].indexOf(sortKey) > -1) {

View file

@ -14,7 +14,7 @@ pandora.ui.infoView = function(data) {
WebkitUserSelect: 'text' WebkitUserSelect: 'text'
}, },
iconRatio = ui.icons == 'posters' iconRatio = ui.icons == 'posters'
? (ui.showSitePoster ? 5/8 : data.posterRatio) : 1, ? (ui.showSitePosters ? 5/8 : data.posterRatio) : 1,
iconSize = ui.infoIconSize, iconSize = ui.infoIconSize,
iconWidth = iconRatio > 1 ? iconSize : Math.round(iconSize * iconRatio), iconWidth = iconRatio > 1 ? iconSize : Math.round(iconSize * iconRatio),
iconHeight = iconRatio < 1 ? iconSize : Math.round(iconSize / iconRatio), iconHeight = iconRatio < 1 ? iconSize : Math.round(iconSize / iconRatio),
@ -60,7 +60,7 @@ pandora.ui.infoView = function(data) {
.attr({ .attr({
src: '/' + data.id + '/' + ( src: '/' + data.id + '/' + (
ui.icons == 'posters' ui.icons == 'posters'
? (ui.showSitePoster ? 'siteposter' : 'poster') : 'icon' ? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
) + '512.jpg?' + uid ) + '512.jpg?' + uid
}) })
.css({ .css({
@ -93,7 +93,7 @@ pandora.ui.infoView = function(data) {
.attr({ .attr({
src: '/' + data.id + '/' + ( src: '/' + data.id + '/' + (
ui.icons == 'posters' ui.icons == 'posters'
? (ui.showSitePoster ? 'siteposter' : 'poster') : 'icon' ? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
) + '512.jpg?' + uid ) + '512.jpg?' + uid
}) })
.css({ .css({
@ -727,7 +727,7 @@ pandora.ui.infoView = function(data) {
if ($browserImages.length == 0) { if ($browserImages.length == 0) {
$browserImages = pandora.$ui.browser.find('img[src*="/' + data.id + '/"]'); $browserImages = pandora.$ui.browser.find('img[src*="/' + data.id + '/"]');
} }
if (ui.icons == 'posters' && !ui.showSitePoster) { if (ui.icons == 'posters' && !ui.showSitePosters) {
$browserImages.each(function() { $browserImages.each(function() {
var $this = $(this), var $this = $(this),
size = Math.max($this.width(), $this.height()); size = Math.max($this.width(), $this.height());
@ -852,13 +852,13 @@ pandora.ui.infoView = function(data) {
that.reload = function() { that.reload = function() {
var src = src = '/' + data.id + '/' + ( var src = src = '/' + data.id + '/' + (
ui.icons == 'posters' ui.icons == 'posters'
? (ui.showSitePoster ? 'siteposter' : 'poster') : 'icon' ? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
) + '512.jpg?' + Ox.uid() ) + '512.jpg?' + Ox.uid()
$icon.attr({src: src}); $icon.attr({src: src});
$reflectionIcon.attr({src: src}); $reflectionIcon.attr({src: src});
iconSize = iconSize == 256 ? 512 : 256; iconSize = iconSize == 256 ? 512 : 256;
iconRatio = ui.icons == 'posters' iconRatio = ui.icons == 'posters'
? (ui.showSitePoster ? 5/8 : data.posterRatio) : 1; ? (ui.showSitePosters ? 5/8 : data.posterRatio) : 1;
toggleIconSize(); toggleIconSize();
pandora.user.level == 'admin' && $list.replaceWith($list = renderList()); pandora.user.level == 'admin' && $list.replaceWith($list = renderList());
}; };

View file

@ -733,7 +733,7 @@ pandora.ui.infoView = function(data) {
$reflectionIcon.attr({src: src}); $reflectionIcon.attr({src: src});
iconSize = iconSize == 256 ? 512 : 256; iconSize = iconSize == 256 ? 512 : 256;
iconRatio = ui.icons == 'posters' iconRatio = ui.icons == 'posters'
? (ui.showSitePoster ? 5/8 : data.posterRatio) : 1; ? (ui.showSitePosters ? 5/8 : data.posterRatio) : 1;
toggleIconSize(); toggleIconSize();
}; };

View file

@ -122,10 +122,10 @@ pandora.ui.list = function() {
item: function(data, sort, size) { item: function(data, sort, size) {
var ui = pandora.user.ui, var ui = pandora.user.ui,
ratio = ui.icons == 'posters' ratio = ui.icons == 'posters'
? (ui.showSitePoster ? 5/8 : data.posterRatio) : 1, ? (ui.showSitePosters ? 5/8 : data.posterRatio) : 1,
url = '/' + data.id + '/' + ( url = '/' + data.id + '/' + (
ui.icons == 'posters' ui.icons == 'posters'
? (ui.showSitePoster ? 'siteposter' : 'poster') : 'icon' ? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
) + size + '.jpg', ) + size + '.jpg',
format, info, sortKey = sort[0].key; format, info, sortKey = sort[0].key;
if (['title', 'director', 'random'].indexOf(sortKey) > -1) { if (['title', 'director', 'random'].indexOf(sortKey) > -1) {
@ -175,10 +175,10 @@ pandora.ui.list = function() {
size = 128; size = 128;
var ui = pandora.user.ui, var ui = pandora.user.ui,
ratio = ui.icons == 'posters' ratio = ui.icons == 'posters'
? (ui.showSitePoster ? 5/8 : data.posterRatio) : 1, ? (ui.showSitePosters ? 5/8 : data.posterRatio) : 1,
url = '/' + data.id + '/' + ( url = '/' + data.id + '/' + (
ui.icons == 'posters' ui.icons == 'posters'
? (ui.showSitePoster ? 'siteposter' : 'poster') : 'icon' ? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
) + size + '.jpg', ) + size + '.jpg',
format, info, sortKey = sort[0].key; format, info, sortKey = sort[0].key;
if (['title', 'director'].indexOf(sortKey) > -1) { if (['title', 'director'].indexOf(sortKey) > -1) {
@ -255,10 +255,10 @@ pandora.ui.list = function() {
isClipsQuery = !!clipsQuery.conditions.length, isClipsQuery = !!clipsQuery.conditions.length,
ui = pandora.user.ui, ui = pandora.user.ui,
ratio = ui.icons == 'posters' ratio = ui.icons == 'posters'
? (ui.showSitePoster ? 5/8 : data.posterRatio) : 1, ? (ui.showSitePosters ? 5/8 : data.posterRatio) : 1,
url = '/' + data.id + '/' + ( url = '/' + data.id + '/' + (
ui.icons == 'posters' ui.icons == 'posters'
? (ui.showSitePoster ? 'siteposter' : 'poster') : 'icon' ? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
) + size + '.jpg', ) + size + '.jpg',
format, info, sortKey = sort[0].key; format, info, sortKey = sort[0].key;
if (['title', 'director'].indexOf(sortKey) > -1) { if (['title', 'director'].indexOf(sortKey) > -1) {