From fe5be7ecb71502fffe87f794186f0aca239d9adb Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 27 May 2013 10:41:40 +0900 Subject: [PATCH] =?UTF-8?q?=EC=98=B5=EC=85=98=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EB=B0=8F=20=EC=82=AD=EC=A0=9C=20=EC=8A=A4=ED=81=AC=EB=A6=BD?= =?UTF-8?q?=ED=8A=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shop/item.php | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/shop/item.php b/shop/item.php index b42f3e676..c298e9b0f 100644 --- a/shop/item.php +++ b/shop/item.php @@ -497,13 +497,15 @@ else var $el = $(this).closest("li"); var del_exec = true; - // 선택옵션이 하나이상인지 - if($el.hasClass("sit_opt_list")) { - if($(".sit_opt_list").size() <= 1) - del_exec = false; - } else { - if($(".sit_opt_list").size() < 1) - del_exec = false; + if($("#sit_sel_option .sit_spl_list").size() > 0) { + // 선택옵션이 하나이상인지 + if($el.hasClass("sit_opt_list")) { + if($(".sit_opt_list").size() <= 1) + del_exec = false; + } else { + if($(".sit_opt_list").size() < 1) + del_exec = false; + } } if(del_exec) { @@ -656,13 +658,30 @@ else opt += "\n"; if($("#sit_sel_option > ul").size() < 1) { - $("#sit_sel_option").html(''); + $("#sit_sel_option").html(""); $("#sit_sel_option > ul").html(opt); } else{ - if($("#sit_sel_option > ul li").size() < 1) - $("#sit_sel_option > ul").html(opt); - else - $("#sit_sel_option > ul li:last").after(opt); + if(type) { + if($("#sit_sel_option .sit_spl_list").size() > 0) { + $("#sit_sel_option .sit_spl_list:last").after(opt); + } else { + if($("#sit_sel_option .sit_opt_list").size() > 0) { + $("#sit_sel_option .sit_opt_list:last").after(opt); + } else { + $("#sit_sel_option > ul").html(opt); + } + } + } else { + if($("#sit_sel_option .sit_opt_list").size() > 0) { + $("#sit_sel_option .sit_opt_list:last").after(opt); + } else { + if($("#sit_sel_option .sit_spl_list").size() > 0) { + $("#sit_sel_option .sit_spl_list:first").before(opt); + } else { + $("#sit_sel_option > ul").html(opt); + } + } + } } price_calculate();