From 74e9e3ee8c13d82763bd9ce6e0dadc0d54511277 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 2 Nov 2011 19:11:00 +0000 Subject: [PATCH] fix a folder resize bug --- static/js/pandora/utils.js | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index 92b71833..0e6810dd 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -468,6 +468,7 @@ pandora.getFoldersHeight = function() { pandora.getFoldersWidth = function() { var width = pandora.user.ui.sidebarSize; + Ox.print('FOLDERS HEIGHT', pandora.getFoldersHeight(), 'INFO HEIGHT', pandora.getInfoHeight()) if ( pandora.$ui.appPanel && pandora.getFoldersHeight() > window.innerHeight - 20 - 24 - 1 - pandora.getInfoHeight() @@ -485,15 +486,19 @@ pandora.getGroupsSizes = function() { pandora.getInfoHeight = function(includeHidden) { // fixme: new, check if it can be used more - var isVideoPreview = pandora.user.ui.item || ( - pandora.user.ui.listSelection.length && !pandora.isClipView() - ); - return (pandora.user.ui.showInfo || includeHidden) * Math.min( - isVideoPreview - ? Math.round(pandora.user.ui.sidebarSize / (16/9)) + 16 - : pandora.user.ui.sidebarSize, - window.innerHeight - 109 // 20 menu + 24 bar + 64 (4 closed folders) + 1 resizebar - ); + var height = 0, isVideoPreview; + if (pandora.user.ui.showInfo || includeHidden) { + isVideoPreview = pandora.user.ui.item || ( + pandora.user.ui.listSelection.length && !pandora.isClipView() + ); + height = Math.min( + isVideoPreview + ? Math.round(pandora.user.ui.sidebarSize / (16/9)) + 16 + : pandora.user.ui.sidebarSize, + window.innerHeight - 109 // 20 menu + 24 bar + 64 (4 closed folders) + 1 resizebar + ); + } + return height; } pandora.getItemByIdOrTitle = function(str, callback) {