From 6b8d5038c98c3e36e17c81f10df1ff6e2b04c156 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 7 Jun 2019 16:51:29 +0100 Subject: [PATCH] resize --- static/js/documentFilter.js | 2 +- static/js/utils.js | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/static/js/documentFilter.js b/static/js/documentFilter.js index 9f09b95bb..98ee084a8 100644 --- a/static/js/documentFilter.js +++ b/static/js/documentFilter.js @@ -244,7 +244,7 @@ pandora.ui.documentFilter = function(id) { } function replaceFilter(i, id) { var isOuter = i % 4 == 0; - pandora.$ui[isOuter ? 'browser' : 'filtersInnerPanel'].replaceElement( + pandora.$ui[isOuter ? 'browser' : 'documentFiltersInnerPanel'].replaceElement( isOuter ? i / 2 : i - 1, pandora.$ui.documentFilters[i] = pandora.ui.documentFilter(id) ); diff --git a/static/js/utils.js b/static/js/utils.js index fff8f9234..1fedf4c5a 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -2827,9 +2827,15 @@ pandora.resizeFilters = function(width) { pandora.$ui.browser && pandora.$ui.browser .size(0, pandora.user.ui.filterSizes[0]) .size(2, pandora.user.ui.filterSizes[4]); + pandora.$ui.documentBrowser && pandora.$ui.documentBrowser + .size(0, pandora.user.ui.filterSizes[0]) + .size(2, pandora.user.ui.filterSizes[4]); pandora.$ui.filtersInnerPanel && pandora.$ui.filtersInnerPanel .size(0, pandora.user.ui.filterSizes[1]) .size(2, pandora.user.ui.filterSizes[3]); + pandora.$ui.documentFiltersInnerPanel && pandora.$ui.documentFiltersInnerPanel + .size(0, pandora.user.ui.filterSizes[1]) + .size(2, pandora.user.ui.filterSizes[3]); pandora.$ui.filters && pandora.$ui.filters.forEach(function($list, i) { $list.resizeColumn( 'name', @@ -2841,6 +2847,17 @@ pandora.resizeFilters = function(width) { }); } }); + pandora.$ui.documentFilters && pandora.$ui.documentFilters.forEach(function($list, i) { + $list.resizeColumn( + 'name', + pandora.user.ui.filterSizes[i] - 44 - Ox.UI.SCROLLBAR_SIZE + ); + if (pandora.site.flags) { + $list.find('.flagname').css({ + width: pandora.user.ui.filterSizes[i] - 68 - Ox.UI.SCROLLBAR_SIZE + }); + } + }); }; pandora.resizeFolders = function(section) {