Changeset 8528 for extensions/gally


Ignore:
Timestamp:
Jan 8, 2011, 5:34:17 PM (13 years ago)
Author:
grum
Message:

Release 1.4.0
Rewrite some JS
fix bug bug:1983

Location:
extensions/gally/gally-default
Files:
7 added
16 edited

Legend:

Unmodified
Added
Removed
  • extensions/gally/gally-default/admin/Conf.class.inc.php

    r6109 r8528  
    117117  }
    118118
     119  public function confExists($key)
     120  {
     121    return(array_key_exists($key, $this->values));
     122  }
     123
    119124  public function getConfValue($key)
    120125  {
     
    144149
    145150
     151  /**
     152   * function used to initialize config file
     153   *
     154   */
     155  static public function init($theme)
     156  {
     157    $forcedToDefault=array(
     158      "imageCenterMode" => '',
     159      "imageCenterOffset" => '',
     160      "imageCenterTopMin" => '',
     161      "imageCenterTopBorder" => '',
     162      "interfaceAnimated" => '',
     163      "commentAnimated" => '',
     164      "animateDelay" => '',
     165      "marginContainer" => '',
     166      "paddingContainer" => '',
     167      "tabsAnimated" => '',
     168      "tabsHidden" => '',
     169      "tabsVisible" => '',
     170      "tabsPosition" => '',
     171      "commentRows" => '',
     172      "menuAnimated" => '',
     173      "menuWidth" => '',
     174      "menuMaxWidth" => '',
     175      "menuMSIEMaxWidth" => '',
     176      "imageSimulateHighRes" => '',
     177      "imageScrollMinDeadArea" => ''
     178      //"expandMenu" => '',
     179    );
     180    $gallyDefault = new Conf();
     181    $gallyDefault->setFileName(PHPWG_ROOT_PATH."themes/gally-default/conf/default.conf");
     182    $gallyDefault->read();
     183
     184    $configDefault = new Conf();
     185    $configDefault->setFileName(PHPWG_ROOT_PATH."themes/$theme/conf/default.conf");
     186    $configDefault->read();
     187
     188    $configLocal = new Conf();
     189    $configLocal->setFileName(PHPWG_ROOT_PATH."local/themes/$theme/conf/local.conf");
     190    $configLocal->read();
     191
     192    foreach($forcedToDefault as $key => $param)
     193    {
     194      if($gallyDefault->confExists($key)) $forcedToDefault[$key]=$gallyDefault->getConfValue($key);
     195      if($configDefault->confExists($key)) $forcedToDefault[$key]=$configDefault->getConfValue($key);
     196    }
     197    $configLocal->setConf($forcedToDefault, false);
     198    $configLocal->write();
     199  }
     200
    146201}
    147202
  • extensions/gally/gally-default/admin/GallyDefault.class.inc.php

    r7337 r8528  
    2020class GallyDefault
    2121{
     22  const THEME_VERSION = '1.4.0';
     23
    2224  private $directories=Array(
    2325    'templates.parent' => '',
     
    3234  protected $themeProperties = Array(
    3335      'name' => 'Gally/Default',
    34       'version' => '1.3.1'
     36      'version' => self::THEME_VERSION
    3537    );
     38
     39
     40  /**
     41   * function used to activate a theme
     42   *
     43   * @param String $themeId : theme's id (for example 'gally-lapis-lazulis')
     44   * @param String $themeVersion : theme's release (not gally-default release)
     45   * @param String $gallyDefaultNeeded : gally-default release needed
     46   * @param &Array $errors : array of error messages
     47   */
     48  static public function activate($themeId, $themeVersion, $gallyDefaultNeeded, $errors)
     49  {
     50    if(strnatcmp(self::THEME_VERSION, $gallyDefaultNeeded)<0)
     51    {
     52      if(!is_array($errors))
     53      {
     54        if($errors!='')
     55        {
     56          $errors=array($errors);
     57        }
     58        else
     59        {
     60          $errors=array();
     61        }
     62      }
     63
     64      $errors[]=sprintf(l10n('This theme needs Gally-default theme v%s; actually, Gally-default version is %s.'), $gallyDefaultNeeded, self::THEME_VERSION);
     65    }
     66    else
     67    {
     68      Conf::init($themeId);
     69    }
     70    return($errors);
     71  }
     72
     73  /**
     74   * function used to deactivate a theme
     75   *
     76   */
     77  static public function deactivate()
     78  {
     79  }
    3680
    3781  /**
     
    92136    $this->config->read();
    93137    $this->config->setFileName($this->directories['conf.local']."/default.conf");
    94     $this->config->read();
     138    $this->config->read(false);
    95139    $this->config->setFileName(PHPWG_ROOT_PATH."local/themes/".basename(dirname($this->directories['conf.local']))."/conf/local.conf");
    96140    $this->config->read(false);
  • extensions/gally/gally-default/conf/default.conf

    r6752 r8528  
    7272imageCenterTopBorder="imageHeaderBar"
    7373
     74# -- 1.4.0 --
     75# The 'imageScrollMinDeadArea' option allows to define the minimum width for
     76# dead area in scroll mode
     77imageScrollMinDeadArea=0
    7478
    7579# The 'imageInterface' option can take theses values :
     
    195199highResClickMode="zoom"
    196200
    197 
     201# -- 1.4.0 --
     202# the 'manageTips' option can take theses values :
     203#   "yes" => the interface uses the simpleTip.js script to display hints
     204#   "no"  => the interface uses the default browser method to display hints
     205manageTips="no"
     206
     207# -- 1.4.0 --
     208# the 'manageTipsPos' define the default position for tips ; the option can take
     209# theses values :
     210#   "tipOnTop"    => tip is displayed above the object
     211#   "tipOnBottom" => tip is displayed under the object
     212#   "tipOnLeft"   => tip is displayed on the left side of the object
     213#   "tipOnRight"  => tip is displayed on the right side of the object
     214manageTipsPos="tipOnBottom"
    198215
    199216# ------- Menu parameters ------------------------------------------------------
  • extensions/gally/gally-default/css/theme.css

    r6109 r8528  
    66  file version: 1.2.0
    77  ------------------------------------------------------------------------------
    8   author: grum at grum.dnsalias.com
     8  author: grum at piwigo.org
    99  << May the Little SpaceFrog be with you >>
    1010  ------------------------------------------------------------------------------
     
    1313
    1414
    15 
     15.thumbnailCategory {
     16  cursor:pointer;
     17}
  • extensions/gally/gally-default/js/gallyjs-tcp.js

    r6109 r8528  
    44  ------------------------------------------------------------------------------
    55  file: gally/gallyjs-tcp.js
    6   file release: 1.1.0
     6  file release: 1.4.0
    77  ------------------------------------------------------------------------------
    8   author: grum at grum.dnsalias.com
     8  author: grum at piwigo.org
    99  << May the Little SpaceFrog be with you >>
    1010  ------------------------------------------------------------------------------
     
    1616----------------------------------------------------------------------------- */
    1717
    18 var menuState;
    19 
    20 $("document").ready( function()
    21   {
    22     initMenu();
    23     initContentDesc();
     18var gallyCP=null;
     19
     20$(document).ready(
     21  function()
     22  {
     23    gallyCP=new GallyCP();
    2424  }
    2525);
    2626
    2727
    28 function initContentDesc()
     28function GallyCP ()
    2929{
    30   if(($("#additional_infoTOP").length + $("#additional_infoBOTTOM").length)<2)
    31   {
    32     // if div TOP & BOTTOM don't exists, it's not necessary to process this the
    33     // initialisation
    34     return(false);
    35   }
    36 /*
    37   this code permit to manage 3 informations panels with one text area (or 2 if
    38   extended description plugin is used)
    39 
    40   this function don't use a regExp object (due to some freeze with this method
    41   during test)
    42 
    43   known tags :
    44     <!--up-down-->
    45     <!--right-left-->
    46 
    47   if the plugin "ExtendedDescription" is installed, the "<!--up-down-->" tag is
    48   already managed by the plugin :
    49     - top text is in a <div class="additional_info">
    50         => text is moved to the to the '#additional_infoTOP' div  and
    51             the '.additional_info' div added by the plugin is deleted
    52     - bottom text is in <div id="additional_infoLEFT">
    53         => if tag "<!--right-left-->" is present
     30  var menuState,
     31
     32  initContentDesc = function()
     33  {
     34    if(($("#additional_infoTOP").length + $("#additional_infoBOTTOM").length)<2)
     35    {
     36      // if div TOP & BOTTOM don't exists, it's not necessary to process this the
     37      // initialisation
     38      return(false);
     39    }
     40    /*
     41      this code permit to manage 3 informations panels with one text area (or 2 if
     42      extended description plugin is used)
     43
     44      this function don't use a regExp object (due to some freeze with this method
     45      during test)
     46
     47      known tags :
     48        <!--up-down-->
     49        <!--right-left-->
     50
     51      if the plugin "ExtendedDescription" is installed, the "<!--up-down-->" tag is
     52      already managed by the plugin :
     53        - top text is in a <div class="additional_info">
     54            => text is moved to the to the '#additional_infoTOP' div  and
     55                the '.additional_info' div added by the plugin is deleted
     56        - bottom text is in <div id="additional_infoLEFT">
     57            => if tag "<!--right-left-->" is present
     58                text on right is moved to the to the '#additional_infoBOTTOM' div and
     59                removed from the '#additional_infoLEFT' div
     60
     61      if the plugin "ExtendedDescription" is not installed, all the text is in
     62      the <div id="additional_infoLEFT">
     63        => if tag "<!--up-down-->" is present
     64            text on right is moved to the to the '#additional_infoTOP' div and
     65            removed from the '#additional_infoLEFT' div
     66        => if tag "<!--right-left-->" is present on the '#additional_infoLEFT' div
    5467            text on right is moved to the to the '#additional_infoBOTTOM' div and
    5568            removed from the '#additional_infoLEFT' div
    56 
    57   if the plugin "ExtendedDescription" is not installed, all the text is in
    58   the <div id="additional_infoLEFT">
    59     => if tag "<!--up-down-->" is present
    60         text on right is moved to the to the '#additional_infoTOP' div and
    61         removed from the '#additional_infoLEFT' div
    62     => if tag "<!--right-left-->" is present on the '#additional_infoLEFT' div
    63         text on right is moved to the to the '#additional_infoBOTTOM' div and
    64         removed from the '#additional_infoLEFT' div
    65 */
    66 
    67   // <!--up-down--> tag
    68   txt = $("#additional_infoLEFT").attr("innerHTML");
    69   if(txt==null) { txt=""; }
    70   tmp = txt.indexOf("<!--up-down-->");
    71 
    72   if(tmp>-1)
    73   { // tag is not managed by the ExtendedDescription plugin
    74     $("#additional_infoTOP").attr("innerHTML", txt.slice(0,tmp));
    75     txt=txt.substr(tmp+14); //remove the tag
    76   }
    77   else
    78   { // perhaps tag is managed by the ExtendedDescription plugin
    79     $(".additional_info").each( function (i)
     69    */
     70
     71    // <!--up-down--> tag
     72    txt = $("#additional_infoLEFT").attr("innerHTML");
     73    if(txt==null) { txt=""; }
     74    tmp = txt.indexOf("<!--up-down-->");
     75
     76    if(tmp>-1)
     77    { // tag is not managed by the ExtendedDescription plugin
     78      $("#additional_infoTOP").attr("innerHTML", txt.slice(0,tmp));
     79      txt=txt.substr(tmp+14); //remove the tag
     80    }
     81    else
     82    { // perhaps tag is managed by the ExtendedDescription plugin
     83      $(".additional_info").each( function (i)
     84        {
     85          if(this.id=="")
     86          {
     87            $("#additional_infoTOP").attr("innerHTML", $("#additional_infoTOP").attr("innerHTML")+this.innerHTML);
     88            this.parentNode.removeChild(this);
     89          }
     90        }
     91      );
     92    }
     93
     94    // <!--right-left--> tag
     95    tmp = txt.indexOf("<!--right-left-->");
     96
     97    if(tmp>-1)
     98    { // tag is present, cut the right text to the
     99      $("#additional_infoBOTTOM").attr("innerHTML", txt.slice(0,tmp));
     100      txt=txt.substr(tmp+17);
     101    }
     102
     103    $("#additional_infoLEFT").attr("innerHTML", txt);
     104
     105    if((txt.replace(/\s*/im, "")=="")&&($("#additional_infoID").length>0))
     106    {
     107      // remove the left area if empty
     108      $("#additional_infoID").get(0).parentNode.removeChild($("#additional_infoID").get(0));
     109    }
     110    $(".additional_info").css("visibility", "visible");
     111
     112    if($("#additional_infoBOTTOM").attr("innerHTML").replace(/\s*/im, "")=="")
     113    {
     114      // remove the bottom area if empty
     115      $("#additional_infoBOTTOM").get(0).parentNode.removeChild($("#additional_infoBOTTOM").get(0));
     116    }
     117    else
     118    {
     119      $("#additional_infoBOTTOM").css("visibility", "visible");
     120    }
     121
     122    if($("#additional_infoTOP").attr("innerHTML").replace(/\s*/im, "")=="")
     123    {
     124      // remove the top area if empty
     125      $("#additional_infoTOP").get(0).parentNode.removeChild($("#additional_infoTOP").get(0));
     126    }
     127    else
     128    {
     129      $("#additional_infoTOP").css("visibility", "visible");
     130    }
     131  },
     132
     133  initMenu = function ()
     134  {
     135    if(options.menuAnimated != "noswitch")
     136    {
     137      $("#menubar").css(
     138        {
     139          visibility:"hidden",
     140          top: $("#titrePageID").attr("offsetTop")+$("#titrePageID").attr("offsetHeight")-2+'px'
     141        }
     142      );
     143      switchmenu('n');
     144      switch(options.menuWidth)
    80145      {
    81         if(this.id=="")
     146        case "auto":
     147          $("#menubar").css("width", "auto");
     148          maxwidth=options.menuMaxWidth;
     149
     150          regexp = /[1234567]\./i;
     151          if(jQuery.browser.msie && jQuery.browser.version.match(regexp))
     152          {
     153            maxwidth=options.menuMSIEMaxWidth;
     154          }
     155          if(maxwidth>0) { $("#menubar").css("max-width", maxwidth+"px"); }
     156          break;
     157        case "info":
     158          $("#menubar").css("width", $(".additionnal_info").css("width"));
     159          break;
     160        default:
     161          $("#menubar").css("width", options.menuWidth+"px");
     162      }
     163    }
     164    else
     165    {
     166      $("#menubar dl dd").each(
     167        function (index, elem)
    82168        {
    83           $("#additional_infoTOP").attr("innerHTML", $("#additional_infoTOP").attr("innerHTML")+this.innerHTML);
    84           this.parentNode.removeChild(this);
     169          //alert($(this.parentNode).attr('offsetWidth')+"---"+$(this.parentNode).attr('id'));
     170          $(this).css("min-width", $(this.parentNode).attr('offsetWidth'));
     171          if(jQuery.browser.msie)
     172          {
     173            $(this).css("max-width", options.menuMSIEMaxWidth+"px");
     174          }
    85175        }
     176      );
     177    }
     178  },
     179
     180  switchmenu = function(force, iconpath)
     181  {
     182    if(force=='')
     183    {
     184      (!menuState)?force='y':force='n';
     185    }
     186
     187    if(options.menuAnimated == "fade")
     188    {
     189      switch(force)
     190      {
     191        case 'y':
     192          $("#menubar").css({
     193            visibility:"visible",
     194            height:"auto"
     195          }).fadeTo(options.animateDelay,1);
     196          $("#icon_menu").attr("className", "button2");
     197          menuState=true;
     198          break;
     199        default:
     200          $("#menubar").fadeTo(options.animateDelay, 0, function () {
     201            $("#menubar").css({
     202              visibility:"hidden",
     203              height:"0px"
     204            });
     205          });
     206          $("#icon_menu").attr("className", "button");
     207          menuState=false;
    86208      }
    87     );
    88   }
    89 
    90   // <!--right-left--> tag
    91   tmp = txt.indexOf("<!--right-left-->");
    92 
    93   if(tmp>-1)
    94   { // tag is present, cut the right text to the
    95     $("#additional_infoBOTTOM").attr("innerHTML", txt.slice(0,tmp));
    96     txt=txt.substr(tmp+17);
    97   }
    98 
    99   $("#additional_infoLEFT").attr("innerHTML", txt);
    100 
    101   if((txt.replace(/\s*/im, "")=="")&&($("#additional_infoID").length>0))
    102   {
    103     // remove the left area if empty
    104     $("#additional_infoID").get(0).parentNode.removeChild($("#additional_infoID").get(0));
    105   }
    106   $(".additional_info").css("visibility", "visible");
    107 
    108   if($("#additional_infoBOTTOM").attr("innerHTML").replace(/\s*/im, "")=="")
    109   {
    110     // remove the bottom area if empty
    111     $("#additional_infoBOTTOM").get(0).parentNode.removeChild($("#additional_infoBOTTOM").get(0));
    112   }
    113   else
    114   {
    115     $("#additional_infoBOTTOM").css("visibility", "visible");
    116   }
    117 
    118   if($("#additional_infoTOP").attr("innerHTML").replace(/\s*/im, "")=="")
    119   {
    120     // remove the top area if empty
    121     $("#additional_infoTOP").get(0).parentNode.removeChild($("#additional_infoTOP").get(0));
    122   }
    123   else
    124   {
    125     $("#additional_infoTOP").css("visibility", "visible");
    126   }
    127 }
    128 
    129 
    130 function initMenu()
    131 {
    132   if(options.menuAnimated != "noswitch")
    133   {
    134     $("#menubar").css(
     209    }
     210    else
     211    {
     212      switch(force)
    135213      {
    136         visibility:"hidden",
    137         top: $("#titrePageID").attr("offsetTop")+$("#titrePageID").attr("offsetHeight")-2+'px'
    138       }
    139     );
    140     switchmenu('n');
    141     switch(options.menuWidth)
    142     {
    143       case "auto":
    144         $("#menubar").css("width", "auto");
    145         maxwidth=options.menuMaxWidth;
    146 
    147         regexp = /[1234567]\./i;
    148         if(jQuery.browser.msie && jQuery.browser.version.match(regexp))
    149         {
    150           maxwidth=options.menuMSIEMaxWidth;
    151         }
    152         if(maxwidth>0) { $("#menubar").css("max-width", maxwidth+"px"); }
    153         break;
    154       case "info":
    155         $("#menubar").css("width", $(".additionnal_info").css("width"));
    156         break;
    157       default:
    158         $("#menubar").css("width", options.menuWidth+"px");
    159     }
    160   }
    161   else
    162   {
    163     $("#menubar dl dd").each(
    164       function (index, elem)
    165       {
    166         //alert($(this.parentNode).attr('offsetWidth')+"---"+$(this.parentNode).attr('id'));
    167         $(this).css("min-width", $(this.parentNode).attr('offsetWidth'));
    168         if(jQuery.browser.msie)
    169         {
    170           $(this).css("max-width", options.menuMSIEMaxWidth+"px");
    171         }
    172       }
    173     );
    174   }
    175 }
    176 
    177 
    178 function switchmenu(force, iconpath)
    179 {
    180   if(force=='')
    181   {
    182     (!menuState)?force='y':force='n';
    183   }
    184 
    185   if(options.menuAnimated == "fade")
    186   {
    187     switch(force)
    188     {
    189       case 'y':
    190         $("#menubar").css({
    191           visibility:"visible",
    192           height:"auto"
    193         }).fadeTo(options.animateDelay,1);
    194         $("#icon_menu").attr("className", "button2");
    195         menuState=true;
    196         break;
    197       default:
    198         $("#menubar").fadeTo(options.animateDelay, 0, function () {
     214        case 'y':
     215          $("#menubar").css({
     216            visibility:"visible",
     217            height:"auto"
     218          });
     219          $("#icon_menu").attr("className", "button2");
     220          menuState=true;
     221          break;
     222        default:
    199223          $("#menubar").css({
    200224            visibility:"hidden",
    201225            height:"0px"
    202226          });
    203         });
    204         $("#icon_menu").attr("className", "button");
    205         menuState=false;
    206     }
    207   }
    208   else
    209   {
    210     switch(force)
    211     {
    212       case 'y':
    213         $("#menubar").css({
    214           visibility:"visible",
    215           height:"auto"
    216         });
    217         $("#icon_menu").attr("className", "button2");
    218         menuState=true;
    219         break;
    220       default:
    221         $("#menubar").css({
    222           visibility:"hidden",
    223           height:"0px"
    224         });
    225         $("#icon_menu").attr("className", "button");
    226         menuState=false;
    227     }
    228   }
     227          $("#icon_menu").attr("className", "button");
     228          menuState=false;
     229      }
     230    }
     231  };
     232
     233  this.switchmenu = function(force, iconpath) { switchmenu(force, iconpath); };
     234
     235  initMenu();
     236  initContentDesc();
    229237}
     238
     239
  • extensions/gally/gally-default/js/gallyjs-tpp.js

    r7337 r8528  
    44  ------------------------------------------------------------------------------
    55  file: gally/gallyjs-tpp.js
    6   file release: 1.3.4
     6  file release: 1.4.0
    77  ------------------------------------------------------------------------------
    8   author: grum at grum.dnsalias.com
     8  author: grum at piwigo.org
    99  << May the Little SpaceFrog be with you >>
    1010  ------------------------------------------------------------------------------
     
    1616----------------------------------------------------------------------------- */
    1717
    18 
    19 var showtabs;
    20 var selectedTab;
    21 var interfaceTimerDelay;
    22 var isScrollable;
    23 var zoomMode;
    24 
    25 $("document").ready(
     18var gallyPP=null;
     19
     20$(document).ready(
    2621  function()
    2722  {
    28     inittoolbar();
     23    gallyPP=new GallyPP();
    2924  }
    3025);
    3126
    32 function inittoolbar()
    33 {
    34   $(document).data("initialized", 0);
    35   $(document).data("interface", false);
    36   $(document).data("highWidth", 0);
    37   $(document).data("highHeight", 0);
    38 
    39   regexp = /[1234567]\./i;
    40 
    41   if(jQuery.browser.msie && jQuery.browser.version.match(regexp))
    42   {
    43     // this features don't work with the f*****g msie browser version <= 7.0
    44     // it seems to be functionnal with ie 8.0
    45     options.interfaceAnimated="none";
    46     options.imageAutoScroll=false;
    47   }
    48 
    49   if(options.imageAutoScroll)
    50   {
    51     $("html").css("overflow-x", "hidden");
    52   }
    53   else
    54   {
    55     $("html").css("overflow-x", "scroll");
    56   }
    57 
    58   if(options.imageCenterTopBorder == "imageHeaderBar")
    59   {
    60     options.imageCenterTopMin+=$("#imageHeaderBar").get(0).offsetTop+$("#imageHeaderBar").get(0).offsetHeight;
    61   }
    62 
    63   if(!options.interfaceCanSwitch)
    64   {
    65     options.interfaceHidden=false;
    66   }
    67 
    68   zoomMode=options.defaultZoomSize;
    69   currentTab=-1;
    70   selectedTab=-1;
    71   interfaceTimerDelay = null;
    72   switchInterface('0', true);
    73   initializeImageMode("init");
    74 
    75 
    76   if((options.interfaceOnImage=="always" || (options.interfaceOnImage=="noscroll" && !isScrollable)) && options.interfaceCanSwitch)
    77   {
    78     $("#theImg").bind("mouseenter", function () { switchInterface('y', true); } )
    79                 .bind("mouseleave", function () { switchInterface('n', true); } )
    80                 .bind("mousemove", function () { switchInterface('y', true); } );
    81   }
    82 
    83   if(options.interfaceCanSwitch)
    84   {
    85     $("#imageHeaderBar").bind("mouseenter", function () { switchInterface('y', false); } )
    86                         .bind("mousemove", function () { switchInterface('y', false); } );
    87     $("#imageToolBar").bind("mouseenter", function () { switchInterface('y', true); } )
    88                       .bind("mouseleave", function () { switchInterface('n', true); } )
    89                       .bind("mousemove", function () { switchInterface('y', true); } );
    90 
    91 
    92     $("#navThumbPrev").bind("mouseenter", function () { switchInterface('Y', true); } )
    93                       .bind("mouseleave", function () { switchInterface('n', true); } )
    94                       .bind("mousemove", function () { switchInterface('y', true); } );
    95 
    96     $("#navThumbNext").bind("mouseenter", function () { switchInterface('Y', true); } )
    97                       .bind("mouseleave", function () { switchInterface('n', true); } )
    98                       .bind("mousemove", function () { switchInterface('y', true); } );
    99   }
    100 
    101 
    102   $("#navThumbPrev").css("top", $("#navThumbPrev").attr("offsetTop")+$("#theHeader").attr("offsetHeight")+$("#theHeaderAlt").attr("offsetHeight")+"px");
    103   $("#navThumbNext").css("top", $("#navThumbNext").attr("offsetTop")+$("#theHeader").attr("offsetHeight")+$("#theHeaderAlt").attr("offsetHeight")+"px");
    104 
    105   $("#theImage").css("top", $("#theImage").attr("offsetTop")+$("#theHeader").attr("offsetHeight")+$("#theHeaderAlt").attr("offsetHeight")+"px");
    106 
    107   $("#contentid").attr("rows", options.commentRows);
    108 
    109   /* fx duration option set to 0 doesn't work so... */
    110   if(options.animateDelay>0)
    111   {
    112     $("#theTabs").tabs({ fx: { opacity: 'toggle', duration:options.animateDelay } } );
    113   }
    114   else
    115   {
    116     $("#theTabs").tabs();
    117   }
    118   switchTabs('n');
    119 
    120 
    121   if(options.interfaceCanSwitch)
    122   {
    123     $('#theTabsContainer').bind("mouseenter", function () { switchInterface('Y', false); } )
    124                           .bind("mouseleave", function () { switchInterface('n'); } )
     27function GallyPP () {
     28  var tabs={
     29        show:'n',
     30        current:-1,
     31        selected:-1
     32      },
     33      interface={
     34        visible:false,
     35        initialized:0,
     36        timerDelay:null
     37      },
     38      image={
     39        isScrollable:false,
     40        highWidth:0,
     41        highHeight:0,
     42        leftPos:0,
     43        zoomMode:''
     44      },
     45      container=null,
     46
     47  /**
     48   * initialize the object
     49   */
     50  init = function()
     51  {
     52    regexp = /[1234567]\./i;
     53
     54    if(jQuery.browser.msie && jQuery.browser.version.match(regexp))
     55    {
     56      // this features don't work with the f*****g msie browser version <= 7.0
     57      // it seems to be functionnal with ie 8.0
     58      options.interfaceAnimated="none";
     59      options.imageAutoScroll=false;
     60    }
     61
     62    if(options.imageAutoScroll)
     63    {
     64      $("html").css("overflow-x", "hidden");
     65    }
     66    else
     67    {
     68      $("html").css("overflow-x", "scroll");
     69    }
     70
     71    if(options.imageCenterTopBorder == "imageHeaderBar")
     72    {
     73      options.imageCenterTopMin+=$("#imageHeaderBar").get(0).offsetTop+$("#imageHeaderBar").get(0).offsetHeight;
     74    }
     75
     76    if(!options.interfaceCanSwitch)
     77    {
     78      options.interfaceHidden=false;
     79    }
     80
     81    image.zoomMode=options.defaultZoomSize;
     82
     83    switchInterface('0', true);
     84    initializeImageMode("init");
     85
     86
     87    if((options.interfaceOnImage=="always" || (options.interfaceOnImage=="noscroll" && !image.isScrollable)) && options.interfaceCanSwitch)
     88    {
     89      $("#theImg").bind("mouseenter", function () { switchInterface('y', true); } )
     90                  .bind("mouseleave", function () { switchInterface('n', true); } )
     91                  .bind("mousemove", function () { switchInterface('y', true); } );
     92    }
     93
     94    if(options.interfaceCanSwitch)
     95    {
     96      $("#imageHeaderBar").bind("mouseenter", function () { switchInterface('y', false); } )
    12597                          .bind("mousemove", function () { switchInterface('y', false); } );
    126   }
    127 
    128   $("#theTabs").bind('tabsselect', function(event, ui)
    129     {
    130       /* The "collapsible" option don't work with jQuery 1.2.6
    131        * This function aims to reproduct this functionnality
    132       */
    133       selectedTab=ui.index;
    134     }
    135   );
    136 
    137   $('.tab a').click(function()
    138     {
    139       /* The "collapsible" option don't work with jQuery 1.2.6
    140        * This function aims to reproduct this functionnality
    141       */
    142       $(this).get(0).blur();
    143       if(selectedTab == currentTab)
    144       {
    145         if (currentTab!=-1) switchTabs('n');
    146         currentTab=-1;
    147         selectedTab=-1;
    148       }
    149       else
    150       {
    151         if(currentTab==-1) switchTabs('y');
    152         currentTab=selectedTab;
    153       }
    154     }
    155   );
    156 
    157   $(window).resize( function () { initializeImageMode("resize"); } );
    158 
    159   $(document).data("initialized", 1).trigger('gallyInterfaceReady');
    160 }
    161 
    162 function simulateHighRes()
    163 {
    164   if(isScrollable && options.imageHaveHighRes==false && options.imageSimulateHighRes)
    165   {
    166     $('#theImgContainer').bind('click', function ()
    167       {
    168         openDisplayHigh($('#theImg').attr('src'));
    169       }
    170     ).addClass('pointer');
    171   }
    172 
    173 }
    174 
    175 function initializeImageMode(mode)
    176 {
    177   if(mode=="init")
    178   {
    179     theHeaderHeight=$("#theHeader").attr("offsetHeight")+$("#theHeaderAlt").attr("offsetHeight");
    180 
    181     $("#imageToolBar").css("top", $("#imageToolBar").attr("offsetTop")+theHeaderHeight+$("#imageHeaderBar").attr("offsetHeight")+"px");
    182 
    183     if(options.tabsPosition=="bottom")
    184     {
    185       copyrightArea = $("#copyright").attr("clientHeight")+1;
    186       $("#theTabsContainer").css("bottom", copyrightArea+"px");
    187     }
    188     else if(options.tabsPosition=="top")
    189     {
    190       toolBarArea = $("#imageToolBar").attr("offsetTop")+$("#imageToolBar").attr("offsetHeight");
    191       $("#theTabsContainer").css("top", toolBarArea+"px");
    192     }
    193 
    194     if($("#navThumbPrev").length>0)
    195     {
    196       $("#navThumbPrev").css("height", $("#copyright").attr("offsetTop")-$("#navThumbPrev").attr("offsetTop")-options.tabsHidden+"px");
    197     }
    198     if($("#navThumbNext").length>0)
    199     {
    200       $("#navThumbNext").css("height", $("#copyright").attr("offsetTop")-$("#navThumbNext").attr("offsetTop")-options.tabsHidden+"px");
    201     }
    202   }
    203 
    204   cssValues = new Object;
    205   cssValues.height = $("#theImg").attr("height")+"px";
    206 
    207   // autoscroll
    208   if(options.imageAutoScroll && ($("#theImg").attr("scrollWidth")>($("#theImage").attr("clientWidth")-2*options.marginContainer)))
    209   {
    210     cssValues.width = ($("#theImage").attr("clientWidth")- 2*options.marginContainer)+"px";
    211 
    212     $("#theImage").bind("mousemove",
    213       function(event){
    214         deadArea = $("#navThumbPrev").attr("clientWidth")*1.2;
    215         mouse=Math.max(Math.min(event.clientX-this.offsetLeft, this.clientWidth - deadArea), deadArea);
    216         $("#theImg")
    217           .css("left",Math.round(($("#theImg").attr("scrollWidth")-this.clientWidth) * -(mouse-deadArea)/(this.clientWidth-2*deadArea))+"px")
    218           .trigger('scrolled');
     98      $("#imageToolBar").bind("mouseenter", function () { switchInterface('y', true); } )
     99                        .bind("mouseleave", function () { switchInterface('n', true); } )
     100                        .bind("mousemove", function () { switchInterface('y', true); } );
     101
     102
     103      $("#navThumbPrev").bind("mouseenter", function () { switchInterface('Y', true); } )
     104                        .bind("mouseleave", function () { switchInterface('n', true); } )
     105                        .bind("mousemove", function () { switchInterface('y', true); } );
     106
     107      $("#navThumbNext").bind("mouseenter", function () { switchInterface('Y', true); } )
     108                        .bind("mouseleave", function () { switchInterface('n', true); } )
     109                        .bind("mousemove", function () { switchInterface('y', true); } );
     110    }
     111
     112
     113    $("#navThumbPrev").css("top", $("#navThumbPrev").attr("offsetTop")+$("#theHeader").attr("offsetHeight")+$("#theHeaderAlt").attr("offsetHeight")+"px");
     114    $("#navThumbNext").css("top", $("#navThumbNext").attr("offsetTop")+$("#theHeader").attr("offsetHeight")+$("#theHeaderAlt").attr("offsetHeight")+"px");
     115
     116    $("#theImage").css("top", $("#theImage").attr("offsetTop")+$("#theHeader").attr("offsetHeight")+$("#theHeaderAlt").attr("offsetHeight")+"px");
     117
     118    $("#contentid").attr("rows", options.commentRows);
     119
     120    /* fx duration option set to 0 doesn't work so... */
     121    if(options.animateDelay>0)
     122    {
     123      $("#theTabs").tabs({ fx: { opacity: 'toggle', duration:options.animateDelay } } );
     124    }
     125    else
     126    {
     127      $("#theTabs").tabs();
     128    }
     129    switchTabs('n');
     130
     131
     132    if(options.interfaceCanSwitch)
     133    {
     134      $('#theTabsContainer').bind("mouseenter", function () { switchInterface('Y', false); } )
     135                            .bind("mouseleave", function () { switchInterface('n'); } )
     136                            .bind("mousemove", function () { switchInterface('y', false); } );
     137    }
     138
     139    $("#theTabs").bind('tabsselect', function(event, ui)
     140      {
     141        /* The "collapsible" option don't work with jQuery 1.2.6
     142         * This function aims to reproduct this functionnality
     143        */
     144        tabs.selected=ui.index;
    219145      }
    220146    );
    221     isScrollable=true;
    222   }
    223   else
    224   {
    225     $("#theImage").unbind("mousemove");
    226     $("#theImg").css("left", "0px");
    227     cssValues.width = $("#theImg").attr("scrollWidth")+"px";
    228     isScrollable=false;
    229   }
    230   $("#theImgContainer").css(cssValues);
    231 
    232   // imagecenter
    233   if($("#copyright").css("position")=="fixed")
    234   {
    235     $("#theImage").css("padding-bottom", $("#copyright").attr("offsetHeight")+"px");
    236   }
    237   switch(options.imageCenterMode)
    238   {
    239     case "img":
    240       imgTop = $("#theImgContainer").attr('offsetHeight');
    241       break;
    242     case "all":
    243       imgTop = $("#theImage").attr('offsetHeight');
    244       break;
    245     default:
    246       imgTop = -10000;
    247       break;
    248   }
    249   imgTop = ($("#copyright").attr("offsetTop") - ($("#imageHeaderBar").attr("offsetTop") + $("#imageHeaderBar").attr("offsetHeight")) - imgTop)/2 + options.imageCenterOffset;
    250 
    251   if(imgTop<options.imageCenterTopMin)
    252   {
    253     imgTop=options.imageCenterTopMin;
    254   }
    255   imgTop=imgTop+"px";
    256 
    257   $("#theImage").css("top", imgTop);
    258 
    259   simulateHighRes();
    260 
    261 }
    262 
    263 function switchInterface(show, resetTimer)
    264 {
    265   /*
    266   uiImg class is affected on this elements :
    267   $("#imageToolBarContainer").stop(true, false).fadeTo(animateDelay, 1);
    268   $("#imageInfosContainer").stop(true, false).fadeTo(animateDelay, 1);
    269   $("#navThumbPrevContainer").stop(true, false).fadeTo(animateDelay, 1);
    270   $("#navThumbNextContainer").stop(true, false).fadeTo(animateDelay, 1);
    271   */
    272 
    273   if(($(document).data("initialized")==1)&&(options.interfaceHidden))
    274   {
    275     $(document).data("initialized", 2);
    276     if(show=="Y") return('');
    277   }
    278 
    279   if(!options.interfaceHidden && show=="0")  { show="1"; }
    280 
    281   // works with jQuery 1.2.6 (support function need jQuery 1.3)
    282   if(options.interfaceAnimated=="fade")
    283   {
    284     switch(show)
    285     {
    286       case '0':
    287         $(".uiImg").css({opacity: 0, visibility:"hidden"});
    288         $(document).data("interface", false);
     147
     148    $('.tab a').click(function()
     149      {
     150        /* The "collapsible" option don't work with jQuery 1.2.6
     151         * This function aims to reproduct this functionnality
     152        */
     153        $(this).get(0).blur();
     154        if(tabs.selected == tabs.current)
     155        {
     156          if (tabs.current!=-1) switchTabs('n');
     157          tabs.current=-1;
     158          tabs.selected=-1;
     159        }
     160        else
     161        {
     162          if(tabs.current==-1) switchTabs('y');
     163          tabs.current=tabs.selected;
     164        }
     165      }
     166    );
     167
     168    $(window).resize( function () { initializeImageMode("resize"); } );
     169
     170    interface.initialized=1;
     171    $(document).trigger('gallyInterfaceReady');
     172  },
     173
     174  simulateHighRes = function ()
     175  {
     176    if(image.isScrollable && options.imageHaveHighRes==false && options.imageSimulateHighRes)
     177    {
     178      $('#theImgContainer').bind('click', function ()
     179        {
     180          openDisplayHigh($('#theImg').attr('src'));
     181        }
     182      ).addClass('pointer');
     183    }
     184
     185  },
     186
     187  initializeImageMode = function (mode)
     188  {
     189    if(mode=="init")
     190    {
     191      theHeaderHeight=$("#theHeader").attr("offsetHeight")+$("#theHeaderAlt").attr("offsetHeight");
     192
     193      $("#imageToolBar").css("top", $("#imageToolBar").attr("offsetTop")+theHeaderHeight+$("#imageHeaderBar").attr("offsetHeight")+"px");
     194
     195      if(options.tabsPosition=="bottom")
     196      {
     197        copyrightArea = $("#copyright").attr("clientHeight")+1;
     198        $("#theTabsContainer").css("bottom", copyrightArea+"px");
     199      }
     200      else if(options.tabsPosition=="top")
     201      {
     202        toolBarArea = $("#imageToolBar").attr("offsetTop")+$("#imageToolBar").attr("offsetHeight");
     203        $("#theTabsContainer").css("top", toolBarArea+"px");
     204      }
     205
     206      if($("#navThumbPrev").length>0)
     207      {
     208        $("#navThumbPrev").css("height", $("#copyright").attr("offsetTop")-$("#navThumbPrev").attr("offsetTop")-options.tabsHidden+"px");
     209      }
     210      if($("#navThumbNext").length>0)
     211      {
     212        $("#navThumbNext").css("height", $("#copyright").attr("offsetTop")-$("#navThumbNext").attr("offsetTop")-options.tabsHidden+"px");
     213      }
     214    }
     215
     216    cssValues = new Object;
     217    cssValues.height = $("#theImg").attr("height")+"px";
     218
     219    // autoscroll
     220    if(options.imageAutoScroll && ($("#theImg").attr("scrollWidth")>($("#theImage").attr("clientWidth")-2*options.marginContainer)))
     221    {
     222      cssValues.width = ($("#theImage").attr("clientWidth")- 2*(options.marginContainer+options.paddingContainer))+"px";
     223
     224      $("#theImage").bind("mousemove",
     225        function(event){
     226          deadArea = Math.max(options.imageScrollMinDeadArea, $("#navThumbPrev").attr("clientWidth")*1.2);
     227          mouse=Math.max(Math.min(event.clientX-image.leftPos, this.clientWidth - deadArea), deadArea);
     228          $("#theImg")
     229            .css("left",Math.round(($("#theImg").attr("scrollWidth")-this.clientWidth) * -(mouse-deadArea)/(this.clientWidth-2*deadArea))+"px")
     230            .trigger('scrolled');
     231        }
     232      );
     233      image.isScrollable=true;
     234    }
     235    else
     236    {
     237      $("#theImage").unbind("mousemove");
     238      $("#theImg").css("left", "0px");
     239      cssValues.width = $("#theImg").attr("scrollWidth")+"px";
     240      image.isScrollable=false;
     241    }
     242    $("#theImgContainer").css(cssValues);
     243
     244    // imagecenter
     245    if($("#copyright").css("position")=="fixed")
     246    {
     247      $("#theImage").css("padding-bottom", $("#copyright").attr("offsetHeight")+"px");
     248    }
     249    switch(options.imageCenterMode)
     250    {
     251      case "img":
     252        imgTop = $("#theImgContainer").attr('offsetHeight');
    289253        break;
    290       case '1':
    291         if(!$(document).data("interface")) $(".uiImg").css({opacity: 1, visibility:"visible"});
    292         $(document).data("interface", true);
    293         if(resetTimer) resetInterfaceTimer();
    294         break;
    295       case '2':
    296         //if($(document).data("interface")) break;
    297       case 'Y':
    298       case 'y':
    299         if(!$(document).data("interface")) $(".uiImg").css("visibility","visible").stop(true, false).fadeTo(options.animateDelay, 1);
    300         $(document).data("interface", true);
    301         if(resetTimer) resetInterfaceTimer();
     254      case "all":
     255        imgTop = $("#theImage").attr('offsetHeight');
    302256        break;
    303257      default:
    304         $(".uiImg").stop(true, false).fadeTo(options.animateDelay, 0, function ()
     258        imgTop = -10000;
     259        break;
     260    }
     261    imgTop = ($("#copyright").attr("offsetTop") - ($("#imageHeaderBar").attr("offsetTop") + $("#imageHeaderBar").attr("offsetHeight")) - imgTop)/2 + options.imageCenterOffset;
     262
     263    if(imgTop<options.imageCenterTopMin)
     264    {
     265      imgTop=options.imageCenterTopMin;
     266    }
     267    imgTop=imgTop+"px";
     268
     269    $("#theImage").css("top", imgTop);
     270
     271
     272    image.leftPos=$('#theImage').offset().left;
     273
     274    simulateHighRes();
     275
     276  },
     277
     278  switchInterface = function (show, resetTimer)
     279  {
     280    if((interface.initialized==1)&&(options.interfaceHidden))
     281    {
     282      interface.initialized=2;
     283      if(show=="Y") return('');
     284    }
     285
     286    if(!options.interfaceHidden && show=="0")  { show="1"; }
     287
     288    // works with jQuery 1.2.6 (support function need jQuery 1.3)
     289    if(options.interfaceAnimated=="fade")
     290    {
     291      switch(show)
     292      {
     293        case '0':
     294          $(".uiImg").css({opacity: 0, visibility:"hidden"});
     295          interface.visible=false;
     296          break;
     297        case '1':
     298          if(!interface.visible) $(".uiImg").css({opacity: 1, visibility:"visible"});
     299          interface.visible=true;
     300          if(resetTimer) resetInterfaceTimer();
     301          break;
     302        case '2':
     303          //if(interface.visible) break;
     304        case 'Y':
     305        case 'y':
     306          if(!interface.visible) $(".uiImg").css("visibility","visible").stop(true, false).fadeTo(options.animateDelay, 1);
     307          interface.visible=true;
     308          if(resetTimer) resetInterfaceTimer();
     309          break;
     310        default:
     311          $(".uiImg").stop(true, false).fadeTo(options.animateDelay, 0, function ()
     312            {
     313              this.style.visibility="hidden";
     314              interface.visible=false;
     315            }
     316          );
     317          clearInterfaceTimer();
     318          break;
     319      }
     320    }
     321    else
     322    {
     323      //other value....
     324      switch(show)
     325      {
     326        case 'y':
     327        case 'Y':
     328        case '1':
     329        case '2':
     330          if(!interface.visible) $(".uiImg").css("visibility", "visible");
     331          interface.visible=true;
     332          if(resetTimer) resetInterfaceTimer();
     333          break;
     334        default:
     335          $(".uiImg").css("visibility", "hidden");
     336          interface.visible=false;
     337          clearInterfaceTimer();
     338          break;
     339      }
     340    }
     341  },
     342
     343  switchTabs = function(show)
     344  {
     345    if(show!='')
     346    {
     347      tabs.show=show;
     348    }
     349    else
     350    {
     351      if(tabs.show!='n')
     352      {
     353        tabs.show='n';
     354      }
     355      else
     356      {
     357        tabs.show='y';
     358      }
     359    }
     360
     361    if(options.tabsAnimated)
     362    {
     363      if(tabs.show=='y')
     364      {
     365        $("#theTabsContainer").animate({height:options.tabsVisible+"px"}, options.animateDelay).trigger('resize');
     366      }
     367      else
     368      {
     369        $('#theTabs div.tabPanel').addClass("ui-tabs-hide").css("display", "");
     370        $('#theTabs li').removeClass("ui-tabs-selected");
     371        $("#theTabsContainer").animate({height:options.tabsHidden+"px"}, options.animateDelay).trigger('resize');
     372      }
     373    }
     374    else
     375    {
     376      if(tabs.show=='y')
     377      {
     378        $("#theTabsContainer").css({height:options.tabsVisible+"px"}).trigger('resize');
     379      }
     380      else
     381      {
     382        $('#theTabs div.tabPanel').addClass("ui-tabs-hide").css("display", "");
     383        $('#theTabs li').removeClass("ui-tabs-selected");
     384        $("#theTabsContainer").css({height:options.tabsHidden+"px"}).trigger('resize');
     385      }
     386    }
     387  },
     388
     389  clearInterfaceTimer = function()
     390  {
     391    if(interface.timerDelay!=null)
     392    {
     393      window.clearInterval(interface.timerDelay);
     394      interface.timerDelay=null;
     395    }
     396  },
     397
     398  resetInterfaceTimer = function()
     399  {
     400    clearInterfaceTimer();
     401    if(options.interfaceTimerDelay>0 && options.interfaceCanSwitch) interface.timerDelay=window.setInterval(switchInterface, options.interfaceTimerDelay, "n", false);
     402  },
     403
     404  openDisplayHigh = function(url)
     405  {
     406    $('#theImageHigh').css(
     407      {
     408        width:$("html").get(0).scrollWidth+"px",
     409        height:$("html").get(0).scrollHeight+"px",
     410        display:"block"
     411      }
     412    );
     413
     414    if($("#theImgHigh").attr('src')=="")
     415    {
     416      p = new Object();
     417      p.left = (($(window).width()-$("#theImgHighContainer").attr("clientWidth")-options.paddingContainer*2)/2)+"px";
     418      p.top = (($(window).height()-$("#theImgHighContainer").attr("clientHeight")-options.paddingContainer*2)/2)+"px";
     419
     420
     421      $('#theImgHighContainer')
     422        .css(
    305423          {
    306             this.style.visibility="hidden";
    307             $(document).data("interface", false);
     424            left:p.left,
     425            top:p.top,
     426            padding:options.paddingContainer+"px"
    308427          }
    309428        );
    310         clearInterfaceTimer();
    311         break;
    312     }
    313   }
    314   else
    315   {
    316     //other value....
    317     switch(show)
    318     {
    319       case 'y':
    320       case 'Y':
    321       case '1':
    322       case '2':
    323         if(!$(document).data("interface")) $(".uiImg").css("visibility", "visible");
    324         $(document).data("interface", true);
    325         if(resetTimer) resetInterfaceTimer();
    326         break;
    327       default:
    328         $(".uiImg").css("visibility", "hidden");
    329         $(document).data("interface", false);
    330         clearInterfaceTimer();
    331         break;
    332     }
    333   }
    334 }
    335 
    336 function switchTabs(show)
    337 {
    338   if(show!='')
    339   {
    340     showtabs=show;
    341   }
    342   else
    343   {
    344     if(showtabs!='n')
    345     {
    346       showtabs='n';
    347     }
    348     else
    349     {
    350       showtabs='y';
    351     }
    352   }
    353 
    354   if(options.tabsAnimated)
    355   {
    356     if(showtabs=='y')
    357     {
    358       $("#theTabsContainer").animate({height:options.tabsVisible+"px"}, options.animateDelay).trigger('resize');
    359     }
    360     else
    361     {
    362       $('#theTabs div.tabPanel').addClass("ui-tabs-hide").css("display", "");
    363       $('#theTabs li').removeClass("ui-tabs-selected");
    364       $("#theTabsContainer").animate({height:options.tabsHidden+"px"}, options.animateDelay).trigger('resize');
    365     }
    366   }
    367   else
    368   {
    369     if(showtabs=='y')
    370     {
    371       $("#theTabsContainer").css({height:options.tabsVisible+"px"}).trigger('resize');
    372     }
    373     else
    374     {
    375       $('#theTabs div.tabPanel').addClass("ui-tabs-hide").css("display", "");
    376       $('#theTabs li').removeClass("ui-tabs-selected");
    377       $("#theTabsContainer").css({height:options.tabsHidden+"px"}).trigger('resize');
    378     }
    379   }
    380 }
    381 
    382 function clearInterfaceTimer()
    383 {
    384   if(interfaceTimerDelay!=null)
    385   {
    386     window.clearInterval(interfaceTimerDelay);
    387     interfaceTimerDelay=null;
    388   }
    389 }
    390 
    391 function resetInterfaceTimer()
    392 {
    393   clearInterfaceTimer();
    394   if(options.interfaceTimerDelay>0 && options.interfaceCanSwitch) interfaceTimerDelay=window.setInterval(switchInterface, options.interfaceTimerDelay, "n", false);
    395 }
    396 
    397 function openDisplayHigh(url)
    398 {
    399   $('#theImageHigh').css(
    400     {
    401       width:$("html").get(0).scrollWidth+"px",
    402       height:$("html").get(0).scrollHeight+"px",
    403       display:"block"
    404     }
    405   );
    406 
    407   if($("#theImgHigh").attr('src')=="")
    408   {
    409     p = new Object();
    410     p.left = (($(window).width()-$("#theImgHighContainer").attr("clientWidth")-options.paddingContainer*2)/2)+"px";
    411     p.top = (($(window).height()-$("#theImgHighContainer").attr("clientHeight")-options.paddingContainer*2)/2)+"px";
    412 
    413 
    414     $('#theImgHighContainer')
    415       .css(
     429
     430
     431      $("#theImgHigh")
     432        .load(
     433          function ()
     434          {
     435            image.highWidth=$("#theImgHigh").width();
     436            image.highHeight=$("#theImgHigh").height();
     437
     438            p=calcImgHighPositionAndSize(image.zoomMode);
     439
     440            $('#theImgHighContainer').css("background-image", "none");
     441            displayZoomHigh();
     442            $("#theImgHigh").css( {display:"block"} );
     443          }
     444        )
     445        .attr('src', url);
     446
     447      if(options.highResClickMode=='close')
     448      {
     449        $("#theImgHigh").bind('click', closeDisplayHigh);
     450      }
     451      else
     452      {
     453        // switch zoom
     454        $("#theImgHigh").bind('click', switchZoomHigh);
     455      }
     456    }
     457    else
     458    {
     459      p=calcImgHighPositionAndSize(image.zoomMode);
     460
     461      $('#theImgHighContainer')
     462        .css(
     463          {
     464            left:p.left+"px",
     465            top:p.top+"px",
     466            width:p.width+"px",
     467            height:p.height+"px"
     468          }
     469        );
     470    }
     471  },
     472
     473  calcImgHighPositionAndSize = function(zoom)
     474  {
     475    var p = {
     476          left:options.marginContainer,
     477          top:options.marginContainer,
     478          width:0,
     479          height:0
     480        },
     481        margins = (options.marginContainer+options.paddingContainer)*2;
     482
     483    if(zoom=='full')
     484    {
     485      p.width = $("html").get(0).clientWidth-margins;
     486      p.height = $("html").get(0).clientHeight-margins;
     487    }
     488    else
     489    {
     490      //zoom = 'fit'
     491      ratioImg = image.highWidth / image.highHeight;
     492      ratioPage = $("html").get(0).clientWidth / $("html").get(0).clientHeight;
     493
     494      if((ratioPage > 1 && (ratioPage > ratioImg)) ||
     495         (ratioPage < 1 && (ratioPage < ratioImg)))
     496      {
     497        p.height = $("html").get(0).clientHeight-margins;
     498        p.width = p.height*ratioImg;
     499      }
     500      else
     501      {
     502        p.width = $("html").get(0).clientWidth-margins;
     503        p.height = p.width/ratioImg;
     504      }
     505      p.left = ($("html").get(0).clientWidth-p.width)/2-options.paddingContainer;
     506      p.top = ($("html").get(0).clientHeight-p.height)/2-options.paddingContainer;
     507    }
     508
     509    if(p.width>image.highWidth)
     510    {
     511      p.width = image.highWidth;
     512      p.left = ($("html").get(0).clientWidth-p.width)/2;
     513    }
     514    if(p.height>image.highHeight)
     515    {
     516      p.height = image.highHeight;
     517      p.top = ($("html").get(0).clientHeight-p.height)/2;
     518    }
     519
     520    return(p);
     521  },
     522
     523  displayZoomHigh = function()
     524  {
     525    container=calcImgHighPositionAndSize(image.zoomMode);
     526
     527    $('#theImgHighContainer').css(
    416528        {
    417           left:p.left,
    418           top:p.top,
    419           padding:options.paddingContainer+"px"
     529          left:container.left+"px",
     530          top:container.top+"px",
     531          width:container.width+"px",
     532          height:container.height+"px"
    420533        }
    421534      );
    422535
    423536
    424     $("#theImgHigh")
    425       .load(
    426         function ()
    427         {
    428           $(document).data("highWidth", $("#theImgHigh").width());
    429           $(document).data("highHeight", $("#theImgHigh").height());
    430 
    431           p=calcImgHighPositionAndSize(zoomMode);
    432 
    433           $('#theImgHighContainer').css("background-image", "none")
    434           displayZoomHigh();
    435           $("#theImgHigh").css( {display:"block"} );
    436         }
    437       )
    438       .attr('src', url);
    439 
    440     if(options.highResClickMode=='close')
    441     {
    442       $("#theImgHigh").bind('click', closeDisplayHigh);
    443     }
    444     else
    445     {
    446       // switch zoom
    447       $("#theImgHigh").bind('click', switchZoomHigh);
    448     }
    449   }
    450   else
    451   {
    452     p=calcImgHighPositionAndSize(zoomMode);
    453 
    454     $('#theImgHighContainer')
    455       .css(
    456         {
    457           left:p.left+"px",
    458           top:p.top+"px",
    459           width:p.width+"px",
    460           height:p.height+"px"
    461         }
    462       );
    463   }
     537
     538      if(image.zoomMode=="full")
     539      {
     540        $("#theImgHigh")
     541          .css(
     542            {
     543              width:image.highWidth+"px",
     544              height:image.highHeight+"px"
     545            }
     546          );
     547        $('#theImgHighContainer').bind("mousemove",
     548            function(event)
     549            {
     550              deadArea = Math.max(options.marginContainer*2, options.imageScrollMinDeadArea);
     551              mouseX=Math.max(Math.min(event.clientX-container.left, container.width - deadArea), deadArea);
     552              mouseY=Math.max(Math.min(event.clientY-container.top, container.height - deadArea), deadArea);
     553              $("#theImgHigh")
     554                .css("left",Math.round((image.highWidth-container.width) * -(mouseX-deadArea)/(container.width-2*deadArea))+"px")
     555                .css("top",Math.round((image.highHeight-container.height) * -(mouseY-deadArea)/(container.height-2*deadArea))+"px");
     556            }
     557          );
     558      }
     559      else
     560      {
     561        $("#theImgHigh")
     562          .css(
     563            {
     564              width:container.width+"px",
     565              height:container.height+"px",
     566              left:"0px",
     567              top:"0px"
     568            }
     569          );
     570        $('#theImgHighContainer').unbind("mousemove");
     571      }
     572  },
     573
     574  closeDisplayHigh = function()
     575  {
     576    $('#theImageHigh').css('display', 'none');
     577  },
     578
     579  switchZoomHigh = function()
     580  {
     581    if(image.zoomMode=='full')
     582    {
     583      image.zoomMode="fit";
     584    }
     585    else
     586    {
     587      image.zoomMode="full";
     588    }
     589
     590    $("#theImgHighZoomButton").toggleClass('full').toggleClass('fit');
     591
     592    displayZoomHigh();
     593  };
     594
     595
     596  this.closeDisplayHigh = function () { closeDisplayHigh(); };
     597  this.switchZoomHigh = function () { switchZoomHigh(); };
     598  this.getImageProp = function () { return image; };
     599  this.getInterfaceProp = function () { return interface; };
     600  this.getTabsProp = function () { return tabs; };
     601
     602  init();
     603
    464604}
    465605
    466 function calcImgHighPositionAndSize(zoom)
    467 {
    468   p = new Object();
    469 
    470   if(zoom=='full')
    471   {
    472     p.width = ($("html").get(0).clientWidth-(options.marginContainer+options.paddingContainer)*2);
    473     p.height = ($("html").get(0).clientHeight-(options.marginContainer+options.paddingContainer)*2);
    474     p.left=options.marginContainer;
    475     p.top=options.marginContainer;
    476 
    477     if(p.width>$(document).data("highWidth"))
    478     {
    479       p.width = $(document).data("highWidth")-options.paddingContainer*2;
    480       p.left = ($("html").get(0).clientWidth-p.width)/2;
    481     }
    482 
    483     if(p.height>$(document).data("highHeight"))
    484     {
    485       p.height = $(document).data("highHeight")-options.paddingContainer*2;
    486       p.top = ($("html").get(0).clientHeight-p.height)/2;
    487     }
    488   }
    489   else
    490   {
    491     //zoom = 'fit'
    492     ratioImg = $(document).data("highWidth") / $(document).data("highHeight");
    493     ratioPage = $("html").get(0).clientWidth / $("html").get(0).clientHeight;
    494 
    495     if((ratioPage > 1 && (ratioPage > ratioImg)) ||
    496        (ratioPage < 1 && (ratioPage < ratioImg)))
    497     {
    498       p.height = ($("html").get(0).clientHeight-(options.marginContainer+options.paddingContainer)*2);
    499       p.width = p.height*ratioImg;
    500     }
    501     else
    502     {
    503       p.width = ($("html").get(0).clientWidth-(options.marginContainer+options.paddingContainer)*2);
    504       p.height = p.width/ratioImg;
    505     }
    506     p.left = ($("html").get(0).clientWidth-p.width)/2;
    507     p.top = ($("html").get(0).clientHeight-p.height)/2;
    508   }
    509 
    510   return(p);
    511 }
    512 
    513 function closeDisplayHigh()
    514 {
    515   $('#theImageHigh').css('display', 'none');
    516 }
    517 
    518 function switchZoomHigh()
    519 {
    520   if(zoomMode=='full')
    521   {
    522     zoomMode="fit";
    523   }
    524   else
    525   {
    526     zoomMode="full";
    527   }
    528 
    529   $("#theImgHighZoomButton").toggleClass('full').toggleClass('fit');
    530 
    531   displayZoomHigh();
    532 }
    533 
    534 function displayZoomHigh()
    535 {
    536   p=calcImgHighPositionAndSize(zoomMode);
    537 
    538   $('#theImgHighContainer').css(
    539       {
    540         left:p.left+"px",
    541         top:p.top+"px",
    542         width:p.width+"px",
    543         height:p.height+"px"
    544       }
    545     );
    546 
    547 
    548 
    549     if(zoomMode=="full")
    550     {
    551       $("#theImgHigh")
    552         .css(
    553           {
    554             width:$(document).data("highWidth")+"px",
    555             height:$(document).data("highHeight")+"px"
    556           }
    557         );
    558       $('#theImgHighContainer').bind("mousemove",
    559           function(event)
    560           {
    561             deadArea = options.marginContainer*2;
    562             mouseX=Math.max(Math.min(event.clientX-this.offsetLeft, this.clientWidth - deadArea), deadArea);
    563             mouseY=Math.max(Math.min(event.clientY-this.offsetTop, this.clientHeight - deadArea), deadArea);
    564             $("#theImgHigh")
    565               .css("left",Math.round(($("#theImgHigh").attr("scrollWidth")-this.clientWidth) * -(mouseX-deadArea)/(this.clientWidth-2*deadArea))+"px")
    566               .css("top",Math.round(($("#theImgHigh").attr("scrollHeight")-this.clientHeight) * -(mouseY-deadArea)/(this.clientHeight-2*deadArea))+"px");
    567           }
    568         );
    569     }
    570     else
    571     {
    572       $("#theImgHigh")
    573         .css(
    574           {
    575             width:p.width+"px",
    576             height:p.height+"px",
    577             left:"0px",
    578             top:"0px"
    579           }
    580         );
    581       $('#theImgHighContainer').unbind("mousemove");
    582     }
    583 }
    584 
    585 
    586 
    587 
     606
     607
     608
  • extensions/gally/gally-default/release_notes.txt

    r7384 r8528  
    113113  |         |            |   . Privacy level don't work
    114114  |         |            |
     115  | 1.4.0   | 2010-12-23 | * add simpleTip.js script
    115116  |         |            |
     117  |         |            | * rewrite gally-tpp.js script (make an object)
    116118  |         |            |
     119  |         |            | * rewrite gally-tcp.js script (make an object)
    117120  |         |            |
     121  |         |            | * add gally-ttm.js script (for tip management)
     122  |         |            |
     123  |         |            | * pack js files
     124  |         |            |
     125  |         |            | * mantis bug:1983
     126  |         |            |   . Incorrect display for the icon of recent photo in
     127  |         |            |     IE 7
     128  |         |            |
     129  |         |            | * add the option 'imageScrollMinDeadArea'
    118130  |         |            |
    119131  |         |            |
     
    135147  | gallyjs-tcp.js  | Javascript for the categories pages management
    136148  | gallyjs-tpp.js  | Javascript for the pictures pages management
     149  | gallyjs-ttm.js  | Javascript for the tooltips management
    137150  | default.conf    | The default config file
    138151  | local.conf      | The local config file
  • extensions/gally/gally-default/template/config.js.tpl

    r6752 r8528  
    1212  imageCenterTopMin:{#imageCenterTopMin#},
    1313  imageCenterTopBorder:"{#imageCenterTopBorder#}",
     14  imageScrollMinDeadArea:{#imageScrollMinDeadArea#},
    1415  interfaceAnimated:"{#interfaceAnimated#}",
    1516  interfaceCanSwitch:{if #interfaceCanSwitch#=='yes'}true{else}false{/if},
     
    3435  menuMSIEMaxWidth:"{#menuMSIEMaxWidth#}",
    3536{/if}
    36   animateDelay:{#animateDelay#}
     37  manageTips:{if #manageTips#=='yes'}true{else}false{/if},
     38  manageTipsPos:"{#manageTipsPos#}",
     39  animateDelay:{#animateDelay#},
     40  themePath:"{$themeconf.icon_dir}"
    3741{literal}
    3842}
  • extensions/gally/gally-default/template/header.tpl

    r6700 r8528  
    5050  {known_script id="jquery.ui.dialog" src=$ROOT_URL|cat:"themes/default/js/ui/packed/ui.dialog.packed.js"}
    5151
    52   {if $BODY_ID=='theCategoryPage' || $BODY_ID=='thePicturePage'}
    5352
    54     {php}
    55       $themes=$this->get_template_vars('themes');
    56       foreach($themes as $theme)
     53  {php}
     54    $themes=$this->get_template_vars('themes');
     55    foreach($themes as $theme)
     56    {
     57      $dir=dirname($_SERVER['SCRIPT_FILENAME'])."/themes/".$theme['id']."/conf/";
     58      $dirlocal=dirname($_SERVER['SCRIPT_FILENAME'])."/local/themes/".$theme['id']."/conf/";
     59      $this->assign("default_conf", $dir."default.conf");
     60      if(file_exists($dirlocal."local.conf"))
    5761      {
    58         $dir=dirname($_SERVER['SCRIPT_FILENAME'])."/themes/".$theme['id']."/conf/";
    59         $dirlocal=dirname($_SERVER['SCRIPT_FILENAME'])."/local/themes/".$theme['id']."/conf/";
    60         $this->assign("default_conf", $dir."default.conf");
    61         if(file_exists($dirlocal."local.conf"))
    62         {
    63           $this->assign("local_conf", $dirlocal."local.conf");
    64         }
    65         else
    66         {
    67           $this->assign("local_conf", "");
    68         }
     62        $this->assign("local_conf", $dirlocal."local.conf");
    6963      }
    70     {/php}
     64      else
     65      {
     66        $this->assign("local_conf", "");
     67      }
     68    }
     69  {/php}
    7170
    72     {config_load file=$default_conf}
    73     {if $local_conf!=""}
    74       {config_load file=$local_conf}
    75     {/if}
    76 
    77     {php}
    78         $this->assign("alternateBannerContent", html_entity_decode($this->get_config_vars('alternateBannerContent')));
    79     {/php}
    80 
    81     {include file='config.js.tpl'}
     71  {config_load file=$default_conf}
     72  {if $local_conf!=""}
     73    {config_load file=$local_conf}
    8274  {/if}
    8375
     76  {php}
     77      $this->assign("alternateBannerContent", html_entity_decode($this->get_config_vars('alternateBannerContent')));
     78  {/php}
    8479
     80  {include file='config.js.tpl'}
     81
     82  {if #manageTips#=='yes'}
     83    {known_script id="gpc.simpleTip" src=$ROOT_URL|@cat:"themes/gally-default/js/simpleTip.packed.js" }
     84    {known_script id="gallyjs-ttm" src=$ROOT_URL|cat:"themes/gally-default/js/gallyjs-ttm.packed.js"}
     85  {/if}
    8586
    8687  {if $BODY_ID=='theCategoryPage'}
    87   {known_script id="gallyjs-tcp" src=$ROOT_URL|cat:"themes/gally-default/js/gallyjs-tcp.js"}
     88  {known_script id="gallyjs-tcp" src=$ROOT_URL|cat:"themes/gally-default/js/gallyjs-tcp.packed.js"}
    8889  <link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/gally-default/css/thumbnails.css">
    8990  <link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/gally-default/css/menubar.css">
     
    9192
    9293  {if $BODY_ID=='thePicturePage'}
    93   {known_script id="gallyjs-tpp" src=$ROOT_URL|cat:"themes/gally-default/js/gallyjs-tpp.js"}
     94  {known_script id="gallyjs-tpp" src=$ROOT_URL|cat:"themes/gally-default/js/gallyjs-tpp.packed.js"}
    9495  <link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/gally-default/css/picture.css">
    9596  {/if}
  • extensions/gally/gally-default/template/index.tpl

    r6109 r8528  
    1010    {else}
    1111    <div id="menuswitcher">
    12       <a id="icon_menu" class="button" onclick="switchmenu('', '{$ROOT_URL}{$themeconf.icon_dir}/');">&nbsp;
     12      <a id="icon_menu" class="button" onclick="gallyCP.switchmenu('', '{$ROOT_URL}{$themeconf.icon_dir}/');">&nbsp;
    1313        <!-- <img  src="{$ROOT_URL}{$themeconf.icon_dir}/menu-show.png"  alt="{'display all elements in all sub-categories'|@translate}"> -->
    1414      </a>
  • extensions/gally/gally-default/template/mainpage_categories.tpl

    r6700 r8528  
    44  {foreach from=$category_thumbnails item=cat name=catloop}
    55  <li class="odd{if ($smarty.foreach.catloop.iteration-1) % 2 == 0}0{else}1{/if}">
    6     <div class="thumbnailCategory">
     6    <div class="thumbnailCategory"  onclick="window.location='{$cat.URL}';">
    77      <div class="illustration">
    8         <a href="{$cat.URL}">
     8
    99          <img {if isset($cat.EXTRA_CLASS)}class="{$cat.EXTRA_CLASS}"{/if} src="{$cat.TN_SRC}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '} - {'shows images at the root of this category'|@translate}">
    10         </a>
     10
    1111      </div>
    1212      <div class="description">
    1313        <h3>
    14           <a href="{$cat.URL}">{$cat.NAME}</a>
     14          {$cat.NAME}
    1515            {if !empty($cat.icon_ts)}
    1616            <img title="{$cat.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png" class="icon" alt="(!)">
  • extensions/gally/gally-default/template/menubar_identification.tpl

    r6109 r8528  
    11<dt>{'Identification'|@translate}</dt>
    22<dd>
    3         {if isset($USERNAME)}
    4         <p>{'Hello'|@translate}&nbsp;{$USERNAME}&nbsp;!</p>
    5         {/if}
     3  {if isset($USERNAME)}
     4  <p>{'Hello'|@translate}&nbsp;{$USERNAME}&nbsp;!</p>
     5  {/if}
    66
    7         <ul>
    8         {if isset($U_REGISTER)}
    9         <li><a href="{$U_REGISTER}" title="{'Create a new account'|@translate}" rel="nofollow">{'Register'|@translate}</a></li>
    10         {/if}
     7  <ul>
     8  {if isset($U_REGISTER)}
     9  <li><a href="{$U_REGISTER}" title="{'Create a new account'|@translate}" rel="nofollow">{'Register'|@translate}</a></li>
     10  {/if}
    1111
    12         {if isset($U_LOGIN)}
    13         <li><a href="{$U_LOGIN}" rel="nofollow">{'Login'|@translate}</a></li>
    14         {/if}
     12  {if isset($U_LOGIN)}
     13  <li><a href="{$U_LOGIN}" rel="nofollow">{'Login'|@translate}</a></li>
     14  {/if}
    1515
    16         {if isset($U_LOGOUT)}
    17         <li><a href="{$U_LOGOUT}">{'Logout'|@translate}</a></li>
    18         {/if}
     16  {if isset($U_LOGOUT)}
     17  <li><a href="{$U_LOGOUT}">{'Logout'|@translate}</a></li>
     18  {/if}
    1919
    20         {if isset($U_PROFILE)}
    21         <li><a href="{$U_PROFILE}" title="{'customize the appareance of the gallery'|@translate}">{'Customize'|@translate}</a></li>
    22         {/if}
     20  {if isset($U_PROFILE)}
     21  <li><a href="{$U_PROFILE}" title="{'customize the appareance of the gallery'|@translate}">{'Customize'|@translate}</a></li>
     22  {/if}
    2323
    24         {if isset($U_ADMIN)}
    25         <li><a href="{$U_ADMIN}" title="{'available for administrators only'|@translate}">{'Administration'|@translate}</a></li>
    26         {/if}
    27         </ul>
     24  {if isset($U_ADMIN)}
     25  <li><a href="{$U_ADMIN}" title="{'available for administrators only'|@translate}">{'Administration'|@translate}</a></li>
     26  {/if}
     27  </ul>
    2828
    29         {if isset($U_LOGIN)}
    30         <form method="post" action="{$U_LOGIN}" id="quickconnect">
    31         <fieldset>
    32         <legend>{'Quick connect'|@translate}</legend>
    33         <div>
    34         <label for="username">{'Username'|@translate}</label><br/>
    35         <input type="text" name="username" id="username" value="" style="width:90%">
    36         </div>
     29  {if isset($U_LOGIN)}
     30  <form method="post" action="{$U_LOGIN}" id="quickconnect">
     31  <fieldset>
     32  <legend>{'Quick connect'|@translate}</legend>
     33  <div>
     34  <label for="username">{'Username'|@translate}</label><br/>
     35  <input type="text" name="username" id="username" value="" style="width:90%">
     36  </div>
    3737
    38         <div><label for="password">{'Password'|@translate}</label>
    39         <br/>
    40         <input type="password" name="password" id="password" style="width:90%">
    41         </div>
     38  <div><label for="password">{'Password'|@translate}</label>
     39  <br/>
     40  <input type="password" name="password" id="password" style="width:90%">
     41  </div>
    4242
    43         {if $AUTHORIZE_REMEMBERING}
    44         <div><label for="remember_me">
    45         {'Auto login'|@translate}
    46         <input type="checkbox" name="remember_me" id="remember_me" value="1">
    47         </label></div>
    48         {/if}
     43  {if $AUTHORIZE_REMEMBERING}
     44  <div><label for="remember_me">
     45  {'Auto login'|@translate}
     46  <input type="checkbox" name="remember_me" id="remember_me" value="1">
     47  </label></div>
     48  {/if}
    4949
    50         <div>
    51         <input class="submit" type="submit" name="login" value="{'Submit'|@translate}">
    52         <ul class="actions">
    53                 <li><a id="icon_lost_password3" class="button" href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}" rel="nofollow"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/lost_password.png" class="button" alt="{'Forgot your password?'|@translate}">--></a></li>
    54                 {if isset($U_REGISTER)}
    55                 <li><a id="icon_register3" class="button" href="{$U_REGISTER}" title="{'Create a new account'|@translate}" rel="nofollow"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/register.png" class="button" alt="{'Register'|@translate}"/>--></a></li>
    56                 {/if}
    57         </ul>
    58         </div>
     50  <div id='iValid'>
     51  <input class="submit" type="submit" name="login" value="{'Submit'|@translate}">
     52  <ul class="actions">
     53    <li><a id="icon_lost_password3" class="button sTipOnBottom" href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}" rel="nofollow"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/lost_password.png" class="button" alt="{'Forgot your password?'|@translate}">--></a></li>
     54    {if isset($U_REGISTER)}
     55    <li><a id="icon_register3" class="button sTipOnBottom" href="{$U_REGISTER}" title="{'Create a new account'|@translate}" rel="nofollow"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/register.png" class="button" alt="{'Register'|@translate}"/>--></a></li>
     56    {/if}
     57  </ul>
     58  </div>
    5959
    60         </fieldset>
    61         </form>
    62         {/if}
     60  </fieldset>
     61  </form>
     62  {/if}
    6363</dd>
    6464
  • extensions/gally/gally-default/template/menubar_tags.tpl

    r6109 r8528  
    11<dt>{'Related tags'|@translate}</dt>
    22<dd>
    3         <div id="menuTagCloud">
    4                 {foreach from=$block->data item=tag}
    5                 <span>
    6                         <a href="{$tag.URL}" class="tagLevel{$tag.level}" title="{'See images linked to this tag only'|@translate}">{$tag.name}</a>
     3  <div id="menuTagCloud">
     4    {foreach from=$block->data item=tag}
     5    <span>
     6      <a href="{$tag.URL}" class="tagLevel{$tag.level} sTipOnTop" title="{'See images linked to this tag only'|@translate}">{$tag.name}</a>
    77      {if !empty($tag.U_ADD) }
    8       <a class="tagaddbutton" href="{$tag.U_ADD}"
     8      <a class="tagaddbutton sTipOnTop" href="{$tag.U_ADD}"
    99        title="{$pwg->l10n_dec('%d element are also linked to current tags', '%d elements are also linked to current tags', $tag.counter)}"
    1010        rel="nofollow">
     
    1212      </a>
    1313      {/if}
    14                 </span>
    15                 {/foreach}
    16         </div>
     14    </span>
     15    {/foreach}
     16  </div>
    1717</dd>
    1818
  • extensions/gally/gally-default/template/notification.tpl

    r6109 r8528  
    1717    <p>{'The RSS notification feed provides notification on news from this website : new pictures, updated categories, new comments. Use a RSS feed reader.'|@translate}</p>
    1818
    19     <p><a href="{$U_FEED_IMAGE_ONLY}">{'Image only RSS feed'|@translate}</a></p>
    20     <p><a href="{$U_FEED}">{'Complete RSS feed (images, comments)'|@translate}</a></p>
     19    <p><span class="rssFeed"></span><a href="{$U_FEED_IMAGE_ONLY}">{'Image only RSS feed'|@translate}</a></p>
     20    <p><span class="rssFeed"></span><a href="{$U_FEED}">{'Complete RSS feed (images, comments)'|@translate}</a></p>
    2121  </div>
    2222</div>
  • extensions/gally/gally-default/template/picture.tpl

    r7384 r8528  
    88    <div id="theImgHighBg"></div>
    99    <div id="theImgHighContainer">
    10       <div id="theImgHighCloseButton" onclick="closeDisplayHigh();"></div>
    11       <div id="theImgHighZoomButton" class="fit" onclick="switchZoomHigh();"></div>
     10      <div id="theImgHighCloseButton" onclick="gallyPP.closeDisplayHigh();"></div>
     11      <div id="theImgHighZoomButton" class="fit" onclick="gallyPP.switchZoomHigh();"></div>
    1212      <div id="theImgHighContainer2">
    1313        <img id="theImgHigh" src="" style="display:none;" alt="{$ALT_IMG}"
  • extensions/gally/gally-default/themeconf.inc.php

    r7329 r8528  
    22/*
    33Theme Name: Gally
    4 Version: 1.3.5
     4Version: 1.4.0
    55Description: Parent theme for all the Gally themes
    66Theme URI: http://piwigo.org/ext/extension_view.php?eid=382
Note: See TracChangeset for help on using the changeset viewer.