mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-07 18:18:18 +01:00
Clean code
This commit is contained in:
@@ -1837,7 +1837,7 @@ function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $di
|
||||
if (empty($conf->use_javascript_ajax)) {
|
||||
$out .= ' href="'.DOL_URL_ROOT.$url.'" target="_blank"';
|
||||
} elseif ($jsonopen) {
|
||||
$out .= ' href="#" onclick="javascript:'.$jsonopen.'"';
|
||||
$out .= ' href="#" onclick="'.$jsonopen.'"';
|
||||
} else {
|
||||
$out .= ' href="#"';
|
||||
}
|
||||
@@ -5452,7 +5452,7 @@ function load_fiche_titre($titre, $morehtmlright = '', $picto = 'generic', $pict
|
||||
* Print a title with navigation controls for pagination
|
||||
*
|
||||
* @param string $titre Title to show (required)
|
||||
* @param int $page Numero of page to show in navigation links (required)
|
||||
* @param int|null $page Numero of page to show in navigation links (required)
|
||||
* @param string $file Url of page (required)
|
||||
* @param string $options More parameters for links ('' by default, does not include sortfield neither sortorder). Value must be 'urlencoded' before calling function.
|
||||
* @param string $sortfield Field to sort on ('' by default)
|
||||
@@ -5479,6 +5479,8 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
|
||||
$savtotalnboflines = $totalnboflines;
|
||||
$totalnboflines = abs((int) $totalnboflines);
|
||||
|
||||
$page = (int) $page;
|
||||
|
||||
if ($picto == 'setup') {
|
||||
$picto = 'title_setup.png';
|
||||
}
|
||||
@@ -5529,7 +5531,7 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
|
||||
}
|
||||
// Show navigation bar
|
||||
$pagelist = '';
|
||||
if ($savlimit != 0 && ((int) $page > 0 || $num > $limit)) {
|
||||
if ($savlimit != 0 && ($page > 0 || $num > $limit)) {
|
||||
if ($totalnboflines) { // If we know total nb of lines
|
||||
// Define nb of extra page links before and after selected page + ... + first or last
|
||||
$maxnbofpage = (empty($conf->dol_optimize_smallscreen) ? 4 : 0);
|
||||
@@ -5590,7 +5592,7 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
|
||||
}
|
||||
|
||||
if ($savlimit || $morehtmlright || $morehtmlrightbeforearrow) {
|
||||
print_fleche_navigation((int) $page, $file, $options, $nextpage, $pagelist, $morehtmlright, $savlimit, $totalnboflines, $hideselectlimit, $morehtmlrightbeforearrow, $hidenavigation); // output the div and ul for previous/last completed with page numbers into $pagelist
|
||||
print_fleche_navigation($page, $file, $options, $nextpage, $pagelist, $morehtmlright, $savlimit, $totalnboflines, $hideselectlimit, $morehtmlrightbeforearrow, $hidenavigation); // output the div and ul for previous/last completed with page numbers into $pagelist
|
||||
}
|
||||
|
||||
// js to autoselect page field on focus
|
||||
|
||||
Reference in New Issue
Block a user