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 .= ""; } }