Added bosskey. should change the url

This commit is contained in:
ville rantanen
2014-01-20 17:19:24 +02:00
parent 690b7fa616
commit f6076d77ad

View File

@@ -966,7 +966,9 @@ function showimage(i) {
var revDirStr=dirStr=='-' ? '+' : '-'; var revDirStr=dirStr=='-' ? '+' : '-';
var animateOut=(slideshowinterval!=0 && Math.abs(slideshowinterval)<2) ? 0 : 100; var animateOut=(slideshowinterval!=0 && Math.abs(slideshowinterval)<2) ? 0 : 100;
var animateIn=animateOut/2; var animateIn=animateOut/2;
$('#desccontainer').html(getProgressEl()+currentlink(i)+imagelist[i].desc);
$('#desccontainer').css('display','block');
setProgress(i);
$('#imagecontainer').clearQueue(); $('#imagecontainer').clearQueue();
$('#imagecontainer').stop(); $('#imagecontainer').stop();
$('#imagecontainer').css('margin-left', '0px'); $('#imagecontainer').css('margin-left', '0px');
@@ -980,7 +982,6 @@ function showimage(i) {
preload(i); preload(i);
subfoldersmalllist(); subfoldersmalllist();
currentimage=i; currentimage=i;
setProgress(i);
$('#imagecontainer').animate({ $('#imagecontainer').animate({
'marginLeft' : dirStr+"=200px", 'marginLeft' : dirStr+"=200px",
'opacity' : "+=1" 'opacity' : "+=1"
@@ -1031,8 +1032,6 @@ function showbigimage(i) {
showimage(currentimage); showimage(currentimage);
}); });
$('#desccontainer').html(getProgressEl()+currentlink(i)+imagelist[i].desc);
$('#desccontainer').css('display','block');
if (fullscreen) { if (fullscreen) {
$('#imagecontainer')[0].scrollIntoView(true); $('#imagecontainer')[0].scrollIntoView(true);
} }
@@ -1103,13 +1102,13 @@ function preloadcheck() {
var imgs=$('#preloadcontainer img'); var imgs=$('#preloadcontainer img');
var completed=preloadcheckcount(); var completed=preloadcheckcount();
var colorValue=32*completed/imgs.length + 223; var colorValue=32*completed/imgs.length + 223;
$('#desccontainer').css('background-color',"rgb("+colorValue+","+colorValue+","+colorValue+")"); $('#thumbrow').css('background-color',"rgb("+colorValue+","+colorValue+","+colorValue+")");
if (imgs.length==completed) { if (imgs.length==completed) {
clearInterval(preloader); clearInterval(preloader);
if ($.browser.msie) { if ($.browser.msie) {
$('#desccontainer').css('background-color',"rgb(255,255,255)"); $('#thumbrow').css('background-color',"rgb(255,255,255)");
} else { } else {
$('#desccontainer').css('background-color',"rgba(255,255,255,0)"); $('#thumbrow').css('background-color',"rgba(255,255,255,0)");
} }
} }
return; return;
@@ -1621,6 +1620,10 @@ function keypressed(e) {
if (unicode==65) { if (unicode==65) {
allthumbs(); allthumbs();
} }
// b: boss key
if (unicode==66) {
bosskey();
}
// f: fullscreen // f: fullscreen
if (unicode==70) { if (unicode==70) {
flipfullscreen(); flipfullscreen();
@@ -1771,3 +1774,22 @@ function addswipe(divname) {
} }
}); });
} }
function bosskey() {
// bosskey
i=currentimage;
var width=document.body.clientWidth-30;
var height=document.body.clientHeight-25;
var linkToBig = '<a class="linktobig" href="http://www.ncbi.nlm.nih.gov/pubmed" target="_blank">';
$('#imagecontainer').html('<span id="prevTouch"/><span id="nextTouch"/><div id="imagebig">'+linkToBig+
'<iframe id="imagesingle" src="http://www.ncbi.nlm.nih.gov/pubmed"></a></div>');
$('#imagesingle').css('width',width);
$('#imagesingle').css('height',height);
$('#imagecontainer').data('ID',i);
$('#desccontainer').html("");
$('#desccontainer').css('display','block');
$('#imagecontainer')[0].scrollIntoView(true);
$('#thumbcontainer').html("");
return;
}