Commit bfb7dc8a by vida092

bugtarget arreglado

parent 938df164
......@@ -298,7 +298,7 @@
<div id="tuto_agent" class="col-md-6 col-sm-12 col-xs-12">
<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">
<option value="model_default" selected disabled>Selecione un agente</option>
<option value="Patogenos">Patógeno</option>
......@@ -310,7 +310,7 @@
<div>
<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">
<option value="alert" selected>Seleccione Grupo</option>
<option value="familia">Familia</option>
......@@ -327,7 +327,7 @@
<div id="tuto_disease" class="col-md-12 col-sm-12 col-xs-12">
<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">
<option value = "dis_default" selected disabled> Seleccione Enfermedad</option>
<option value ="todas">Sin enfermedad</option>
......
......@@ -168,6 +168,7 @@ var variable_module = (function (verbose, url_zacatuche) {
self.getTreeTarget = function(){
_VERBOSE ? console.log("self.getTreeTarget") : _VERBOSE;
console.log(id)
$("#agent_selected").change(function() {
......@@ -482,10 +483,6 @@ var variable_module = (function (verbose, url_zacatuche) {
_module_toast.showToast_CenterCenter("Seleccione una Raíz", "error")
break
}
})
}
......@@ -498,6 +495,7 @@ var variable_module = (function (verbose, url_zacatuche) {
if(!abio_tab) return;
_VERBOSE ? console.log("self.loadTreeVarRaster") : _VERBOSE;
console.log(id)
var text_raster = _iTrans.prop('lb_raster');
var var_selected = "root_bioclim";
......@@ -520,6 +518,8 @@ var variable_module = (function (verbose, url_zacatuche) {
self.getTreeSocio = function (){
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({
url:"https://covid19.c3.unam.mx/gateway/api/nodes/",
method: "POST",
......@@ -573,9 +573,6 @@ var variable_module = (function (verbose, url_zacatuche) {
})
$(function () { $('#jstree_variables_socio_fuente').jstree(); });
$("#jstree_variables_socio_fuente").on("changed.jstree", self.getChangeTreeVarSocio)
}
})
......@@ -650,6 +647,7 @@ var variable_module = (function (verbose, url_zacatuche) {
})
}
self.getTreeTarget()
self.getTreeVarRaster()
self.getTreeSocio()
......@@ -695,6 +693,7 @@ var variable_module = (function (verbose, url_zacatuche) {
.appendTo(nav_selection);
// sea agregan los tabs disponibles
$.each(tags, function (i) {
......@@ -1859,10 +1858,12 @@ var variable_module = (function (verbose, url_zacatuche) {
self.getChangeTreeVarTarget = function (e, data) {
console.log("cambiaste el arbol")
_VERBOSE ? console.log("self.getChangeTreeVar") : _VERBOSE;
console.log($('#jstree_variables_species_target').jstree(true).get_top_selected().length)
self.arrayVarSelectedTarget = []; //para el front
self.arrayVarSelectedTarget2 = []; //para el query
if ($('#jstree_variables_species_target').jstree(true).get_top_selected().length > 0) {
// _VERBOSE ? console.log("acceder node header del dom") : _VERBOSE;
......@@ -1898,7 +1899,8 @@ var variable_module = (function (verbose, url_zacatuche) {
_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(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