From 58991c72c1f721f58a3466b1aeedff00ee263966 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 3 Mar 2013 11:52:51 +0530 Subject: [PATCH] fix folder lists --- static/js/pandora/utils.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index 913672b1f..df312dccd 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -1232,14 +1232,13 @@ pandora.resizeFilters = function(width) { }; pandora.resizeFolders = function() { - var width = pandora.getFoldersWidth() - ( - pandora.user.ui.section == 'items' ? 96 : 32 + var width = pandora.getFoldersWidth(), + columnWidth = width - ( + pandora.user.ui.section == 'items' ? 96 : 48 ), - columnWidth = {}; - Ox.print('WIDTH:::', width) - columnWidth.user = Math.round(width * 0.4); - columnWidth.name = width - columnWidth.user; - pandora.$ui.allItems.resizeElement(width - 8); + userColumnWidth = Math.round(columnWidth * 0.4), + nameColumnWidth = columnWidth - userWidth; + pandora.$ui.allItems.resizeElement(columnWidth - 8); Ox.forEach(pandora.$ui.folderList, function($list, id) { var pos = Ox.getIndexById(pandora.site.sectionFolders[pandora.user.ui.section], id); pandora.$ui.folder[pos].css({width: width + 'px'}); @@ -1248,13 +1247,10 @@ pandora.resizeFolders = function() { pandora.$ui.findListInput[id].options({ width: width - 24 }); - $list.resizeColumn('user', columnWidth.user) - .resizeColumn('name', columnWidth.name); + $list.resizeColumn('user', userColumnWidth) + .resizeColumn('name', nameColumnWidth); } else { - $list.resizeColumn( - id == 'favorite' ? 'id' : 'name', - width - (pandora.user.ui.section == 'items' ? 96 : 48) - ); + $list.resizeColumn(id == 'favorite' ? 'id' : 'name', columnWidth); } if (!pandora.user.ui.showFolder[pandora.user.ui.section][id]) { pandora.$ui.folder[pos].updatePanel();