forked from 0x2620/pandora
fix folder lists
This commit is contained in:
parent
1483ab182f
commit
58991c72c1
1 changed files with 9 additions and 13 deletions
|
@ -1232,14 +1232,13 @@ pandora.resizeFilters = function(width) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pandora.resizeFolders = function() {
|
pandora.resizeFolders = function() {
|
||||||
var width = pandora.getFoldersWidth() - (
|
var width = pandora.getFoldersWidth(),
|
||||||
pandora.user.ui.section == 'items' ? 96 : 32
|
columnWidth = width - (
|
||||||
|
pandora.user.ui.section == 'items' ? 96 : 48
|
||||||
),
|
),
|
||||||
columnWidth = {};
|
userColumnWidth = Math.round(columnWidth * 0.4),
|
||||||
Ox.print('WIDTH:::', width)
|
nameColumnWidth = columnWidth - userWidth;
|
||||||
columnWidth.user = Math.round(width * 0.4);
|
pandora.$ui.allItems.resizeElement(columnWidth - 8);
|
||||||
columnWidth.name = width - columnWidth.user;
|
|
||||||
pandora.$ui.allItems.resizeElement(width - 8);
|
|
||||||
Ox.forEach(pandora.$ui.folderList, function($list, id) {
|
Ox.forEach(pandora.$ui.folderList, function($list, id) {
|
||||||
var pos = Ox.getIndexById(pandora.site.sectionFolders[pandora.user.ui.section], id);
|
var pos = Ox.getIndexById(pandora.site.sectionFolders[pandora.user.ui.section], id);
|
||||||
pandora.$ui.folder[pos].css({width: width + 'px'});
|
pandora.$ui.folder[pos].css({width: width + 'px'});
|
||||||
|
@ -1248,13 +1247,10 @@ pandora.resizeFolders = function() {
|
||||||
pandora.$ui.findListInput[id].options({
|
pandora.$ui.findListInput[id].options({
|
||||||
width: width - 24
|
width: width - 24
|
||||||
});
|
});
|
||||||
$list.resizeColumn('user', columnWidth.user)
|
$list.resizeColumn('user', userColumnWidth)
|
||||||
.resizeColumn('name', columnWidth.name);
|
.resizeColumn('name', nameColumnWidth);
|
||||||
} else {
|
} else {
|
||||||
$list.resizeColumn(
|
$list.resizeColumn(id == 'favorite' ? 'id' : 'name', columnWidth);
|
||||||
id == 'favorite' ? 'id' : 'name',
|
|
||||||
width - (pandora.user.ui.section == 'items' ? 96 : 48)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
if (!pandora.user.ui.showFolder[pandora.user.ui.section][id]) {
|
if (!pandora.user.ui.showFolder[pandora.user.ui.section][id]) {
|
||||||
pandora.$ui.folder[pos].updatePanel();
|
pandora.$ui.folder[pos].updatePanel();
|
||||||
|
|
Loading…
Reference in a new issue