From e4c4cced70bfc88b4958892c00affee68975d154 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 14 Apr 2013 16:11:55 +0200 Subject: [PATCH] Look: Optimize for small screen --- htdocs/core/class/dolgraph.class.php | 2 +- htdocs/core/class/html.form.class.php | 2 +- htdocs/theme/eldy/style.css.php | 20 ++++++++++++++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 0306a48eb99..ea1734353d3 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -905,7 +905,7 @@ class DolGraph { global $conf; - if ($direction == 'width') return ($conf->dol_optimize_smallscreen?'400':($defaultsize?$defaultsize:'500')); + if ($direction == 'width') return ($conf->dol_optimize_smallscreen?(empty($_SESSION['dol_screen_width'])?'280':$_SESSION['dol_screen_width']-40):($defaultsize?$defaultsize:'500')); if ($direction == 'height') return ($conf->dol_optimize_smallscreen?'160':($defaultsize?$defaultsize:'200')); return 0; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d342507a8f3..ae60706f523 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3476,7 +3476,7 @@ class Form if ($fullday) $reset_scripts .= ' } '; } // If reset_scripts is not empty, print the button with the reset_scripts in OnClick - if ($reset_scripts) + if ($reset_scripts && empty($conf->dol_optimize_smallscreen)) { $retstring.='