[19713] | 1 | <!--{* |
---|
| 2 | /* |
---|
| 3 | * This file is part of EC-CUBE |
---|
| 4 | * |
---|
[21867] | 5 | * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved. |
---|
[19713] | 6 | * |
---|
| 7 | * http://www.lockon.co.jp/ |
---|
| 8 | * |
---|
| 9 | * This program is free software; you can redistribute it and/or |
---|
| 10 | * modify it under the terms of the GNU General Public License |
---|
| 11 | * as published by the Free Software Foundation; either version 2 |
---|
| 12 | * of the License, or (at your option) any later version. |
---|
| 13 | * |
---|
| 14 | * This program is distributed in the hope that it will be useful, |
---|
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 17 | * GNU General Public License for more details. |
---|
| 18 | * |
---|
| 19 | * You should have received a copy of the GNU General Public License |
---|
| 20 | * along with this program; if not, write to the Free Software |
---|
| 21 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
| 22 | */ |
---|
| 23 | *}--> |
---|
[21537] | 24 | |
---|
[21050] | 25 | <section id="mypagecolumn"> |
---|
[21073] | 26 | <h2 class="title"><!--{$tpl_title|h}--></h2> |
---|
| 27 | <!--{include file=$tpl_navi}--> |
---|
[19713] | 28 | |
---|
[21073] | 29 | <h3 class="title_mypage"><!--{$tpl_subtitle|h}--></h3> |
---|
| 30 | <!--★インフォメーション★--> |
---|
| 31 | <div class="information"> |
---|
[21169] | 32 | <p>登録住所一覧です。<p> |
---|
[21533] | 33 | <p>最大<!--{$smarty.const.DELIV_ADDR_MAX|h}-->件まで登録できます。</p> |
---|
[21073] | 34 | </div> |
---|
| 35 | <!--{if $tpl_linemax < $smarty.const.DELIV_ADDR_MAX}--> |
---|
[21050] | 36 | <!--{* 退会時非表示 *}--> |
---|
| 37 | <!--{if $tpl_login}--> |
---|
[21073] | 38 | <!--★ボタン★--> |
---|
| 39 | <div class="btn_area_top"> |
---|
| 40 | <a href="<!--{$smarty.const.ROOT_URLPATH}-->mypage/delivery_addr.php" class="btn_sub addbtn" rel="external" target="_blank">新しいお届け先を追加</a> |
---|
| 41 | </div> |
---|
[19713] | 42 | <!--{/if}--> |
---|
[21073] | 43 | <!--{/if}--> |
---|
[19713] | 44 | |
---|
[21050] | 45 | <div class="form_area"> |
---|
[19713] | 46 | <!--{if $tpl_linemax > 0}--> |
---|
[21533] | 47 | <form name="form1" id="form1" method="post" action="<!--{$smarty.const.HTTPS_URL|sfTrimURL}-->/mypage/delivery.php" > |
---|
| 48 | <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> |
---|
| 49 | <input type="hidden" name="mode" value="" /> |
---|
| 50 | <input type="hidden" name="other_deliv_id" value="" /> |
---|
| 51 | <input type="hidden" name="pageno" value="<!--{$tpl_pageno}-->" /> |
---|
[19713] | 52 | |
---|
[21533] | 53 | <!--▼フォームボックスここから --> |
---|
| 54 | <div class="formBox"> |
---|
[21050] | 55 | |
---|
[21533] | 56 | <!--{section name=cnt loop=$arrOtherDeliv max=$dispNumber}--> |
---|
| 57 | <!--▼お届け先 --> |
---|
| 58 | <div class="delivBox"> |
---|
| 59 | <!--{assign var=OtherPref value="`$arrOtherDeliv[cnt].pref`"}--> |
---|
| 60 | <p><em><span class="zip_title">お届け先住所<!--{$smarty.section.cnt.iteration}--></span></em>:<br /> |
---|
[22205] | 61 | <!--{* 〒<span class="zip01"><!--{$arrOtherDeliv[cnt].zip01}--></span>-<span class="zip02"><!--{$arrOtherDeliv[cnt].zip02}--></span><br /> *}--> |
---|
| 62 | 〒<span class="zipcode"><!--{$arrOtherDeliv[cnt].zipcode}--></span><br /> |
---|
[21533] | 63 | <span class="address"><!--{$arrPref[$OtherPref]|h}--><!--{$arrOtherDeliv[cnt].addr01|h}--><!--{$arrOtherDeliv[cnt].addr02|h}--></span><br /> |
---|
| 64 | <span class="name01"><!--{$arrOtherDeliv[cnt].name01|h}--></span> <span class="name02"><!--{$arrOtherDeliv[cnt].name02|h}--></span></p> |
---|
[21050] | 65 | |
---|
[21533] | 66 | <ul class="edit"> |
---|
| 67 | <li><a href="#" onClick="win02('./delivery_addr.php?other_deliv_id=<!--{$arrOtherDeliv[cnt].other_deliv_id}-->','deliv_disp','600','640'); return false;" class="b_edit deliv_edit" rel="external">編集</a></li> |
---|
| 68 | <li><a href="#" onClick="fnModeSubmit('delete','other_deliv_id','<!--{$arrOtherDeliv[cnt].other_deliv_id}-->'); return false;" class="deliv_delete" rel="external"><img src="<!--{$TPL_URLPATH}-->img/button/btn_delete.png" class="pointer" width="21" height="20" alt="削除" /></a></li> |
---|
| 69 | </ul> |
---|
| 70 | </div> |
---|
| 71 | <!--▲お届け先--> |
---|
| 72 | <!--{/section}--> |
---|
[21050] | 73 | |
---|
[21533] | 74 | </div><!--▲formBox --> |
---|
| 75 | </form> |
---|
| 76 | <!--{else}--> |
---|
| 77 | <p class="delivempty"><strong>新しいお届け先はありません。</strong></p> |
---|
| 78 | <!--{/if}--> |
---|
[21050] | 79 | |
---|
[21533] | 80 | <!--{if count($arrOtherDeliv) > $dispNumber}--> |
---|
| 81 | <p><a rel="external" href="javascript: void(0);" class="btn_more" id="btn_more_delivery" onClick="getDelivery(<!--{$dispNumber}-->); return false;" rel="external">もっとみる(+<!--{$dispNumber}-->件)</a></p> |
---|
| 82 | <!--{/if}--> |
---|
| 83 | |
---|
| 84 | </div><!-- /.form_area --> |
---|
[21050] | 85 | </section> |
---|
[21533] | 86 | |
---|
[21107] | 87 | <!--▼検索バー --> |
---|
| 88 | <section id="search_area"> |
---|
[21533] | 89 | <form method="get" action="<!--{$smarty.const.ROOT_URLPATH}-->products/list.php"> |
---|
| 90 | <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> |
---|
| 91 | <input type="hidden" name="mode" value="search" /> |
---|
| 92 | <input type="search" name="name" id="search" value="" placeholder="キーワードを入力" class="searchbox" > |
---|
| 93 | </form> |
---|
[21107] | 94 | </section> |
---|
| 95 | <!--▲検索バー --> |
---|
[21073] | 96 | |
---|
| 97 | <script> |
---|
[21533] | 98 | var pageNo = 2; |
---|
[21073] | 99 | |
---|
[21533] | 100 | function getDelivery(limit) { |
---|
| 101 | $.mobile.showPageLoadingMsg(); |
---|
| 102 | var i = limit; |
---|
| 103 | //送信データを準備 |
---|
| 104 | var postData = {}; |
---|
| 105 | $('#form1').find(':input').each(function(){ |
---|
| 106 | postData[$(this).attr('name')] = $(this).val(); |
---|
| 107 | }); |
---|
| 108 | postData["mode"] = "getList"; |
---|
| 109 | postData["pageno"] = pageNo; |
---|
| 110 | postData["disp_number"] = i; |
---|
[21073] | 111 | |
---|
[21533] | 112 | $.ajax({ |
---|
| 113 | type: "POST", |
---|
| 114 | url: "<!--{$smarty.const.ROOT_URLPATH}-->mypage/delivery.php", |
---|
| 115 | data: postData, |
---|
| 116 | cache: false, |
---|
| 117 | dataType: "json", |
---|
| 118 | error: function(XMLHttpRequest, textStatus, errorThrown){ |
---|
| 119 | alert(textStatus); |
---|
| 120 | $.mobile.hidePageLoadingMsg(); |
---|
| 121 | }, |
---|
| 122 | success: function(result){ |
---|
| 123 | var count = ((pageNo - 1) * i + 1); //お届け先住所の番号 |
---|
| 124 | for (var j = 0; j < i; j++) { |
---|
| 125 | if (result[j] != null) { |
---|
| 126 | var delivery = result[j]; |
---|
| 127 | var deliveryHtml = ""; |
---|
| 128 | var maxCnt = $(".delivBox").length - 1; |
---|
| 129 | var deliveryEl = $(".delivBox").get(maxCnt); |
---|
| 130 | deliveryEl = $(deliveryEl).clone(true).insertAfter(deliveryEl); |
---|
| 131 | maxCnt++; |
---|
[21073] | 132 | |
---|
[21533] | 133 | //住所タイトルをセット |
---|
| 134 | $($(".delivBox span.zip_title").get(maxCnt)).text('お届け先住所' + count); |
---|
| 135 | //郵便番号1をセット |
---|
[22205] | 136 | // $($(".delivBox span.zip01").get(maxCnt)).text(delivery.zip01); |
---|
[21533] | 137 | //郵便番号2をセット |
---|
[22205] | 138 | // $($(".delivBox span.zip02").get(maxCnt)).text(delivery.zip02); |
---|
| 139 | //郵便番号をセット |
---|
| 140 | $($(".delivBox span.zipcode").get(maxCnt)).text(delivery.zipcode); |
---|
[21533] | 141 | //住所をセット |
---|
| 142 | $($(".delivBox span.address").get(maxCnt)).text(delivery.prefname + delivery.addr01 + delivery.addr02); |
---|
| 143 | //姓をセット |
---|
| 144 | $($(".delivBox span.name01").get(maxCnt)).text(delivery.name01); |
---|
| 145 | //名前をセット |
---|
| 146 | $($(".delivBox span.name02").get(maxCnt)).text(delivery.name02); |
---|
| 147 | //編集ボタンをセット |
---|
| 148 | $($(".delivBox a.deliv_edit").get(maxCnt)).attr("onClick", "win02('./delivery_addr.php?other_deliv_id=" + delivery.other_deliv_id + "','deliv_disp','600','640'); return false;"); |
---|
| 149 | //削除ボタンをセット |
---|
| 150 | $($(".delivBox a.deliv_delete").get(maxCnt)).attr("onClick", "fnModeSubmit('delete','other_deliv_id','" + delivery.other_deliv_id + "'); return false;"); |
---|
| 151 | count++; |
---|
| 152 | } |
---|
| 153 | } |
---|
| 154 | pageNo++; |
---|
| 155 | |
---|
| 156 | //すべてのお届け先を表示したか判定 |
---|
| 157 | if (parseInt(result.delivCount) <= $(".delivBox").length) { |
---|
| 158 | $("#btn_more_delivery").hide(); |
---|
| 159 | } |
---|
| 160 | $.mobile.hidePageLoadingMsg(); |
---|
| 161 | } |
---|
| 162 | }); |
---|
| 163 | } |
---|
[21169] | 164 | </script> |
---|