Skip to content

Commit

Permalink
Garante que seja sempre preenchido o componente de escobo.
Browse files Browse the repository at this point in the history
  • Loading branch information
gitnnolabs committed Sep 16, 2024
1 parent 451bc93 commit 00594ad
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions search/templates/graph/graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ <h5 class="mb-1">{{ f.label }}</h5>
}


function get_facets(q, scope=false){
function get_facets(q){
$.ajax({
url: '/search/graph/context_facet',
type: 'GET',
Expand All @@ -975,9 +975,7 @@ <h5 class="mb-1">{{ f.label }}</h5>
},
success: function(response) {
trans = response.translate;
if(scope){
fill_components(response.facets.scope, trans, "#scope", include_all=false);
}
fill_components(response.facets.scope, trans, "#scope", include_all=false);
fill_components(response.facets.type, trans, "#type", include_all=false, empty=false, empty_without_first=true);
fill_components(response.facets.classification, trans, "#classification", include_all=false, empty=false, empty_without_first=true);
fill_components(response.facets.database, trans, "#database", include_all=false);
Expand All @@ -1000,7 +998,7 @@ <h5 class="mb-1">{{ f.label }}</h5>
get_facets(q="universe:brazil");
}
if ($(this).val() == "world"){
get_facets(q="universe:world", scope=true);
get_facets(q="universe:world");
}
}

Expand Down

0 comments on commit 00594ad

Please sign in to comment.