/[drupal]/contributions/modules/lightbox2/js/lightbox.js
ViewVC logotype

Diff of /contributions/modules/lightbox2/js/lightbox.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.5.2.6.2.119, Fri May 8 15:05:49 2009 UTC revision 1.5.2.6.2.120, Sun Sep 13 23:27:32 2009 UTC
# Line 1  Line 1 
1  /* $Id: lightbox.js,v 1.5.2.6.2.118 2009/05/02 02:19:11 snpower Exp $ */  /* $Id: lightbox.js,v 1.5.2.6.2.119 2009/05/08 15:05:49 snpower Exp $ */
2    
3  /**  /**
4   * jQuery Lightbox   * jQuery Lightbox
# Line 643  var Lightbox = { Line 643  var Lightbox = {
643      // Handle display of image content.      // Handle display of image content.
644      else {      else {
645        $('#imageContainer').show();        $('#imageContainer').show();
646        if($.browser.safari) {        if ($.browser.safari) {
647          $('#lightboxImage').css({'zIndex': '10500'}).show();          $('#lightboxImage').css({'zIndex': '10500'}).show();
648        }        }
649        else {        else {
# Line 949  var Lightbox = { Line 949  var Lightbox = {
949    // Returns array with page width, height and window width, height.    // Returns array with page width, height and window width, height.
950    // Core code from - quirksmode.com.    // Core code from - quirksmode.com.
951    // Edit for Firefox by pHaez.    // Edit for Firefox by pHaez.
952    
953    getPageSize : function() {    getPageSize : function() {
954    
955      var xScroll, yScroll;      var xScroll, yScroll;
956    
957      if (document.body.scrollHeight > document.body.offsetHeight) { // all but Explorer Mac      if (window.innerHeight && window.scrollMaxY) {
       xScroll = document.body.scrollWidth;  
       yScroll = document.body.scrollHeight;  
     }  
     else if (window.innerHeight && window.scrollMaxY) {  
958        xScroll = window.innerWidth + window.scrollMaxX;        xScroll = window.innerWidth + window.scrollMaxX;
959        yScroll = window.innerHeight + window.scrollMaxY;        yScroll = window.innerHeight + window.scrollMaxY;
960      }      }
961      // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari.      else if (document.body.scrollHeight > document.body.offsetHeight) { // All but Explorer Mac.
962      else {        xScroll = document.body.scrollWidth;
963          yScroll = document.body.scrollHeight;
964        }
965        else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari.
966        xScroll = document.body.offsetWidth;        xScroll = document.body.offsetWidth;
967        yScroll = document.body.offsetHeight;        yScroll = document.body.offsetHeight;
968      }      }
# Line 978  var Lightbox = { Line 978  var Lightbox = {
978        }        }
979        windowHeight = self.innerHeight;        windowHeight = self.innerHeight;
980      }      }
981      // Explorer 6 Strict Mode.      else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode.
     else if (document.documentElement && document.documentElement.clientHeight) {  
982        windowWidth = document.documentElement.clientWidth;        windowWidth = document.documentElement.clientWidth;
983        windowHeight = document.documentElement.clientHeight;        windowHeight = document.documentElement.clientHeight;
984      }      }
# Line 987  var Lightbox = { Line 986  var Lightbox = {
986        windowWidth = document.body.clientWidth;        windowWidth = document.body.clientWidth;
987        windowHeight = document.body.clientHeight;        windowHeight = document.body.clientHeight;
988      }      }
989        // For small pages with total height less than height of the viewport.
   
     // For small pages with total height less then height of the viewport.  
990      if (yScroll < windowHeight) {      if (yScroll < windowHeight) {
991        pageHeight = windowHeight;        pageHeight = windowHeight;
992      }      }
993      else {      else {
994        pageHeight = yScroll;        pageHeight = yScroll;
995      }      }
996        // For small pages with total width less than width of the viewport.
   
     // For small pages with total width less then width of the viewport.  
997      if (xScroll < windowWidth) {      if (xScroll < windowWidth) {
998        pageWidth = windowWidth;        pageWidth = xScroll;
999      }      }
1000      else {      else {
1001        pageWidth = xScroll;        pageWidth = windowWidth;
1002      }      }
1003        arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
     arrayPageSize = [pageWidth, pageHeight, windowWidth, windowHeight];  
1004      return arrayPageSize;      return arrayPageSize;
1005    },    },
1006    

Legend:
Removed from v.1.5.2.6.2.119  
changed lines
  Added in v.1.5.2.6.2.120

  ViewVC Help
Powered by ViewVC 1.1.2