diff --git a/js/iteminfoimageresize.js b/js/iteminfoimageresize.js new file mode 100644 index 000000000..4d15c89ec --- /dev/null +++ b/js/iteminfoimageresize.js @@ -0,0 +1,44 @@ +(function($) { + $.fn.iteminfoimageresize = function(selector) + { + var cfg = { + selector: "img" + }; + + if(typeof selector == "object") { + cfg = $.extend(cfg, selector); + } else { + if(selector) { + cfg = $.extend({ selector: selector }); + } + } + + var $img = this.find(cfg.selector); + var $this = this; + + function image_resize() + { + var width = $this.width(); + + $img.each(function() { + $(this).removeAttr("width") + .removeAttr("height") + .css("width","") + .css("height", ""); + + if($(this).data("width") == undefined) + $(this).data("width", $(this).width()); + + if($(this).data("width") > width) { + $(this).css("width", "100%"); + } + }); + } + + $(window).on("resize", function() { + image_resize(); + }); + + image_resize(); + } +}(jQuery)); \ No newline at end of file diff --git a/mobile/skin/shop/basic/itemqa.skin.php b/mobile/skin/shop/basic/itemqa.skin.php index a4f8859a4..c48fbe95d 100644 --- a/mobile/skin/shop/basic/itemqa.skin.php +++ b/mobile/skin/shop/basic/itemqa.skin.php @@ -3,6 +3,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 ?> +
@@ -110,7 +111,12 @@ $(function(){ $con.slideUp(); } else { $(".sit_qa_con:visible").hide(); - $con.slideDown(); + $con.slideDown( + function() { + // 이미지 리사이즈 + $con.iteminfoimageresize(); + } + ); } }); diff --git a/mobile/skin/shop/basic/itemqalist.skin.php b/mobile/skin/shop/basic/itemqalist.skin.php index 824f23d1d..37d87b827 100644 --- a/mobile/skin/shop/basic/itemqalist.skin.php +++ b/mobile/skin/shop/basic/itemqalist.skin.php @@ -3,6 +3,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> +
@@ -111,7 +112,12 @@ $(function(){ } else { $(".sqa_con_btn button").text("보기"); $("div[id^=sqa_con]:visible").hide(); - $con.slideDown(); + $con.slideDown( + function() { + // 이미지 리사이즈 + $con.iteminfoimageresize(); + } + ); $(this).text("닫기"); } }); diff --git a/mobile/skin/shop/basic/itemuse.skin.php b/mobile/skin/shop/basic/itemuse.skin.php index 9080d7d85..9acad155a 100644 --- a/mobile/skin/shop/basic/itemuse.skin.php +++ b/mobile/skin/shop/basic/itemuse.skin.php @@ -3,6 +3,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 ?> +
@@ -28,7 +29,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 ?>
  • - +
    작성자
    @@ -90,7 +91,12 @@ $(function(){ $con.slideUp(); } else { $(".sit_use_con:visible").hide(); - $con.slideDown(); + $con.slideDown( + function() { + // 이미지 리사이즈 + $con.iteminfoimageresize(); + } + ); } }); diff --git a/mobile/skin/shop/basic/itemuselist.skin.php b/mobile/skin/shop/basic/itemuselist.skin.php index 34762d29b..291d3662b 100644 --- a/mobile/skin/shop/basic/itemuselist.skin.php +++ b/mobile/skin/shop/basic/itemuselist.skin.php @@ -3,6 +3,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> + @@ -91,7 +92,12 @@ $(function(){ } else { $(".sps_con_btn button").text("보기"); $("div[id^=sps_con]:visible").hide(); - $con.slideDown(); + $con.slideDown( + function() { + // 이미지 리사이즈 + $con.iteminfoimageresize(); + } + ); $(this).text("닫기"); } }); diff --git a/skin/shop/basic/itemqa.skin.php b/skin/shop/basic/itemqa.skin.php index ab918864d..bb810c8b3 100644 --- a/skin/shop/basic/itemqa.skin.php +++ b/skin/shop/basic/itemqa.skin.php @@ -3,6 +3,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 ?> +
    @@ -110,7 +111,12 @@ $(function(){ $con.slideUp(); } else { $(".sit_qa_con:visible").hide(); - $con.slideDown(); + $con.slideDown( + function() { + // 이미지 리사이즈 + $con.iteminfoimageresize(); + } + ); } }); diff --git a/skin/shop/basic/itemqalist.skin.php b/skin/shop/basic/itemqalist.skin.php index c6b685faf..5fb7a9e0a 100644 --- a/skin/shop/basic/itemqalist.skin.php +++ b/skin/shop/basic/itemqalist.skin.php @@ -3,6 +3,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> + @@ -112,7 +113,12 @@ $(function(){ } else { $(".sqa_con_btn button").text("보기"); $("div[id^=sqa_con]:visible").hide(); - $con.slideDown(); + $con.slideDown( + function() { + // 이미지 리사이즈 + $con.iteminfoimageresize(); + } + ); $(this).text("닫기"); } }); diff --git a/skin/shop/basic/itemuse.skin.php b/skin/shop/basic/itemuse.skin.php index 15c559a5f..5d0ed50c0 100644 --- a/skin/shop/basic/itemuse.skin.php +++ b/skin/shop/basic/itemuse.skin.php @@ -3,6 +3,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 ?> +
    @@ -89,7 +90,12 @@ $(function(){ $con.slideUp(); } else { $(".sit_use_con:visible").hide(); - $con.slideDown(); + $con.slideDown( + function() { + // 이미지 리사이즈 + $con.iteminfoimageresize(); + } + ); } }); diff --git a/skin/shop/basic/itemuselist.skin.php b/skin/shop/basic/itemuselist.skin.php index c8cfd08e8..57f3062b3 100644 --- a/skin/shop/basic/itemuselist.skin.php +++ b/skin/shop/basic/itemuselist.skin.php @@ -3,6 +3,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> + @@ -90,7 +91,12 @@ $(function(){ } else { $(".sps_con_btn button").text("보기"); $("div[id^=sps_con]:visible").hide(); - $con.slideDown(); + $con.slideDown( + function() { + // 이미지 리사이즈 + $con.iteminfoimageresize(); + } + ); $(this).text("닫기"); } });