NEW Show tooltip on number of qualified records

This commit is contained in:
Laurent Destailleur
2024-07-05 15:21:46 +02:00
parent 83fd7f1b3d
commit 8e952a82df
4 changed files with 15 additions and 4 deletions

View File

@@ -813,8 +813,13 @@ class Conf extends stdClass
// conf->liste_limit = constant to limit size of lists
$this->liste_limit = getDolGlobalInt('MAIN_SIZE_LISTE_LIMIT', 15);
if ((int) $this->liste_limit <= 0) {
// Mode automatic. TODO Define a value according to height
// Mode automatic.
$this->liste_limit = 15;
if (!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;
}
}
// Set PRODUIT_LIMIT_SIZE if never defined

View File

@@ -6211,7 +6211,7 @@ function load_fiche_titre($title, $morehtmlright = '', $picto = 'generic', $pict
*/
function print_barre_liste($title, $page, $file, $options = '', $sortfield = '', $sortorder = '', $morehtmlcenter = '', $num = -1, $totalnboflines = '', $picto = 'generic', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limit = -1, $hideselectlimit = 0, $hidenavigation = 0, $pagenavastextinput = 0, $morehtmlrightbeforearrow = '')
{
global $conf;
global $conf, $langs;
$savlimit = $limit;
$savtotalnboflines = $totalnboflines;
@@ -6252,7 +6252,7 @@ function print_barre_liste($title, $page, $file, $options = '', $sortfield = '',
print '<div class="titre inline-block">';
print $title; // $title may contains HTML
if (!empty($title) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') {
print '<span class="opacitymedium colorblack paddingleft">('.$totalnboflines.')</span>';
print '<span class="opacitymedium colorblack marginleftonly" title="'.$langs->trans("NbRecordQualified").'">('.$totalnboflines.')</span>';
}
print '</div></td>';

View File

@@ -1298,3 +1298,4 @@ EntityNameNotDefined=No entity name
AllEntities=All entities
TranslationOfKey=Translation of the key AnyTranslationKey
SignedStatus=Signed status
NbRecordQualified=Number of qualified records

View File

@@ -1347,8 +1347,13 @@ if (!defined('NOLOGIN')) {
$conf->liste_limit = getDolUserInt('MAIN_SIZE_LISTE_LIMIT'); // Can be 0
}
if ((int) $conf->liste_limit <= 0) {
// Mode automatic. TODO Define a value according to height
// Mode automatic.
$conf->liste_limit = 15;
if (!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;
}
}
// Replace conf->css by personalized value if theme not forced