cierra la barra lateral en mapero al hacer click en un item

This commit is contained in:
humano 2019-08-29 06:13:54 -05:00
parent 7fa0c78fd5
commit 73beb9f1b7

View File

@ -8487,7 +8487,7 @@ mysqli_set_charset($link, "utf8");
//$campo_titulo_nombre = remplacetas('form_campos','id',$campo_titulo[0],'campo_nombre',"") ; //$campo_titulo_nombre = remplacetas('form_campos','id',$campo_titulo[0],'campo_nombre',"") ;
if($categoria_campo >0 ) { if($categoria_campo >0 ) {
$consulta = " $consulta = "
SELECT distinct(contenido) , md5(binary contenido) as md5_contenido, control FROM form_datos SELECT distinct(contenido) , md5(binary contenido) as md5_contenido, control , timestamp FROM form_datos
WHERE form_id = '$perfil' WHERE form_id = '$perfil'
AND contenido = '$categoria' AND contenido = '$categoria'
GROUP BY control GROUP BY control
@ -8528,7 +8528,7 @@ $resultadox .= "
<small>$contenido</small> <small>$contenido</small>
</div>"; </div>";
//$resultado .="<li class='list-group-item'><a href='?id=$perfil&buscar=$categoria_campo:$contenido'><img style=' height:50px;' class='' src='$icono' style=''> $contenido</a></li>"; //$resultado .="<li class='list-group-item'><a href='?id=$perfil&buscar=$categoria_campo:$contenido'><img style=' height:50px;' class='' src='$icono' style=''> $contenido</a></li>";
$resultado .="<li class='list-group-item'><a id='$row[control]' href='#' onclick=\"map.flyTo( {lon: $lon, lat: $lat},$zoom); markers['$row[control]'].openPopup(); \" > <img style=' height:20px;' class='' src='$icono' style=''> $titulo[0]</a> <a target='compartir' href='?id=$perfil&item=$row[control]'><i class='fa fa-link' aria-hidden='true'></i></a></li>"; $resultado .="<li class='list-group-item'><a id='$row[control]' href='#' onclick=\"sidebar.close(); map.flyTo( {lon: $lon, lat: $lat},$zoom); openMarkerPopup(this); \" > <img style=' height:20px;' class='' src='$icono' style=''> $titulo[0]</a> <a target='compartir' href='?id=$perfil&item=$row[control]'><i class='fa fa-link' aria-hidden='true'></i></a></li>";
} }
$resultado .= " </ul >"; $resultado .= " </ul >";
} }
@ -12572,12 +12572,12 @@ function imprime_geojson($id,$id2,$plantilla,$busqueda,$item){
$busqueda = explode(':',$busqueda); $busqueda = explode(':',$busqueda);
if($busqueda[1] !="") { if($busqueda[1] !="") {
$busqueda[1] = htmlentities($busqueda[1]); $busqueda[1] = htmlentities($busqueda[1]);
$consulta = "SELECT form_id as id, control, GROUP_CONCAT(contenido ORDER by timestamp desc ) as data FROM `form_datos` WHERE (form_id = '$id_form' $w_id2 AND id_campo ='$busqueda[0]' AND contenido COLLATE utf8_spanish2_ci like '%$busqueda[1]%' ) group by control ORDER BY orden desc"; $consulta = "SELECT form_id as id, control, timestamp, GROUP_CONCAT(contenido ORDER by timestamp desc ) as data FROM `form_datos` WHERE (form_id = '$id_form' $w_id2 AND id_campo ='$busqueda[0]' AND contenido COLLATE utf8_spanish2_ci like '%$busqueda[1]%' ) group by control ORDER BY orden desc";
} }
elseif($item !=""){ elseif($item !=""){
$consulta = "SELECT form_id as id, control, GROUP_CONCAT(contenido ORDER by timestamp desc ) as data $consulta = "SELECT form_id as id, control, timestamp, GROUP_CONCAT(contenido ORDER by timestamp desc ) as data
FROM `form_datos` FROM `form_datos`
WHERE control= '$item' WHERE control= '$item'
limit 1"; limit 1";
@ -12585,7 +12585,7 @@ limit 1";
else{ else{
$consulta = "SELECT form_id as id, control, GROUP_CONCAT(contenido ORDER by timestamp desc ) as data $consulta = "SELECT form_id as id, control, timestamp , GROUP_CONCAT(contenido ORDER by timestamp desc ) as data
FROM `form_datos` FROM `form_datos`
WHERE (form_id = '$id_form' $w_id2 ) WHERE (form_id = '$id_form' $w_id2 )
AND ( id_campo ='$id_campo' $or_2 ) AND ( id_campo ='$id_campo' $or_2 )
@ -12641,7 +12641,7 @@ while( $row = mysqli_fetch_array( $sql ) ) {
$propiedades['description'] ="$titulo[0]"; } $propiedades['description'] ="$titulo[0]"; }
$propiedades['control'] = "$row[control]"; $propiedades['control'] = "$row[control]";
$propiedades["latLng"] = array($lat,$lon); $propiedades["latLng"] = array($lat,$lon);
$propiedades['id'] = rand();; $propiedades['time'] = $row['timestamp'];;
$propiedades['name'] = rand();; $propiedades['name'] = rand();;
//$propiedades[description] ="<div class='container-fluid' id='contenedor_datos' >$formulario</div>"; //$propiedades[description] ="<div class='container-fluid' id='contenedor_datos' >$formulario</div>";
$propiedades['description'] ="$formulario <div class='text-center mostrar_solo'><a class='btn btn-info btn-sm' href='?id=$row[id]'>Mostrar todos</a> <a class='btn btn-info btn-sm' href='?id=$row[id]&item=$row[control]'>Mostar solo este</a></div> "; $propiedades['description'] ="$formulario <div class='text-center mostrar_solo'><a class='btn btn-info btn-sm' href='?id=$row[id]'>Mostrar todos</a> <a class='btn btn-info btn-sm' href='?id=$row[id]&item=$row[control]'>Mostar solo este</a></div> ";