From cfdb146dd3cd48fc271f234a0497d6b33b2da1d4 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 15 Feb 2014 07:30:14 +0000 Subject: [PATCH] fix folderBrowserList height, fixes #2305 --- static/js/folderBrowserList.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/static/js/folderBrowserList.js b/static/js/folderBrowserList.js index 1172ec813..81c8ad1b0 100644 --- a/static/js/folderBrowserList.js +++ b/static/js/folderBrowserList.js @@ -189,15 +189,17 @@ pandora.ui.folderBrowserList = function(id, section) { } }, init: function(data) { + var height = 16 + data.items * 16, + hasItems = pandora.site.sectionFolders[section][i].hasItems; pandora.site.sectionFolders[section][i].items = data.items; pandora.$ui.folder[i].$content.css({ - height: 40 + (data.items || 1) * 16 + 'px' + height: (data.items ? 24 : hasItems ? 40 : 0) + height + 'px' }); pandora.$ui.folderList[id].css({ - height: 16 + data.items * 16 + 'px' + height: height + 'px' }); pandora.$ui.folderBrowser[id].size(2, data.items ? 0 : 16); - if (Ox.isBoolean(pandora.site.sectionFolders[section][i].hasItems)) { + if (Ox.isBoolean(hasItems)) { // hasItems is set, so we're not on first init pandora.resizeFolders(); }