N°762 Portal: Pre-filtering a browse brick in tree mode was making tree collapsing instead of showing results.

SVN:trunk[4911]
This commit is contained in:
Guillaume Lajarige
2017-09-14 15:10:57 +00:00
parent 379a0bd785
commit c1d1e562ad
2 changed files with 3 additions and 2 deletions

View File

@@ -408,6 +408,7 @@
registerFilterListeners();
// Open first level if only one item
// TODO: We must disable opening of first level when pre-filtering when filtering will be implemented
if($('#brick_content_mosaic > .mosaic-group[data-level-id="L"] > .mosaic-group-item').length == 1)
{
setTimeout(function(){

View File

@@ -411,8 +411,8 @@
registerFilterListeners();
collapseAll();
// Open first level if only one item
if($('#brick_content_tree > .list-group-item').length == 1)
// Open first level if only one item and not pre-filtering
if( ($('#brick_content_tree > .list-group-item').length == 1) && ($('#brick_search_field').val() === '') )
{
setTimeout(function(){
$('#brick_content_tree > .list-group-item > .tree-toggle').trigger('click');