mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
apply lazyload patch
This commit is contained in:
@ -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('&',$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.
|
||||
|
Reference in New Issue
Block a user