Skip lightbox when clicking (non-cubbies) images in IE. Just open the image in a new tab.
This is because the lightbox doesn't work in IE.
This commit is contained in:
parent
d9cbd32d88
commit
c592997fce
1 changed files with 9 additions and 3 deletions
|
|
@ -31,7 +31,7 @@ jQuery.fn.center = (function() {
|
||||||
body: $(document.body),
|
body: $(document.body),
|
||||||
window: $(window)
|
window: $(window)
|
||||||
});
|
});
|
||||||
|
|
||||||
self.post.delegate("a.stream-photo-link", "click", self.lightboxImageClicked);
|
self.post.delegate("a.stream-photo-link", "click", self.lightboxImageClicked);
|
||||||
self.imageset.delegate("img", "click", self.imagesetImageClicked);
|
self.imageset.delegate("img", "click", self.imagesetImageClicked);
|
||||||
|
|
||||||
|
|
@ -94,6 +94,12 @@ jQuery.fn.center = (function() {
|
||||||
images = selectedImage.parents('.stream_element').find('img.stream-photo'),
|
images = selectedImage.parents('.stream_element').find('img.stream-photo'),
|
||||||
imageThumb;
|
imageThumb;
|
||||||
|
|
||||||
|
if( $.browser.msie ) {
|
||||||
|
/* No fancy schmancy lightbox for IE, because it doesn't work in IE */
|
||||||
|
window.open(imageUrl);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
self.imageset.html("");
|
self.imageset.html("");
|
||||||
images.each(function(index, image) {
|
images.each(function(index, image) {
|
||||||
image = $(image);
|
image = $(image);
|
||||||
|
|
@ -101,7 +107,7 @@ jQuery.fn.center = (function() {
|
||||||
src: image.attr("data-small-photo"),
|
src: image.attr("data-small-photo"),
|
||||||
"data-full-photo": image.attr("data-full-photo")
|
"data-full-photo": image.attr("data-full-photo")
|
||||||
});
|
});
|
||||||
|
|
||||||
if(image.attr("data-full-photo") == imageUrl) {
|
if(image.attr("data-full-photo") == imageUrl) {
|
||||||
imageThumb = thumb;
|
imageThumb = thumb;
|
||||||
};
|
};
|
||||||
|
|
@ -114,7 +120,7 @@ jQuery.fn.center = (function() {
|
||||||
.revealLightbox();
|
.revealLightbox();
|
||||||
};
|
};
|
||||||
|
|
||||||
this.imagesetImageClicked = function(evt) {
|
this.imagesetImageClicked = function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue