diff --git a/js/iteminfoimageresize.js b/js/iteminfoimageresize.js deleted file mode 100644 index 4d15c89ec..000000000 --- a/js/iteminfoimageresize.js +++ /dev/null @@ -1,44 +0,0 @@ -(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/js/viewimageresize.js b/js/viewimageresize.js index 4336e11c5..7b9a1eaf7 100644 --- a/js/viewimageresize.js +++ b/js/viewimageresize.js @@ -47,4 +47,47 @@ image_resize(); }); } + + $.fn.viewimageresize2 = 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 9e1458b8f..7a5f2624c 100644 --- a/mobile/skin/shop/basic/itemqa.skin.php +++ b/mobile/skin/shop/basic/itemqa.skin.php @@ -5,7 +5,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 add_stylesheet('', 0); ?> - +
@@ -133,7 +133,7 @@ $(function(){ $con.slideDown( function() { // 이미지 리사이즈 - $con.iteminfoimageresize(); + $con.viewimageresize2(); } ); } diff --git a/mobile/skin/shop/basic/itemqalist.skin.php b/mobile/skin/shop/basic/itemqalist.skin.php index ab8e1b5ee..982bd068f 100644 --- a/mobile/skin/shop/basic/itemqalist.skin.php +++ b/mobile/skin/shop/basic/itemqalist.skin.php @@ -5,7 +5,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 add_stylesheet('', 0); ?> - +
@@ -136,7 +136,7 @@ $(function(){ $con.slideDown( function() { // 이미지 리사이즈 - $con.iteminfoimageresize(); + $con.viewimageresize2(); } ); $(this).text("닫기"); diff --git a/mobile/skin/shop/basic/itemuse.skin.php b/mobile/skin/shop/basic/itemuse.skin.php index ca87a517e..bfae12dca 100644 --- a/mobile/skin/shop/basic/itemuse.skin.php +++ b/mobile/skin/shop/basic/itemuse.skin.php @@ -5,7 +5,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 add_stylesheet('', 0); ?> - +
@@ -95,7 +95,7 @@ $(function(){ $con.slideDown( function() { // 이미지 리사이즈 - $con.iteminfoimageresize(); + $con.viewimageresize(); } ); } diff --git a/mobile/skin/shop/basic/itemuselist.skin.php b/mobile/skin/shop/basic/itemuselist.skin.php index 551465780..c12a67e3f 100644 --- a/mobile/skin/shop/basic/itemuselist.skin.php +++ b/mobile/skin/shop/basic/itemuselist.skin.php @@ -5,7 +5,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 add_stylesheet('', 0); ?> - + @@ -98,7 +98,7 @@ $(function(){ $con.slideDown( function() { // 이미지 리사이즈 - $con.iteminfoimageresize(); + $con.viewimageresize2(); } ); $(this).text("닫기"); diff --git a/skin/shop/basic/item.info.skin.php b/skin/shop/basic/item.info.skin.php index 4de83e319..ada9c0ba3 100644 --- a/skin/shop/basic/item.info.skin.php +++ b/skin/shop/basic/item.info.skin.php @@ -5,7 +5,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 add_stylesheet('', 0); ?> - +
@@ -119,6 +119,6 @@ add_stylesheet('', \ No newline at end of file diff --git a/skin/shop/basic/itemqa.skin.php b/skin/shop/basic/itemqa.skin.php index a1a14ca6f..5cf02e560 100644 --- a/skin/shop/basic/itemqa.skin.php +++ b/skin/shop/basic/itemqa.skin.php @@ -5,7 +5,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 add_stylesheet('', 0); ?> - +
@@ -134,7 +134,7 @@ $(function(){ $con.slideDown( function() { // 이미지 리사이즈 - $con.iteminfoimageresize(); + $con.viewimageresize2(); } ); } diff --git a/skin/shop/basic/itemqalist.skin.php b/skin/shop/basic/itemqalist.skin.php index bcd63f9d2..3f594016f 100644 --- a/skin/shop/basic/itemqalist.skin.php +++ b/skin/shop/basic/itemqalist.skin.php @@ -5,7 +5,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 add_stylesheet('', 0); ?> - + @@ -137,7 +137,7 @@ $(function(){ $con.slideDown( function() { // 이미지 리사이즈 - $con.iteminfoimageresize(); + $con.viewimageresize2(); } ); $(this).text("닫기"); diff --git a/skin/shop/basic/itemuse.skin.php b/skin/shop/basic/itemuse.skin.php index 8204cbb34..b6408af5e 100644 --- a/skin/shop/basic/itemuse.skin.php +++ b/skin/shop/basic/itemuse.skin.php @@ -5,7 +5,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 add_stylesheet('', 0); ?> - +
@@ -95,7 +95,7 @@ $(function(){ $con.slideDown( function() { // 이미지 리사이즈 - $con.iteminfoimageresize(); + $con.viewimageresize2(); } ); } diff --git a/skin/shop/basic/itemuselist.skin.php b/skin/shop/basic/itemuselist.skin.php index 9fb947d42..99636320e 100644 --- a/skin/shop/basic/itemuselist.skin.php +++ b/skin/shop/basic/itemuselist.skin.php @@ -5,7 +5,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 add_stylesheet('', 0); ?> - + @@ -98,7 +98,7 @@ $(function(){ $con.slideDown( function() { // 이미지 리사이즈 - $con.iteminfoimageresize(); + $con.viewimageresize2(); } ); $(this).text("닫기");