From 31565017166d5410a7b8459af238b80d8161154b Mon Sep 17 00:00:00 2001 From: jsatoh Date: Sun, 3 Aug 2014 01:52:06 +0000 Subject: [PATCH] 2014-08-03 Junichi Satoh * include/functions_ui.php: Fixed that the fast forward and the going to the last of pagination doesn't work in the modal window for module data display. And fixed incorrect offset calculation for the fast forward. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10373 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/include/functions_ui.php | 21 ++++++++++----------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 9f7416b42b..89872c1e79 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2014-08-03 Junichi Satoh + + * include/functions_ui.php: Fixed that the fast forward and the going + to the last of pagination doesn't work in the modal window for module + data display. + And fixed incorrect offset calculation for the fast forward. + 2014-08-02 Junichi Satoh * operation/agentes/estado_monitores.php: Fixed that module data diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 21b3dd8a91..581adecac4 100644 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1576,9 +1576,9 @@ function ui_pagination ($count, $url = false, $offset = 0, $pagination = 0, $ret // Show GOTO FIRST button if ($other_class == '') { - $output .= ' '; + $output .= ' '; } else { - $output .= " "; + $output .= " "; } // Show PREVIOUS button @@ -1588,9 +1588,9 @@ function ui_pagination ($count, $url = false, $offset = 0, $pagination = 0, $ret $index_page_prev = 0; if ($other_class == '') { - $output .= ''; + $output .= ''; } else { - $output .= ""; + $output .= ""; } } @@ -1629,13 +1629,12 @@ function ui_pagination ($count, $url = false, $offset = 0, $pagination = 0, $ret // Index_counter stores max of blocks if (($paginacion_maxima == 1) AND (($index_counter - $i) > 0)) { $prox_bloque = ($i + ceil ($block_limit / 2)) * $pagination; - if ($prox_bloque > $count) - $prox_bloque = ($count -1) - $pagination; - + if ($prox_bloque >= $count) + $prox_bloque = (int) (($count - 1) / $pagination) * $pagination; if ($other_class == '') { - $output .= ''; + $output .= ''; } else { - $output .= ""; + $output .= ""; } $i = $index_counter; } @@ -1647,9 +1646,9 @@ function ui_pagination ($count, $url = false, $offset = 0, $pagination = 0, $ret $myoffset = floor (($count - 1) / $pagination) * $pagination; if ($other_class == '') { - $output .= ''; + $output .= ''; } else { - $output .= ""; + $output .= ""; } }