[Linpha-cvs] SF.net SVN: linpha: [4578] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <fan...@us...> - 2006-10-08 18:02:18
|
Revision: 4578 http://svn.sourceforge.net/linpha/?rev=4578&view=rev Author: fangehrn Date: 2006-10-08 11:02:04 -0700 (Sun, 08 Oct 2006) Log Message: ----------- 2006-10-08 flo * some improvements done, now it runs quite smooth :-) Modified Paths: -------------- trunk/linpha2/ChangeLog trunk/linpha2/lib/js/LinImage.js trunk/linpha2/templates/default/css/global.css trunk/linpha2/templates/default/view_img_static.html.php Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2006-10-08 15:42:12 UTC (rev 4577) +++ trunk/linpha2/ChangeLog 2006-10-08 18:02:04 UTC (rev 4578) @@ -1,4 +1,7 @@ 2006-10-08 flo + * some improvements done, now it runs quite smooth :-) + +2006-10-08 flo * implemented "lightbox" image view * preload images and xml data Modified: trunk/linpha2/lib/js/LinImage.js =================================================================== --- trunk/linpha2/lib/js/LinImage.js 2006-10-08 15:42:12 UTC (rev 4577) +++ trunk/linpha2/lib/js/LinImage.js 2006-10-08 18:02:04 UTC (rev 4578) @@ -45,15 +45,16 @@ loadImageContinue: function(t) { var loadedimgid = t.responseXML.documentElement.getElementsByTagName('imgid').item(0).firstChild.data; + // save xml data xmlDoc[loadedimgid] = t.responseXML.documentElement; + preloadXmlFinished[loadedimgid] = true; - if( loadedimgid == curImgId) // coming from loadImage() + if( loadedimgid == curImgId ) // coming from loadImage() { myLinImage.changeImage(); } else // coming from preloadImage() { - preloadXmlFinished[loadedimgid] = true; myLinImage.preloadImage(loadedimgid); } }, @@ -92,6 +93,7 @@ // once image is preloaded, resize image container imgPreloader.onload=function(){ + preloadImageFinished[curImgId] = true; $('mainImage').src = currentImgSrc; myLinImage.resizeImageContainer(imgWidth, imgHeight); } @@ -142,7 +144,7 @@ showImage: function(){ Element.hide('divloading'); new Effect.Appear('mainImage', { duration: 0.5, afterFinish: function(){ myLinImage.setImageInfoLink(); } }); - $('divimage').style.height = $('mainImage').style.height; // reset height to auto change if image is bigger or smaller + $('divimage').style.height = $('mainImage').style.height; // reset to correct height to prevent trouble if image is bigger or smaller this.setImageData(); this.preloadXml(); @@ -324,7 +326,10 @@ for(var i = 0; i < xmlDoc[curImgId].getElementsByTagName('nextthumb').length; i++) { var thumbId = xmlDoc[curImgId].getElementsByTagName('nextthumb').item(i).firstChild.data; - this.loadImageXml(thumbId); + if(! preloadXmlFinished[thumbId]) + { + this.loadImageXml(thumbId); + } } } @@ -334,7 +339,10 @@ for(var i = xmlDoc[curImgId].getElementsByTagName('prevthumb').length-1; i >= 0; i--) { var thumbId = xmlDoc[curImgId].getElementsByTagName('prevthumb').item(i).firstChild.data; - this.loadImageXml(thumbId); + if(! preloadXmlFinished[thumbId]) + { + this.loadImageXml(thumbId); + } } } }, Modified: trunk/linpha2/templates/default/css/global.css =================================================================== --- trunk/linpha2/templates/default/css/global.css 2006-10-08 15:42:12 UTC (rev 4577) +++ trunk/linpha2/templates/default/css/global.css 2006-10-08 18:02:04 UTC (rev 4578) @@ -115,19 +115,20 @@ /** * right */ -/* #divright + #divright { - position: absolute; + margin: 10px 10px 10px 10px; +/* position: absolute; top: 280px; - right: 10px; + right: 10px;*/ } #right { - width: 205px; +// width: 205px; padding: 5px; margin: 0px; - }*/ + } /** * menu Modified: trunk/linpha2/templates/default/view_img_static.html.php =================================================================== --- trunk/linpha2/templates/default/view_img_static.html.php 2006-10-08 15:42:12 UTC (rev 4577) +++ trunk/linpha2/templates/default/view_img_static.html.php 2006-10-08 18:02:04 UTC (rev 4578) @@ -42,9 +42,11 @@ } else { ?> <!-- show image --> + <div id="divimage"> <img id="mainimage" width="<?php echo $GLOBALS['linpha']->imgview->img_width; ?>" height="<?php echo $GLOBALS['linpha']->imgview->img_height; ?>" src="<?php echo LINPHA_DIR.'/get_image.php?id='.$GLOBALS['linpha']->imgview->id_current. '&max_width='.$GLOBALS['linpha']->imgview->img_width.'&max_height='.$GLOBALS['linpha']->imgview->img_height; ?>" /> + </div> <br /><br /> <!-- comments --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |