Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make all images 8x10 for now.

  • Loading branch information...
commit 06134515b060183ffbd1b27f34eacc6d34ac3aa1 1 parent ba12839
@streeter streeter authored
Showing with 6 additions and 2 deletions.
  1. +5 −1 js/jquery.lightbox-0.5.js
  2. +1 −1  js/jquery.lightbox-0.5.min.js
View
6 js/jquery.lightbox-0.5.js
@@ -249,15 +249,19 @@
$('#lightbox-image-details-caption').hide();
if ( settings.imageArray[settings.activeImage][1] ) {
- var maxHeightWidth = 11;
+ var maxHeightWidth = 12;
var height = parseInt(settings.imageArray[settings.activeImage][5]);
var width = parseInt(settings.imageArray[settings.activeImage][4]);
if (width > height) {
height = Math.round((maxHeightWidth * height) / width * 100) / 100;
width = maxHeightWidth;
+ width = 10;
+ height = 8;
} else {
width = Math.round((maxHeightWidth * width) / height * 100) / 100;
height = maxHeightWidth;
+ width = 8;
+ height = 10;
}
var caption = '<span class="product">';
View
2  js/jquery.lightbox-0.5.min.js
@@ -5,7 +5,7 @@ _set_image_to_view();}
function _set_interface(){$('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+settings.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="'+settings.imageBtnClose+'"></a></div></div></div></div>');var arrPageSizes=___getPageSize();$('#jquery-overlay').css({backgroundColor:settings.overlayBgColor,opacity:settings.overlayOpacity,width:arrPageSizes[0],height:arrPageSizes[1]}).fadeIn();var arrPageScroll=___getPageScroll();$('#jquery-lightbox').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]}).show();$('#jquery-overlay,#jquery-lightbox').click(function(){_finish();});$('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function(){_finish();return false;});$(window).resize(function(){var arrPageSizes=___getPageSize();$('#jquery-overlay').css({width:arrPageSizes[0],height:arrPageSizes[1]});var arrPageScroll=___getPageScroll();$('#jquery-lightbox').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]});});}
function _set_image_to_view(){$('#lightbox-loading').show();if(settings.fixedNavigation){$('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();}else{$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();}
var objImagePreloader=new Image();objImagePreloader.onload=function(){$('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);objImagePreloader.onload=function(){};};objImagePreloader.src=settings.imageArray[settings.activeImage][0];document.location.hash='#'+settings.imageArray[settings.activeImage][2];};function _resize_container_image_box(intImageWidth,intImageHeight){var intCurrentWidth=$('#lightbox-container-image-box').width();var intCurrentHeight=$('#lightbox-container-image-box').height();var intWidth=(intImageWidth+(settings.containerBorderSize*2));var intHeight=(intImageHeight+(settings.containerBorderSize*2));var intDiffW=intCurrentWidth-intWidth;var intDiffH=intCurrentHeight-intHeight;$('#lightbox-container-image-box').animate({width:intWidth,height:intHeight},settings.containerResizeSpeed,function(){_show_image();});if((intDiffW==0)&&(intDiffH==0)){if($.browser.msie){___pause(250);}else{___pause(100);}}
-$('#lightbox-container-image-data-box').css({width:intImageWidth});$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({height:intImageHeight+(settings.containerBorderSize*2)});};function _show_image(){$('#lightbox-loading').hide();$('#lightbox-image').fadeIn(function(){_show_image_data();_set_navigation();});_preload_neighbor_images();};function _show_image_data(){$('#lightbox-container-image-data-box').slideDown('fast');$('#lightbox-image-details-caption').hide();if(settings.imageArray[settings.activeImage][1]){var maxHeightWidth=11;var height=parseInt(settings.imageArray[settings.activeImage][5]);var width=parseInt(settings.imageArray[settings.activeImage][4]);if(width>height){height=Math.round((maxHeightWidth*height)/width*100)/100;width=maxHeightWidth;}else{width=Math.round((maxHeightWidth*width)/height*100)/100;height=maxHeightWidth;}
+$('#lightbox-container-image-data-box').css({width:intImageWidth});$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({height:intImageHeight+(settings.containerBorderSize*2)});};function _show_image(){$('#lightbox-loading').hide();$('#lightbox-image').fadeIn(function(){_show_image_data();_set_navigation();});_preload_neighbor_images();};function _show_image_data(){$('#lightbox-container-image-data-box').slideDown('fast');$('#lightbox-image-details-caption').hide();if(settings.imageArray[settings.activeImage][1]){var maxHeightWidth=12;var height=parseInt(settings.imageArray[settings.activeImage][5]);var width=parseInt(settings.imageArray[settings.activeImage][4]);if(width>height){height=Math.round((maxHeightWidth*height)/width*100)/100;width=maxHeightWidth;width=10;height=8;}else{width=Math.round((maxHeightWidth*width)/height*100)/100;height=maxHeightWidth;width=8;height=10;}
var caption='<span class="product">';caption+='<img class="product-image" src="'+settings.imageArray[settings.activeImage][3]+'" style="display:none;">';caption+='<div class="product-attr-name" style="">'+settings.imageArray[settings.activeImage][1]+'</div>';caption+='<div class="googlecart-add-button" tabindex="0" role="button" title="Add to cart" style="float:left;padding-bottom:5px;"></div>';caption+='<div class="product-title"" style="float:left;padding:5px;">'+height+'"x'+width+'" print</div>';caption+='<div class="product-price" style="float:left;padding:5px;color:red;">$24.99</div>';caption+='<div class="product-attr-pid" style="display:none;">'+settings.imageArray[settings.activeImage][2]+'</div>';caption+='</span>';$('#lightbox-image-details-caption').html(caption).show();}}
function _set_navigation(){$('#lightbox-nav').show();$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({'background':'transparent url('+settings.imageBlank+') no-repeat'});if(settings.activeImage!=0){if(settings.fixedNavigation){$('#lightbox-nav-btnPrev').css({'background':'url('+settings.imageBtnPrev+') left 15% no-repeat'}).unbind().bind('click',function(){settings.activeImage=settings.activeImage-1;_set_image_to_view();return false;});}else{$('#lightbox-nav-btnPrev').unbind().hover(function(){$(this).css({'background':'url('+settings.imageBtnPrev+') left 15% no-repeat'});},function(){$(this).css({'background':'transparent url('+settings.imageBlank+') no-repeat'});}).show().bind('click',function(){settings.activeImage=settings.activeImage-1;_set_image_to_view();return false;});}}
if(settings.activeImage!=(settings.imageArray.length-1)){if(settings.fixedNavigation){$('#lightbox-nav-btnNext').css({'background':'url('+settings.imageBtnNext+') right 15% no-repeat'}).unbind().bind('click',function(){settings.activeImage=settings.activeImage+1;_set_image_to_view();return false;});}else{$('#lightbox-nav-btnNext').unbind().hover(function(){$(this).css({'background':'url('+settings.imageBtnNext+') right 15% no-repeat'});},function(){$(this).css({'background':'transparent url('+settings.imageBlank+') no-repeat'});}).show().bind('click',function(){settings.activeImage=settings.activeImage+1;_set_image_to_view();return false;});}}
Please sign in to comment.
Something went wrong with that request. Please try again.