From 00594ad24918cd0f1172c588cd8251f6fc450136 Mon Sep 17 00:00:00 2001
From: GitInno <86991526+gitnnolabs@users.noreply.github.com>
Date: Mon, 16 Sep 2024 15:37:28 -0300
Subject: [PATCH] Garante que seja sempre preenchido o componente de escobo.
---
search/templates/graph/graph.html | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/search/templates/graph/graph.html b/search/templates/graph/graph.html
index 9d8f74b2..b6671903 100644
--- a/search/templates/graph/graph.html
+++ b/search/templates/graph/graph.html
@@ -965,7 +965,7 @@
{{ f.label }}
}
- function get_facets(q, scope=false){
+ function get_facets(q){
$.ajax({
url: '/search/graph/context_facet',
type: 'GET',
@@ -975,9 +975,7 @@ {{ f.label }}
},
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);
@@ -1000,7 +998,7 @@ {{ f.label }}
get_facets(q="universe:brazil");
}
if ($(this).val() == "world"){
- get_facets(q="universe:world", scope=true);
+ get_facets(q="universe:world");
}
}