Only update resolution if session variables don't exist

Tune print-graphrow.inc.php to avoid last graph going to a new line in certain cases
This commit is contained in:
Louis Bailleul
2015-11-20 12:47:56 +00:00
parent 4731e8621b
commit b1fd1b3137
3 changed files with 5 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ else {
if($_SESSION['screen_width']) {
if($_SESSION['screen_width'] >= 800) {
$graph_array['width'] = ($_SESSION['screen_width'] - 400 )/count($periods)+1;
$graph_array['width'] = ($_SESSION['screen_width'] - 420 )/count($periods)+1;
}else {
$graph_array['width'] = $_SESSION['screen_width'] - 155;
}

View File

@@ -184,6 +184,10 @@ else {
<?php
if(empty($_SESSION['screen_width']) && empty($_SESSION['screen_height'])) {
echo "<script>updateResolution();</script>";
}
if ((isset($vars['bare']) && $vars['bare'] != "yes") || !isset($vars['bare'])) {
if ($_SESSION['authenticated']) {
require 'includes/print-menubar.php';

View File

@@ -123,7 +123,6 @@ $(document).ready(function() {
});
});
updateResolution();
});
function submitCustomRange(frmdata) {