fix imageviewer not showing up when using the actions menu
This commit is contained in:
parent
e5816451c8
commit
dab656007d
|
@ -1,3 +1,4 @@
|
||||||
|
var lightBoxShown=false;
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
images={};//image cache
|
images={};//image cache
|
||||||
FileActions.register('image','View',function(filename){
|
FileActions.register('image','View',function(filename){
|
||||||
|
@ -38,9 +39,12 @@ function showLightbox(container,img){
|
||||||
container.append(img);
|
container.append(img);
|
||||||
container.css('top',Math.round( ($( window ).height() - img.height)/2));
|
container.css('top',Math.round( ($( window ).height() - img.height)/2));
|
||||||
container.css('left',Math.round( ($( window ).width() - img.width)/2));
|
container.css('left',Math.round( ($( window ).width() - img.width)/2));
|
||||||
|
lightBoxShown=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideLightbox(){
|
function hideLightbox(){
|
||||||
$('#lightbox_overlay').remove();
|
if(lightBoxShown){
|
||||||
$('#lightbox').remove();
|
$('#lightbox_overlay').remove();
|
||||||
|
$('#lightbox').remove();
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue