From 560160c37792a166ac670a5fe18972fa393bb634 Mon Sep 17 00:00:00 2001 From: chicpro Date: Tue, 3 Dec 2013 14:06:24 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BF=A0=ED=8F=B0=20=EC=A0=81=EC=9A=A9=20?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/shop/orderform.php | 21 ++++++++++++--------- shop/orderform.php | 3 +++ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/mobile/shop/orderform.php b/mobile/shop/orderform.php index 305580a6a..657487763 100644 --- a/mobile/shop/orderform.php +++ b/mobile/shop/orderform.php @@ -820,9 +820,9 @@ $(function() { $(".cp_btn").click(function() { $cp_btn_el = $(this); - $cp_row_el = $(this).closest("tr"); + $cp_row_el = $(this).closest("li"); $("#cp_frm").remove(); - var it_id = $cp_btn_el.closest("tr").find("input[name^=it_id]").val(); + var it_id = $cp_btn_el.closest("li").find("input[name^=it_id]").val(); $.post( "./orderitemcoupon.php", @@ -856,7 +856,7 @@ $(function() { if(id == cp_id) { cp_dup_idx = index; cp_dup = true; - $cp_dup_el = $(this).closest("tr");; + $cp_dup_el = $(this).closest("li");; return false; } @@ -868,10 +868,13 @@ $(function() { return false; } else { coupon_cancel($cp_dup_el); + $("#cp_frm").remove(); + $cp_dup_el.find(".cp_btn").text("쿠폰적용").focus(); + $cp_dup_el.find(".cp_cancel").remove(); } } - var $s_el = $cp_row_el.find(".total_price");; + var $s_el = $cp_row_el.find(".total_price strong");; sell_price = parseInt($cp_row_el.find("input[name^=it_price]").val()); sell_price = sell_price - parseInt(price); if(sell_price < 0) { @@ -884,9 +887,9 @@ $(function() { calculate_total_price(); $("#cp_frm").remove(); - $cp_btn_el.text("변경").focus(); + $cp_btn_el.text("쿠폰변경").focus(); if(!$cp_row_el.find(".cp_cancel").size()) - $cp_btn_el.after(""); + $cp_btn_el.after(""); }); $("#cp_close").live("click", function() { @@ -895,10 +898,10 @@ $(function() { }); $(".cp_cancel").live("click", function() { - coupon_cancel($(this).closest("tr")); + coupon_cancel($(this).closest("li")); calculate_total_price(); $("#cp_frm").remove(); - $(this).closest("tr").find(".cp_btn").text("쿠폰적용").focus(); + $(this).closest("li").find(".cp_btn").text("쿠폰적용").focus(); $(this).remove(); }); @@ -1103,7 +1106,7 @@ $(function() { function coupon_cancel($el) { - var $dup_sell_el = $el.find(".total_price"); + var $dup_sell_el = $el.find(".total_price strong"); var $dup_price_el = $el.find("input[name^=cp_price]"); var org_sell_price = $el.find("input[name^=it_price]").val(); diff --git a/shop/orderform.php b/shop/orderform.php index b1225a84d..feae24756 100644 --- a/shop/orderform.php +++ b/shop/orderform.php @@ -1131,6 +1131,9 @@ $(function() { return false; } else { coupon_cancel($cp_dup_el); + $("#cp_frm").remove(); + $cp_dup_el.find(".cp_btn").text("적용").focus(); + $cp_dup_el.find(".cp_cancel").remove(); } }