Changeset 5445


Ignore:
Timestamp:
03/29/10 10:40:36 (10 years ago)
Author:
nikrou
Message:

Fix bug 1157 : problem of missing navigation links when number of images
per page selected is less than number of images per pages for user

Location:
extensions/akBookStyle/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/akBookStyle/trunk/CHANGELOG

    r5432 r5445  
     1akBookStyle 0.2.1 - 2010-03-29 
     2================================ 
     3* fix links problem when number of images  
     4 is less than number images by page 
     5 
    16akBookStyle 0.2.0 - 2010-03-28 
    27================================ 
  • extensions/akBookStyle/trunk/css/style.css

    r5432 r5445  
    2424  width: 24px; 
    2525  padding: 200px 0 0 0; 
     26} 
     27 
     28#akPreviousPicture, #akNextPicture {  
     29  visibility: hidden; 
    2630} 
    2731 
  • extensions/akBookStyle/trunk/include/akContent.class.php

    r5432 r5445  
    4747        $this->applicable = true; 
    4848        $page['nb_image_page'] = $this->plugin_config->ak_by_page; 
     49        $GLOBALS['user']['nb_image_page'] = $this->plugin_config->ak_by_page; 
    4950      } 
    5051      else 
     
    5859    global $template; 
    5960     
    60     if ($this->applicable === false) return; 
     61    if (!$this->applicable) { 
     62      return; 
     63    } 
     64 
    6165    $this->category_url = make_index_url(array('section' => 'category', 
    6266                                               'category' => $GLOBALS['page']['category'], 
  • extensions/akBookStyle/trunk/js/ak_jquery-load.js

    r5432 r5445  
    11$(function() { 
     2    next_link = $('table.thumbnails div.navbar a[rel=next]'); 
     3    if (next_link.length!=0) { 
     4      $('#akNextPicture').css('visibility', 'visible'); 
     5    } 
     6    previous_link = $('table.thumbnails div.navbar a[rel=previous]'); 
     7    if (previous_link.length!=0) { 
     8      $('#akPreviousPicture').css('visibility', 'visible'); 
     9    } 
     10     
    211    $("a.load") 
    312      .bind(ak_mouse_event, function() { 
    4           $('table.thumbnails tr td.ncol').each(function() { 
    5               if ($(this).hasClass('selected')) { 
    6                 $(this).removeClass('selected'); 
    7               } 
    8             }); 
     13          $('table.thumbnails tr td.ncol').each(function() { 
     14              if ($(this).hasClass('selected')) { 
     15                $(this).removeClass('selected'); 
     16              } 
     17            }); 
    918 
    1019          $a = $(this); 
     
    1726            } 
    1827            next_link = $('table.thumbnails div.navbar a[rel='+rel+']'); 
    19             window.location = next_link.attr('href'); 
     28            if (next_link.length!=0) { 
     29              window.location = next_link.attr('href'); 
     30            } 
    2031          } else { 
    2132            next_thumbnail.parent().parent().parent().addClass('selected'); 
  • extensions/akBookStyle/trunk/main.inc.php

    r5432 r5445  
    2323/* 
    2424Plugin Name: akBookStyle 
    25 Version: 0.2.0 
     25Version: 0.2.1 
    2626Description: Book style for designers 
    2727Plugin URI: http://piwigo.org/ext/extension_links.php?eid=307 
  • extensions/akBookStyle/trunk/template/ak_thumbnails.tpl

    r5432 r5445  
    1919 
    2020<div id="akBack"> 
    21   <a id="akHome" class="navButton" href="{$SCRIPT_NAME}"  
    22    title="{'Home'|@translate}"  
    23    rel="start"> 
    24   <img src="{$ROOT_URL}{$themeconf.icon_dir}/home.png"  
    25        class="button" alt="{'Home'|@translate}"> 
     21  <a id="akHome" class="navButton" href="{$SCRIPT_NAME}" title="{'Home'|@translate}" rel="start"> 
     22    <img src="{$ROOT_URL}{$themeconf.icon_dir}/home.png" class="button" alt="{'Home'|@translate}"> 
    2623  </a> 
    2724  {if !empty($akUP)} 
    28   <a id="akUp" class="navButton" href="{$akUP}"  
    29    title="{'Thumbnails'|@translate}"  
    30    rel="up"> 
    31   <img src="{$ROOT_URL}{$themeconf.icon_dir}/up.png"  
    32        class="button" alt="{'Thumbnails'|@translate}"> 
     25  <a id="akUp" class="navButton" href="{$akUp}" title="{'Thumbnails'|@translate}" rel="up"> 
     26    <img src="{$ROOT_URL}{$themeconf.icon_dir}/up.png" class="button" alt="{'Thumbnails'|@translate}"> 
    3327  </a> 
    3428  {/if} 
Note: See TracChangeset for help on using the changeset viewer.