Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
@ -184,7 +184,7 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
|
|||||||
// Animated GIF는 썸네일 생성하지 않음
|
// Animated GIF는 썸네일 생성하지 않음
|
||||||
if($size[2] == 1) {
|
if($size[2] == 1) {
|
||||||
if(is_animated_gif($source_file))
|
if(is_animated_gif($source_file))
|
||||||
return;
|
return basename($source_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
$thumb_time = @filemtime($thumb_file);
|
$thumb_time = @filemtime($thumb_file);
|
||||||
|
|||||||
@ -217,6 +217,35 @@ $(window).load(function() {
|
|||||||
view_image_resize();
|
view_image_resize();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var now = new Date();
|
||||||
|
var timeout = false;
|
||||||
|
var millisec = 200;
|
||||||
|
var tid;
|
||||||
|
|
||||||
|
$(window).resize(function() {
|
||||||
|
now = new Date();
|
||||||
|
if (timeout === false) {
|
||||||
|
timeout = true;
|
||||||
|
|
||||||
|
if(tid != null)
|
||||||
|
clearTimeout(tid);
|
||||||
|
|
||||||
|
tid = setTimeout(resize_check, millisec);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function resize_check() {
|
||||||
|
if (new Date() - now < millisec) {
|
||||||
|
if(tid != null)
|
||||||
|
clearTimeout(tid);
|
||||||
|
|
||||||
|
tid = setTimeout(resize_check, millisec);
|
||||||
|
} else {
|
||||||
|
timeout = false;
|
||||||
|
view_image_resize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
$("a.view_image").click(function() {
|
$("a.view_image").click(function() {
|
||||||
window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
|
window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
|
||||||
@ -240,14 +269,27 @@ function view_image_resize()
|
|||||||
{
|
{
|
||||||
var $img = $("#bo_v_atc img");
|
var $img = $("#bo_v_atc img");
|
||||||
var img_wrap = $("#bo_v_atc").width();
|
var img_wrap = $("#bo_v_atc").width();
|
||||||
|
var win_width = $(window).width() - 35;
|
||||||
|
var res_width = 0;
|
||||||
|
|
||||||
|
if(img_wrap < win_width)
|
||||||
|
res_width = img_wrap;
|
||||||
|
else
|
||||||
|
res_width = win_width;
|
||||||
|
|
||||||
$img.each(function() {
|
$img.each(function() {
|
||||||
var img_width = $(this).width();
|
var img_width = $(this).width();
|
||||||
$(this).data("width", img_width); // 원래 이미지 사이즈
|
var this_width = $(this).data("width");
|
||||||
if (img_width > img_wrap) {
|
|
||||||
$(this).addClass("img_fix");
|
if(this_width == undefined) {
|
||||||
} else if (img_width <= img_wrap && img_width >= $(this).data("width")) {
|
$(this).data("width", img_width); // 원래 이미지 사이즈
|
||||||
$(this).removeClass("img_fix");
|
this_width = img_width;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this_width > res_width) {
|
||||||
|
$(this).width(res_width);
|
||||||
|
} else {
|
||||||
|
$(this).width(this_width);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -215,6 +215,35 @@ $(window).load(function() {
|
|||||||
view_image_resize();
|
view_image_resize();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var now = new Date();
|
||||||
|
var timeout = false;
|
||||||
|
var millisec = 200;
|
||||||
|
var tid;
|
||||||
|
|
||||||
|
$(window).resize(function() {
|
||||||
|
now = new Date();
|
||||||
|
if (timeout === false) {
|
||||||
|
timeout = true;
|
||||||
|
|
||||||
|
if(tid != null)
|
||||||
|
clearTimeout(tid);
|
||||||
|
|
||||||
|
tid = setTimeout(resize_check, millisec);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function resize_check() {
|
||||||
|
if (new Date() - now < millisec) {
|
||||||
|
if(tid != null)
|
||||||
|
clearTimeout(tid);
|
||||||
|
|
||||||
|
tid = setTimeout(resize_check, millisec);
|
||||||
|
} else {
|
||||||
|
timeout = false;
|
||||||
|
view_image_resize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
$("a.view_image").click(function() {
|
$("a.view_image").click(function() {
|
||||||
window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
|
window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
|
||||||
@ -238,14 +267,27 @@ function view_image_resize()
|
|||||||
{
|
{
|
||||||
var $img = $("#bo_v_atc img");
|
var $img = $("#bo_v_atc img");
|
||||||
var img_wrap = $("#bo_v_atc").width();
|
var img_wrap = $("#bo_v_atc").width();
|
||||||
|
var win_width = $(window).width() - 35;
|
||||||
|
var res_width = 0;
|
||||||
|
|
||||||
|
if(img_wrap < win_width)
|
||||||
|
res_width = img_wrap;
|
||||||
|
else
|
||||||
|
res_width = win_width;
|
||||||
|
|
||||||
$img.each(function() {
|
$img.each(function() {
|
||||||
var img_width = $(this).width();
|
var img_width = $(this).width();
|
||||||
$(this).data("width", img_width); // 원래 이미지 사이즈
|
var this_width = $(this).data("width");
|
||||||
if (img_width > img_wrap) {
|
|
||||||
$(this).addClass("img_fix");
|
if(this_width == undefined) {
|
||||||
} else if (img_width <= img_wrap && img_width >= $(this).data("width")) {
|
$(this).data("width", img_width); // 원래 이미지 사이즈
|
||||||
$(this).removeClass("img_fix");
|
this_width = img_width;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this_width > res_width) {
|
||||||
|
$(this).width(res_width);
|
||||||
|
} else {
|
||||||
|
$(this).width(this_width);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user