Fix #6641 - add events for handling view and download
[roojs1] / ux / Lightbox.js
index 456aeb5..46273de 100644 (file)
@@ -312,7 +312,7 @@ Roo.apply(Roo.ux.Lightbox.prototype,
                 position: 'absolute',
                 top: '0px',
                 width: '100%',
-                'z-index': '999'
+                'z-index': '40999'
             }
         });
     },
@@ -370,7 +370,7 @@ Roo.apply(Roo.ux.Lightbox.prototype,
         });
          
         //this.imageArray = [];
-        var imageNum = 0;       
+        var imageNum = -1;       
         
         if (imageLink) {
             imageLink = Roo.get(imageLink);
@@ -381,6 +381,11 @@ Roo.apply(Roo.ux.Lightbox.prototype,
                     imageNum = i;
                 }
             });
+           if (imageNum < 0) {
+               
+               this.imageArray.push(imageLink);
+               imageNum = this.imageArray.length-1;
+           }
         }
          
         // let's assume the constructor sorts out the list of images..
@@ -408,7 +413,7 @@ Roo.apply(Roo.ux.Lightbox.prototype,
         this.lightbox.setStyle({ 
             top: lightboxTop + 'px', 
             left: lightboxLeft + 'px' ,
-            zIndex : 1000
+            zIndex : 41000
         });
         //console.log("show lightbox");
         this.lightbox.show();
@@ -433,7 +438,7 @@ Roo.apply(Roo.ux.Lightbox.prototype,
         // hide elements during transition
         if (this.animate) {
             this.loading.setStyle({
-                zIndex :1200
+                zIndex : 41200
             });
             this.loading.show();
             this.loadinglink.setX( (Roo.lib.Dom.getViewWidth() / 2) - 16);