[evolvis-commits] r17696: javascript-lightbox pending merges:↵ Thorsten Glaser 2011-11-02 allow to download the current image from the lightbox

mirabilos at evolvis.org mirabilos at evolvis.org
Wed Nov 2 17:07:28 CET 2011


Author: mirabilos
Date: 2011-11-02 17:07:28 +0100 (Wed, 02 Nov 2011)
New Revision: 17696

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/www/js/lightbox.js
Log:
javascript-lightbox pending merges:
  Thorsten Glaser 2011-11-02 allow to download the current image from the lightbox


Modified: trunk/gforge_base/evolvisforge-5.1/src/www/js/lightbox.js
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/js/lightbox.js	2011-11-02 16:07:24 UTC (rev 17695)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/js/lightbox.js	2011-11-02 16:07:28 UTC (rev 17696)
@@ -3,6 +3,7 @@
 //	Lightbox v2.05
 //	by Lokesh Dhakar - http://www.lokeshdhakar.com
 //	Last Modification: 3/18/11
+//	Changed by Thorsten Glaser <t.glaser at tarent.de> for Evolvis
 //
 //	For more information, visit:
 //	http://lokeshdhakar.com/projects/lightbox2/
@@ -149,7 +150,9 @@
             Builder.node('div', {id:'imageDataContainer'},
                 Builder.node('div',{id:'imageData'}, [
                     Builder.node('div',{id:'imageDetails'}, [
-                        Builder.node('span',{id:'caption'}),
+			Builder.node('a',{id:'captionLink', href:'#'},
+			    Builder.node('span',{id:'caption'})
+			),
                         Builder.node('span',{id:'numberDisplay'})
                     ]),
                     Builder.node('div',{id:'bottomNav'},
@@ -174,7 +177,7 @@
         (function(){
             var ids = 
                 'overlay lightbox outerImageContainer imageContainer lightboxImage hoverNav prevLink nextLink loading loadingLink ' + 
-                'imageDataContainer imageData imageDetails caption numberDisplay bottomNav bottomNavClose';   
+                'imageDataContainer imageData imageDetails caption captionLink numberDisplay bottomNav bottomNavClose';   
             $w(ids).each(function(id){ th[id] = $(id); });
         }).defer();
     },
@@ -328,6 +331,11 @@
     //
     updateDetails: function() {
     
+	this.captionLink.href = this.imageArray[this.activeImage][0];
+	if (this.imageArray[this.activeImage][1] == "") {
+		this.imageArray[this.activeImage][1] = "Download";
+	}
+
         this.caption.update(this.imageArray[this.activeImage][1]).show();
 
         // if image is part of set display 'Image x of x' 



More information about the evolvis-commits mailing list