apply lazyload patch

This commit is contained in:
Clint Armstrong
2015-07-16 12:42:58 -04:00
parent ef35ee1adc
commit b5e8998c70
23 changed files with 52 additions and 24 deletions

View File

@ -256,7 +256,7 @@ function overlib_link($url, $text, $contents, $class) {
$output .= '>';
}
else {
$output .= " onmouseover=\"return overlib('".$contents."'".$config['overlib_defaults'].', WRAP,HAUTO,VAUTO);" onmouseout="return nd();">';
$output .= " onmouseover=\"return overlib('".$contents."'".$config['overlib_defaults'].",WRAP,HAUTO,VAUTO); \" onmouseout=\"return nd();\">";
}
$output .= $text.'</a>';
@ -430,6 +430,26 @@ function generate_graph_tag($args) {
}//end generate_graph_tag()
function generate_lazy_graph_tag($args) {
$urlargs = array();
$w = 0;
$h = 0;
foreach ($args as $key => $arg) {
switch (strtolower($key)) {
case 'width':
$w = $arg;
break;
case 'height':
$h = $arg;
break;
}
$urlargs[] = $key."=".urlencode($arg);
}
return '<img class="lazy" width="'.$w.'" height="'.$h.'" data-original="graph.php?' . implode('&amp;',$urlargs).'" border="0" />';
}//end generate_lazy_graph_tag()
function generate_graph_js_state($args) {
// we are going to assume we know roughly what the graph url looks like here.