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 animateOut=(slideshowinterval!=0 && Math.abs(slideshowinterval)<2) ? 0 : 100;
var animateIn=animateOut/2;
$('#desccontainer').html(getProgressEl()+currentlink(i)+imagelist[i].desc);
$('#desccontainer').css('display','block');
setProgress(i);
$('#imagecontainer').clearQueue();
$('#imagecontainer').stop();
$('#imagecontainer').css('margin-left', '0px');
@@ -980,7 +982,6 @@ function showimage(i) {
preload(i);
subfoldersmalllist();
currentimage=i;
setProgress(i);
$('#imagecontainer').animate({
'marginLeft' : dirStr+"=200px",
'opacity' : "+=1"
@@ -1031,8 +1032,6 @@ function showbigimage(i) {
showimage(currentimage);
});
$('#desccontainer').html(getProgressEl()+currentlink(i)+imagelist[i].desc);
$('#desccontainer').css('display','block');
if (fullscreen) {
$('#imagecontainer')[0].scrollIntoView(true);
}
@@ -1103,13 +1102,13 @@ function preloadcheck() {
var imgs=$('#preloadcontainer img');
var completed=preloadcheckcount();
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) {
clearInterval(preloader);
if ($.browser.msie) {
$('#desccontainer').css('background-color',"rgb(255,255,255)");
$('#thumbrow').css('background-color',"rgb(255,255,255)");
} else {
$('#desccontainer').css('background-color',"rgba(255,255,255,0)");
$('#thumbrow').css('background-color',"rgba(255,255,255,0)");
}
}
return;
@@ -1621,6 +1620,10 @@ function keypressed(e) {
if (unicode==65) {
allthumbs();
}
// b: boss key
if (unicode==66) {
bosskey();
}
// f: fullscreen
if (unicode==70) {
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;
}