fix #95 (thanks jonatkins)
This commit is contained in:
@ -6,21 +6,20 @@
|
||||
// be run once.
|
||||
|
||||
window.setupLargeImagePreview = function() {
|
||||
$('#portaldetails').on('click', '.imgpreview img', function() {
|
||||
$('#portaldetails').on('click', '.imgpreview', function() {
|
||||
var ex = $('#largepreview');
|
||||
if(ex.length > 0) {
|
||||
ex.remove();
|
||||
return;
|
||||
}
|
||||
var img = $(this).parent().html();
|
||||
var w = $(this)[0].naturalWidth/2;
|
||||
var h = $(this)[0].naturalHeight/2;
|
||||
var img = $(this).html();
|
||||
var w = $(this).find('img')[0].naturalWidth/2;
|
||||
var h = $(this).find('img')[0].naturalHeight/2;
|
||||
var c = $('#portaldetails').attr('class');
|
||||
$('body').append(
|
||||
'<div id="largepreview" class="'+c+'" style="margin-left: '+(-SIDEBAR_WIDTH/2-w-2)+'px; margin-top: '+(-h-2)+'px">' + img + '</div>'
|
||||
);
|
||||
$('#largepreview').click(function() { $(this).remove() });
|
||||
$('#largepreview img').attr('title', '');
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user