|
|
|
@ -23,27 +23,7 @@ $(document).ready(function() {
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(window).on('resize', function() {
|
|
|
|
|
resizeGallery();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function resizeGallery() {
|
|
|
|
|
$('.g-main').each(function() {
|
|
|
|
|
if($(this).find('.empty-txt').length > 0 || $(this).find('.grid').length == 0) return;
|
|
|
|
|
|
|
|
|
|
var gel = $(this).find('.grid').eq(0);
|
|
|
|
|
var gw = parseFloat(gel[0].getBoundingClientRect().width);
|
|
|
|
|
var gpl = parseFloat(gel.css('padding-left').replace(/[^0-9]/g,''));
|
|
|
|
|
var gpr = parseFloat(gel.css('padding-right').replace(/[^0-9]/g,''));
|
|
|
|
|
var g_img_height = (gw - (gpl+gpr)) * parseFloat(1);
|
|
|
|
|
|
|
|
|
|
$(this).find('.grid .g-img').css('height', g_img_height + 'px');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
var currentPage = 1;
|
|
|
|
|
|
|
|
|
|
function getGalleryData(uid) {
|
|
|
|
@ -112,5 +92,22 @@ $(document).ready(function() {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
getGalleryList();
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(window).on('resize', function() {
|
|
|
|
|
resizeGallery();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function resizeGallery() {
|
|
|
|
|
$('.g-main').each(function() {
|
|
|
|
|
if($(this).find('.empty-txt').length > 0 || $(this).find('.grid').length == 0) return;
|
|
|
|
|
|
|
|
|
|
var gel = $(this).find('.grid').eq(0);
|
|
|
|
|
var gw = parseFloat(gel[0].getBoundingClientRect().width);
|
|
|
|
|
var gpl = parseFloat(gel.css('padding-left').replace(/[^0-9]/g,''));
|
|
|
|
|
var gpr = parseFloat(gel.css('padding-right').replace(/[^0-9]/g,''));
|
|
|
|
|
var g_img_height = (gw - (gpl+gpr)) * parseFloat(1);
|
|
|
|
|
|
|
|
|
|
$(this).find('.grid .g-img').css('height', g_img_height + 'px');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|