mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	Added option to disable lazy loading of images
This commit is contained in:
		@@ -476,7 +476,12 @@ function generate_lazy_graph_tag($args) {
 | 
			
		||||
        $urlargs[] = $key."=".urlencode($arg);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return '<img class="lazy graphs" width="'.$w.'" height="'.$h.'" data-original="graph.php?' . implode('&',$urlargs).'" border="0" />';
 | 
			
		||||
    if ($config['enable_lazy_load'] === true) {
 | 
			
		||||
        return '<img class="lazy graphs" width="'.$w.'" height="'.$h.'" data-original="graph.php?' . implode('&',$urlargs).'" border="0" />';
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
        return '<img class="graphs" width="'.$w.'" height="'.$h.'" src="graph.php?' . implode('&',$urlargs).'" border="0" />';
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}//end generate_lazy_graph_tag()
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -165,8 +165,14 @@ else {
 | 
			
		||||
  <script src="js/jquery.bootgrid.min.js"></script>
 | 
			
		||||
  <script src="js/handlebars.min.js"></script>
 | 
			
		||||
  <script src="js/pace.min.js"></script>
 | 
			
		||||
    <?php
 | 
			
		||||
        if ($config['enable_lazy_load'] === true) {
 | 
			
		||||
    ?>
 | 
			
		||||
  <script src="js/jquery.lazyload.min.js"></script>
 | 
			
		||||
  <script src="js/lazyload.js"></script>
 | 
			
		||||
    <?php
 | 
			
		||||
        }
 | 
			
		||||
    ?>
 | 
			
		||||
  <script src="js/librenms.js"></script>
 | 
			
		||||
  <script type="text/javascript">
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user