Skip to content

Commit

Permalink
Merge pull request #350 from gitnnolabs/fix_scope_component
Browse files Browse the repository at this point in the history
Garante que seja sempre preenchido o componente de escopo.
  • Loading branch information
gitnnolabs authored Sep 16, 2024
2 parents a1ee6f3 + 00594ad commit 24b3e5d
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 24b3e5d

Please sign in to comment.