- bug correction : when coming from picture.php on a picture of category.php
page superior to the first, the right page was displayed (the one including the element) but the navigation bar was always saying we were on the first page - distinguish CSS classes span.dateSelected and span.pageNumberSelected git-svn-id: http://piwigo.org/svn/trunk@514 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
af5bb2dde0
commit
dd38c14639
5 changed files with 35 additions and 18 deletions
27
category.php
27
category.php
|
|
@ -50,9 +50,25 @@ if ( isset( $page['cat'] ) and is_numeric( $page['cat'] ) )
|
|||
if ( !isset( $_GET['start'] )
|
||||
or !is_numeric( $_GET['start'] )
|
||||
or ( is_numeric( $_GET['start'] ) and $_GET['start'] < 0 ) )
|
||||
{
|
||||
$page['start'] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$page['start'] = $_GET['start'];
|
||||
}
|
||||
|
||||
// Sometimes, a "num" is provided in the URL. It is the number
|
||||
// of the picture to show. This picture must be in the thumbnails page.
|
||||
// We have to find the right $page['start'] that show the num picture
|
||||
// in this category
|
||||
if ( isset( $_GET['num'] )
|
||||
and is_numeric( $_GET['num'] )
|
||||
and $_GET['num'] >= 0 )
|
||||
{
|
||||
$page['start'] = floor( $_GET['num'] / $user['nb_image_page'] );
|
||||
$page['start']*= $user['nb_image_page'];
|
||||
}
|
||||
|
||||
initialize_category();
|
||||
|
||||
|
|
@ -75,17 +91,6 @@ if ( $user['expand'] )
|
|||
$page['tab_expand'] = array();
|
||||
}
|
||||
|
||||
// Sometimes, a "num" is provided in the URL. It is the number
|
||||
// of the picture to show. This picture must be in the thumbnails page.
|
||||
// We have to find the right $page['start'] that show the num picture
|
||||
// in this category
|
||||
if ( isset( $_GET['num'] )
|
||||
and is_numeric( $_GET['num'] )
|
||||
and $_GET['num'] >= 0 )
|
||||
{
|
||||
$page['start'] = floor( $_GET['num'] / $user['nb_image_page'] );
|
||||
$page['start']*= $user['nb_image_page'];
|
||||
}
|
||||
// creating the structure of the categories (useful for displaying the menu)
|
||||
// creating the plain structure : array of all the available categories and
|
||||
// their relative informations, see the definition of the function
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ foreach ($calendar_years as $calendar_year => $nb_picture_year)
|
|||
if (isset($page['calendar_year'])
|
||||
and $calendar_year == $page['calendar_year'])
|
||||
{
|
||||
$years_nav_bar.= ' <span class="selected">'.$calendar_year.'</span>';
|
||||
$years_nav_bar.= ' <span class="dateSelected">'.$calendar_year.'</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -114,7 +114,7 @@ SELECT DISTINCT(MONTH('.$conf['calendar_datefield'].')) AS month
|
|||
if (isset($page['calendar_month'])
|
||||
and $calendar_month == $page['calendar_month'])
|
||||
{
|
||||
$months_nav_bar.= ' <span class="selected">';
|
||||
$months_nav_bar.= ' <span class="dateSelected">';
|
||||
$months_nav_bar.= $lang['month'][(int)$calendar_month];
|
||||
$months_nav_bar.= '</span>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,6 +89,6 @@ $conf['show_exif_fields'] = array('Make',
|
|||
// for PHP version newer than 4.1.2 :
|
||||
// $conf['show_exif_fields'] = array('CameraMake','CameraModel','DateTime');
|
||||
|
||||
$conf['calendar_datefield'] = 'date_creation';
|
||||
$conf['calendar_datefield'] = 'date_available';
|
||||
$conf['rate'] = true;
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ function create_navigation_bar( $url, $nb_element, $start,
|
|||
$temp_start = ( $i - 1 ) * $nb_element_page;
|
||||
if ( $temp_start == $start )
|
||||
{
|
||||
$navigation_bar.= ' <span style="font-weight:bold;">'.$i.'</span> ';
|
||||
$navigation_bar.= ' <span class="pageNumberSelected">'.$i.'</span> ';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -304,8 +304,20 @@ div.information {
|
|||
padding:5px;
|
||||
}
|
||||
|
||||
span.selected {
|
||||
font-weight:bold;
|
||||
span.dateSelected, span.pageNumberSelected {
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
/**
|
||||
* in calendar category, year or month currently focused
|
||||
*/
|
||||
span.dateSelected {
|
||||
}
|
||||
|
||||
/**
|
||||
* in navigation bar, page number currently focused
|
||||
*/
|
||||
span.pageNumberSelected {
|
||||
}
|
||||
|
||||
span.thumb_picture {
|
||||
|
|
@ -365,4 +377,4 @@ td.confLineField {
|
|||
padding:5px 0px 5px 0px;
|
||||
height:20px;
|
||||
background-color:#505050;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue