Commit bfb7dc8a by vida092

bugtarget arreglado

parent 938df164
...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
<div id="tuto_agent" class="col-md-6 col-sm-12 col-xs-12"> <div id="tuto_agent" class="col-md-6 col-sm-12 col-xs-12">
<div class="form-group"> <div class="form-group">
<label class = "text-sm" id="agent">Agente:</label> <label class = "text-sm" id="agent"> <img src="images\numero-uno.png"> Agente </label>
<select id = "agent_selected" class="form-control"> <select id = "agent_selected" class="form-control">
<option value="model_default" selected disabled>Selecione un agente</option> <option value="model_default" selected disabled>Selecione un agente</option>
<option value="Patogenos">Patógeno</option> <option value="Patogenos">Patógeno</option>
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
<div> <div>
<div id="taxon_tree_root" class="col-md-6 col-sm-12 col-xs-12"> <div id="taxon_tree_root" class="col-md-6 col-sm-12 col-xs-12">
<label class = "text-sm">Raiz taxonómica</label> <label class = "text-sm"> <img src="images\numero-2.png"> Raiz taxonómica</label>
<select id="taxon_tree_root_value" class="form-control"> <select id="taxon_tree_root_value" class="form-control">
<option value="alert" selected>Seleccione Grupo</option> <option value="alert" selected>Seleccione Grupo</option>
<option value="familia">Familia</option> <option value="familia">Familia</option>
...@@ -327,7 +327,7 @@ ...@@ -327,7 +327,7 @@
<div id="tuto_disease" class="col-md-12 col-sm-12 col-xs-12"> <div id="tuto_disease" class="col-md-12 col-sm-12 col-xs-12">
<div class="form-group" > <div class="form-group" >
<label class = "text-sm" id="disease">Enfermedad:</label> <label class = "text-sm" id="disease"><img src="images\numero-3.png"> Enfermedad:</label>
<select id = "disease_selected" class="form-control"> <select id = "disease_selected" class="form-control">
<option value = "dis_default" selected disabled> Seleccione Enfermedad</option> <option value = "dis_default" selected disabled> Seleccione Enfermedad</option>
<option value ="todas">Sin enfermedad</option> <option value ="todas">Sin enfermedad</option>
......
...@@ -168,6 +168,7 @@ var variable_module = (function (verbose, url_zacatuche) { ...@@ -168,6 +168,7 @@ var variable_module = (function (verbose, url_zacatuche) {
self.getTreeTarget = function(){ self.getTreeTarget = function(){
_VERBOSE ? console.log("self.getTreeTarget") : _VERBOSE; _VERBOSE ? console.log("self.getTreeTarget") : _VERBOSE;
console.log(id)
$("#agent_selected").change(function() { $("#agent_selected").change(function() {
...@@ -482,10 +483,6 @@ var variable_module = (function (verbose, url_zacatuche) { ...@@ -482,10 +483,6 @@ var variable_module = (function (verbose, url_zacatuche) {
_module_toast.showToast_CenterCenter("Seleccione una Raíz", "error") _module_toast.showToast_CenterCenter("Seleccione una Raíz", "error")
break break
} }
}) })
} }
...@@ -498,6 +495,7 @@ var variable_module = (function (verbose, url_zacatuche) { ...@@ -498,6 +495,7 @@ var variable_module = (function (verbose, url_zacatuche) {
if(!abio_tab) return; if(!abio_tab) return;
_VERBOSE ? console.log("self.loadTreeVarRaster") : _VERBOSE; _VERBOSE ? console.log("self.loadTreeVarRaster") : _VERBOSE;
console.log(id)
var text_raster = _iTrans.prop('lb_raster'); var text_raster = _iTrans.prop('lb_raster');
var var_selected = "root_bioclim"; var var_selected = "root_bioclim";
...@@ -520,6 +518,8 @@ var variable_module = (function (verbose, url_zacatuche) { ...@@ -520,6 +518,8 @@ var variable_module = (function (verbose, url_zacatuche) {
self.getTreeSocio = function (){ self.getTreeSocio = function (){
var query = "query{all_censo_inegi_2020_covariables(limit: 2400, filter:\"\"){id name interval bin code}}" var query = "query{all_censo_inegi_2020_covariables(limit: 2400, filter:\"\"){id name interval bin code}}"
_VERBOSE ? console.log("self.getTreeSocio") : _VERBOSE;
console.log(id)
$.ajax({ $.ajax({
url:"https://covid19.c3.unam.mx/gateway/api/nodes/", url:"https://covid19.c3.unam.mx/gateway/api/nodes/",
method: "POST", method: "POST",
...@@ -573,9 +573,6 @@ var variable_module = (function (verbose, url_zacatuche) { ...@@ -573,9 +573,6 @@ var variable_module = (function (verbose, url_zacatuche) {
}) })
$(function () { $('#jstree_variables_socio_fuente').jstree(); }); $(function () { $('#jstree_variables_socio_fuente').jstree(); });
$("#jstree_variables_socio_fuente").on("changed.jstree", self.getChangeTreeVarSocio) $("#jstree_variables_socio_fuente").on("changed.jstree", self.getChangeTreeVarSocio)
} }
}) })
...@@ -650,6 +647,7 @@ var variable_module = (function (verbose, url_zacatuche) { ...@@ -650,6 +647,7 @@ var variable_module = (function (verbose, url_zacatuche) {
}) })
} }
self.getTreeTarget() self.getTreeTarget()
self.getTreeVarRaster() self.getTreeVarRaster()
self.getTreeSocio() self.getTreeSocio()
...@@ -695,6 +693,7 @@ var variable_module = (function (verbose, url_zacatuche) { ...@@ -695,6 +693,7 @@ var variable_module = (function (verbose, url_zacatuche) {
.appendTo(nav_selection); .appendTo(nav_selection);
// sea agregan los tabs disponibles // sea agregan los tabs disponibles
$.each(tags, function (i) { $.each(tags, function (i) {
...@@ -1859,10 +1858,12 @@ var variable_module = (function (verbose, url_zacatuche) { ...@@ -1859,10 +1858,12 @@ var variable_module = (function (verbose, url_zacatuche) {
self.getChangeTreeVarTarget = function (e, data) { self.getChangeTreeVarTarget = function (e, data) {
console.log("cambiaste el arbol") console.log("cambiaste el arbol")
_VERBOSE ? console.log("self.getChangeTreeVar") : _VERBOSE; _VERBOSE ? console.log("self.getChangeTreeVar") : _VERBOSE;
console.log($('#jstree_variables_species_target').jstree(true).get_top_selected().length)
self.arrayVarSelectedTarget = []; //para el front self.arrayVarSelectedTarget = []; //para el front
self.arrayVarSelectedTarget2 = []; //para el query self.arrayVarSelectedTarget2 = []; //para el query
if ($('#jstree_variables_species_target').jstree(true).get_top_selected().length > 0) { if ($('#jstree_variables_species_target').jstree(true).get_top_selected().length > 0) {
// _VERBOSE ? console.log("acceder node header del dom") : _VERBOSE; // _VERBOSE ? console.log("acceder node header del dom") : _VERBOSE;
...@@ -1898,7 +1899,8 @@ var variable_module = (function (verbose, url_zacatuche) { ...@@ -1898,7 +1899,8 @@ var variable_module = (function (verbose, url_zacatuche) {
_VERBOSE ? console.log("level: " + level) : _VERBOSE; _VERBOSE ? console.log("level: " + level) : _VERBOSE;
var parent_node = $('#jstree_variables_species_target').jstree(true).get_node($('#jstree_variables_species_target').jstree(true).get_parent($('#jstree_variables_species_' + id).jstree(true).get_top_selected()[i])).original; //var parent_node = $('#jstree_variables_species_target').jstree(true).get_node($('#jstree_variables_species_target').jstree(true).get_parent($('#jstree_variables_species_' + id).jstree(true).get_top_selected()[i])).original;
var parent_node = $('#jstree_variables_species_target').jstree(true).get_node($('#jstree_variables_species_target').jstree(true).get_parent($('#jstree_variables_species_target').jstree(true).get_top_selected()[i])).original;
_VERBOSE ? console.log(parent_node) : _VERBOSE; _VERBOSE ? console.log(parent_node) : _VERBOSE;
_VERBOSE ? console.log(node_temp) : _VERBOSE; _VERBOSE ? console.log(node_temp) : _VERBOSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment