Merge pull request #2633 from arjitc/patch-19

Use bootstraps own img-responsive class for responsive graphs
This commit is contained in:
Paul Gear
2016-01-07 08:12:34 +10:00
3 changed files with 6 additions and 4 deletions

View File

@@ -485,10 +485,10 @@ function generate_lazy_graph_tag($args) {
}
if ($config['enable_lazy_load'] === true) {
return '<img class="lazy graphs" width="'.$w.'" height="'.$h.'" data-original="graph.php?' . implode('&amp;',$urlargs).'" border="0" />';
return '<img class="lazy img-responsive" data-original="graph.php?' . implode('&amp;',$urlargs).'" border="0" />';
}
else {
return '<img class="graphs" width="'.$w.'" height="'.$h.'" src="graph.php?' . implode('&amp;',$urlargs).'" border="0" />';
return '<img class="img-responsive" src="graph.php?' . implode('&amp;',$urlargs).'" border="0" />';
}
}//end generate_lazy_graph_tag()

View File

@@ -18,9 +18,9 @@ echo '<div class="panel panel-default">
</div>
<div class="panel-body">
';
echo "<div class='row'>";
require 'includes/print-graphrow.inc.php';
echo '</div>';
echo '</div>';
echo '</div>';
$g_i++;

View File

@@ -71,6 +71,8 @@ foreach ($periods as $period) {
$graph_data[] = overlib_link($link, generate_lazy_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL);
}
else {
echo "<div class='col-md-3'>";
echo(overlib_link($link, generate_lazy_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL));
echo "</div>";
}
}