Fix the automatic nb of list
This commit is contained in:
parent
e866f90b12
commit
cbdda5d1a8
2 changed files with 9 additions and 4 deletions
|
|
@ -951,11 +951,14 @@ class Conf extends stdClass
|
|||
}
|
||||
|
||||
// conf->liste_limit = constant to limit size of lists
|
||||
// This value can be overwritten by user choice in main.inc.php
|
||||
$this->liste_limit = getDolGlobalInt('MAIN_SIZE_LISTE_LIMIT', 15);
|
||||
if ((int) $this->liste_limit <= 0) {
|
||||
// Mode automatic.
|
||||
// Mode automatic. Similar code than into main.inc.php
|
||||
$this->liste_limit = 15;
|
||||
if (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 910) {
|
||||
if (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 700) {
|
||||
$this->liste_limit = 8;
|
||||
} elseif (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 910) {
|
||||
$this->liste_limit = 10;
|
||||
} elseif (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] > 1130) {
|
||||
$this->liste_limit = 20;
|
||||
|
|
|
|||
|
|
@ -1405,9 +1405,11 @@ if (!defined('NOLOGIN')) {
|
|||
$conf->liste_limit = getDolUserInt('MAIN_SIZE_LISTE_LIMIT'); // Can be 0
|
||||
}
|
||||
if ((int) $conf->liste_limit <= 0) {
|
||||
// Mode automatic.
|
||||
// Mode automatic. Similar code than into conf.class.php
|
||||
$conf->liste_limit = 15;
|
||||
if (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 910) {
|
||||
if (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 700) {
|
||||
$conf->liste_limit = 8;
|
||||
} elseif (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 910) {
|
||||
$conf->liste_limit = 10;
|
||||
} elseif (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] > 1130) {
|
||||
$conf->liste_limit = 20;
|
||||
|
|
|
|||
Loading…
Reference in a new issue