Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, October 14, 2026

Diff for Metafox/libpub/lightbox/jquery.lightbox-0.5.js between version 1.2 and 1.3

version 1.2, 2010/12/10 12:53:20 version 1.3, 2010/12/10 13:06:06
Line 25 
Line 25 
                 if (ezin_lang.length > 0) {     // ezin_lang je globalna premenna                  if (ezin_lang.length > 0) {     // ezin_lang je globalna premenna
                         lang = ezin_lang;                          lang = ezin_lang;
                 }                  }
   
                   var cfg_txtImage = 'Image';
                   var cfg_txtOf = 'of';
                   switch (lang) {
                           case 'en':
                               cfg_txtImage = 'Image';
                               cfg_txtOf = 'of';
                               break;
                           case 'sk':
                               cfg_txtImage = 'Obrázok';
                               cfg_txtOf = 'z';
                               break;
                   }
   
                 settings = jQuery.extend({                  settings = jQuery.extend({
                         // Configuration related to overlay                          // Configuration related to overlay
                         overlayBgColor:                 '#000',         // (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color.                          overlayBgColor:                 '#000',         // (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color.
Line 41 
Line 55 
                         containerBorderSize:    10,                     // (integer) If you adjust the padding in the CSS for the container, #lightbox-container-image-box, you will need to update this value                          containerBorderSize:    10,                     // (integer) If you adjust the padding in the CSS for the container, #lightbox-container-image-box, you will need to update this value
                         containerResizeSpeed:   400,            // (integer) Specify the resize duration of container image. These number are miliseconds. 400 is default.                          containerResizeSpeed:   400,            // (integer) Specify the resize duration of container image. These number are miliseconds. 400 is default.
                         // Configuration related to texts in caption. For example: Image 2 of 8. You can alter either "Image" and "of" texts.                          // Configuration related to texts in caption. For example: Image 2 of 8. You can alter either "Image" and "of" texts.
                         txtImage:                               'Image',        // (string) Specify text "Image"                          txtImage:                               cfg_txtImage,   // (string) Specify text "Image"
                         txtOf:                                  'of',           // (string) Specify text "of"                          txtOf:                                  cfg_txtOf,              // (string) Specify text "of"
                         // Configuration related to keyboard navigation                          // Configuration related to keyboard navigation
                         keyToClose:                             'c',            // (string) (c = close) Letter to close the jQuery lightBox interface. Beyond this letter, the letter X and the SCAPE key is used to.                          keyToClose:                             'c',            // (string) (c = close) Letter to close the jQuery lightBox interface. Beyond this letter, the letter X and the SCAPE key is used to.
                         keyToPrev:                              'p',            // (string) (p = previous) Letter to show the previous image                          keyToPrev:                              'p',            // (string) (p = previous) Letter to show the previous image
                         keyToNext:                              'n',            // (string) (n = next) Letter to show the next image.                          keyToNext:                              'n',            // (string) (n = next) Letter to show the next image.
                         // Don´t alter these variables in any way                          // Don´t alter these variables in any way
                         imageArray:                             [],                          imageArray:                             [],
                         activeImage:                    0                          activeImage:                    0
                 },settings);                  },settings);
Line 77 
Line 91 
                         settings.imageArray.length = 0;                          settings.imageArray.length = 0;
                         // Unset image active information                          // Unset image active information
                         settings.activeImage = 0;                          settings.activeImage = 0;
                         // We have an image set? Or just an image? Let´s see it.                          // We have an image set? Or just an image? Let´s see it.
                         if ( jQueryMatchedObj.length == 1 ) {                          if ( jQueryMatchedObj.length == 1 ) {
                                 settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));                                  settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));
                         } else {                          } else {
Line 175 
Line 189 
                         });                          });
                 }                  }
                 /**                  /**
                  * Prepares image exibition; doing a image´s preloader to calculate it´s size                   * Prepares image exibition; doing a image´s preloader to calculate it´s size
                  *                   *
                  */                   */
                 function _set_image_to_view() { // show the loading                  function _set_image_to_view() { // show the loading
Line 201 
Line 215 
                 /**                  /**
                  * Perfomance an effect in the image container resizing it                   * Perfomance an effect in the image container resizing it
                  *                   *
                  * @param integer intImageWidth The image´s width that will be showed                   * @param integer intImageWidth The image´s width that will be showed
                  * @param integer intImageHeight The image´s height that will be showed                   * @param integer intImageHeight The image´s height that will be showed
                  */                   */
                 function _resize_container_image_box(intImageWidth,intImageHeight) {                  function _resize_container_image_box(intImageWidth,intImageHeight) {
                         // Get current width and height                          // Get current width and height
                         var intCurrentWidth = $('#lightbox-container-image-box').width();                          var intCurrentWidth = $('#lightbox-container-image-box').width();
                         var intCurrentHeight = $('#lightbox-container-image-box').height();                          var intCurrentHeight = $('#lightbox-container-image-box').height();
                         // Get the width and height of the selected image plus the padding                          // Get the width and height of the selected image plus the padding
                         var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image´s width and the left and right padding value                          var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image´s width and the left and right padding value
                         var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image´s height and the left and right padding value                          var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image´s height and the left and right padding value
                         // Diferences                          // Diferences
                         var intDiffW = intCurrentWidth - intWidth;                          var intDiffW = intCurrentWidth - intWidth;
                         var intDiffH = intCurrentHeight - intHeight;                          var intDiffH = intCurrentHeight - intHeight;
Line 260 
Line 274 
                 function _set_navigation() {                  function _set_navigation() {
                         $('#lightbox-nav').show();                          $('#lightbox-nav').show();
   
                         // Instead to define this configuration in CSS file, we define here. And it´s need to IE. Just.                          // Instead to define this configuration in CSS file, we define here. And it´s need to IE. Just.
                         $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });                          $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
   
                         // Show the prev button, if not the first image in set                          // Show the prev button, if not the first image in set
Line 351 
Line 365 
                         }                          }
                         // Verify the key to show the previous image                          // Verify the key to show the previous image
                         if ( ( key == settings.keyToPrev ) || ( keycode == 37 ) ) {                          if ( ( key == settings.keyToPrev ) || ( keycode == 37 ) ) {
                                 // If we´re not showing the first image, call the previous                                  // If we´re not showing the first image, call the previous
                                 if ( settings.activeImage != 0 ) {                                  if ( settings.activeImage != 0 ) {
                                         settings.activeImage = settings.activeImage - 1;                                          settings.activeImage = settings.activeImage - 1;
                                         _set_image_to_view();                                          _set_image_to_view();
Line 360 
Line 374 
                         }                          }
                         // Verify the key to show the next image                          // Verify the key to show the next image
                         if ( ( key == settings.keyToNext ) || ( keycode == 39 ) ) {                          if ( ( key == settings.keyToNext ) || ( keycode == 39 ) ) {
                                 // If we´re not showing the last image, call the next                                  // If we´re not showing the last image, call the next
                                 if ( settings.activeImage != ( settings.imageArray.length - 1 ) ) {                                  if ( settings.activeImage != ( settings.imageArray.length - 1 ) ) {
                                         settings.activeImage = settings.activeImage + 1;                                          settings.activeImage = settings.activeImage + 1;
                                         _set_image_to_view();                                          _set_image_to_view();

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top