summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-06-04 22:21:16 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-06-04 22:21:16 +0200
commitdab656007d4ecc75546d5d7a3b0743b896dd6666 (patch)
tree7f2940fb858c6d792980bc3fad0debe083381fd4 /apps
parente5816451c855c8a6b8e28554dc4a787b028ffab6 (diff)
downloadnextcloud-server-dab656007d4ecc75546d5d7a3b0743b896dd6666.tar.gz
nextcloud-server-dab656007d4ecc75546d5d7a3b0743b896dd6666.zip
fix imageviewer not showing up when using the actions menu
Diffstat (limited to 'apps')
-rw-r--r--apps/files_imageviewer/js/lightbox.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_imageviewer/js/lightbox.js b/apps/files_imageviewer/js/lightbox.js
index dd091aa0d77..e29bc510ee3 100644
--- a/apps/files_imageviewer/js/lightbox.js
+++ b/apps/files_imageviewer/js/lightbox.js
@@ -1,3 +1,4 @@
+var lightBoxShown=false;
$(document).ready(function() {
images={};//image cache
FileActions.register('image','View',function(filename){
@@ -38,9 +39,12 @@ function showLightbox(container,img){
container.append(img);
container.css('top',Math.round( ($( window ).height() - img.height)/2));
container.css('left',Math.round( ($( window ).width() - img.width)/2));
+ lightBoxShown=true;
}
function hideLightbox(){
- $('#lightbox_overlay').remove();
- $('#lightbox').remove();
+ if(lightBoxShown){
+ $('#lightbox_overlay').remove();
+ $('#lightbox').remove();
+ }
} \ No newline at end of file