1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-07-31 02:10:37 +02:00

Filesmanager: Bootstrap Lightbox added instead of default Modal Dialog. #100

This commit is contained in:
Awilum
2013-03-09 00:01:41 +02:00
parent d261be9b07
commit cb973d3ea9
2 changed files with 11 additions and 22 deletions

View File

@@ -8,21 +8,7 @@ $.monstra.filesmanager = {
showImage: function() {
$('.image').find('a').on('click', function() {
var src = $(this).attr('href');
var file = $(src.split('/')).last();
var image = new Image();
image.src = src;
$(image).load(function() {
$('#showImage')
.modal('show')
.css({"min-width": 632})
.find('img')
.attr('src', src);
$('#showImage').find('h3 span').text(file[0]);
$('#showImage').find('img').css({"max-width": 600});
$('#showImage').find('img').attr('alt', file[0]);
});
return false;
$('#previewLightbox').lightbox('show').find('img').attr('src', $(this).attr('rel'));
});
}
};