implementacion de carga dinamica de imagenes con lazy loading

This commit is contained in:
humano 2017-10-30 11:26:26 -05:00
parent 4ffa9517ff
commit eac6eddd0d

View File

@ -11065,7 +11065,7 @@ if (mysqli_num_rows($sql)!='0'){
$td .= "<td class='planilla_$row[id_campo]' >$imagen</td>"; $td .= "<td class='planilla_$row[id_campo]' >$imagen</td>";
}else {$imagen='';} }else {$imagen='';}
if(!isset($_REQUEST['print'])) { $src ="data-src";}else{ $src =" print src"; }
while( $row = mysqli_fetch_array( $sql ) ) { while( $row = mysqli_fetch_array( $sql ) ) {
$campo_tipo = remplacetas('form_campos','id',$row[id_campo],'campo_tipo'); $campo_tipo = remplacetas('form_campos','id',$row[id_campo],'campo_tipo');
@ -11107,7 +11107,7 @@ $td .= "<td class='planilla_$row[id_campo]' >$imagen</td>";
}else { }else {
$size="150" ; $size="150" ;
} }
if($contenido !=""){$contenido = "<img class=' lazy img img-responsive' data-src='$_SESSION[site]milfs/images/secure/?file=$size/$contenido' style='max-height: $size"."px !important;' src=''>"; } if($contenido !=""){$contenido = "<img class=' lazy img img-responsive' $src='$_SESSION[site]milfs/images/secure/?file=$size/$contenido' style='max-height: $size"."px !important;' >"; }
else{$contenido="";} else{$contenido="";}
} }
elseif($campo_tipo=='14'){ elseif($campo_tipo=='14'){
@ -11119,8 +11119,9 @@ $td .= "<td class='planilla_$row[id_campo]' >$imagen</td>";
//@require("includes/datos.php"); //@require("includes/datos.php");
$url_pin =urlencode("$_SESSION[site]milfs/images/iconos/pin.png"); $url_pin =urlencode("$_SESSION[site]milfs/images/iconos/pin.png");
//http://staticmap.openstreetmap.de/staticmap.php?center=40.714728,-73.998672&zoom=14&size=865x512&maptype=mapnik //http://staticmap.openstreetmap.de/staticmap.php?center=40.714728,-73.998672&zoom=14&size=865x512&maptype=mapnik
$contenido = " $contenido = "
<img class='lazy img-round' data-src='http://staticmap.openstreetmap.de/staticmap.php?center=$lon,$lat&zoom=$zoom&size=250x100&maptype=mapnik&markers=$lon,$lat,red-pushpin' > <img class='lazy img-round img img-responsive' $src ='http://staticmap.openstreetmap.de/staticmap.php?center=$lon,$lat&zoom=$zoom&size=250x100&maptype=mapnik&markers=$lon,$lat,red-pushpin' >
"; ";
} else { $contenido ='';} } else { $contenido ='';}