source: branches/version-2_5-dev/data/Smarty/templates/admin/products/product_rank.tpl @ 20407

Revision 20407, 6.9 KB checked in by kotani, 13 years ago (diff)

#812 (トランザクションIDの自動生成/自動検証), #1053 (transactionidが埋め込まれる前にクリックされるとエラー)

  • transactionid用hiddenタグをJavaScriptで生成しないように変更
  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-smarty-template; charset=UTF-8
Line 
1<!--{*
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved.
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*}-->
24<form name="form1" id="form1" method="post" action="?" enctype="multipart/form-data">
25<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
26<input type="hidden" name="mode" value="edit" />
27<input type="hidden" name="parent_category_id" value="<!--{$arrForm.parent_category_id}-->" />
28<input type="hidden" name="category_id" value="<!--{$arrForm.category_id}-->" />
29<input type="hidden" name="product_id" value="" />
30<input type="hidden" name="pageno" value="<!--{$tpl_pageno}-->" />
31<div id="products" class="contents-main">
32
33  <!--{* ▼画面左 *}-->
34  <div id="products-rank-left">
35    <a href="?"><img src="<!--{$TPL_URLPATH}-->img/contents/folder_close.gif" alt="フォルダ">&nbsp;ホーム</a><br />
36    <!--{section name=cnt loop=$arrTree}-->
37      <!--{assign var=level value="`$arrTree[cnt].level`}-->
38     
39      <!--{* 上の階層表示の時にdivを閉じる *}-->
40      <!--{assign var=close_cnt value="`$before_level-$level+1`}-->
41      <!--{if $close_cnt > 0}-->
42        <!--{section name=n loop=$close_cnt}--></div><!--{/section}-->
43      <!--{/if}-->
44               
45      <!--{* スペース繰り返し *}-->
46      <!--{section name=n loop=$level}-->  <!--{/section}-->
47     
48      <!--{* カテゴリ名表示 *}-->
49      <!--{assign var=disp_name value="`$arrTree[cnt].category_id`.`$arrTree[cnt].category_name`"}-->
50      <a href="?" onclick="fnModeSubmit('tree', 'parent_category_id', <!--{$arrTree[cnt].category_id}-->); return false">
51      <!--{if $arrForm.parent_category_id == $arrTree[cnt].category_id}-->
52        <img src="<!--{$TPL_URLPATH}-->img/contents/folder_open.gif" alt="フォルダ">
53      <!--{else}-->
54        <img src="<!--{$TPL_URLPATH}-->img/contents/folder_close.gif" alt="フォルダ">
55      <!--{/if}-->
56      <!--{$disp_name|sfCutString:20|h}-->(<!--{$arrTree[cnt].product_count|default:0}-->)</a>
57    <br />         
58      <!--{if $arrTree[cnt].display == true}-->
59        <div id="f<!--{$arrTree[cnt].category_id}-->">
60      <!--{else}-->
61        <div id="f<!--{$arrTree[cnt].category_id}-->" style="display:none">
62      <!--{/if}-->
63      <!--{if $smarty.section.cnt.last}-->
64        <!--{section name=n loop=$level}--></div><!--{/section}-->
65      <!--{/if}-->
66      <!--{assign var=before_level value="`$arrTree[cnt].level`}-->
67    <!--{/section}-->
68  </div>
69  <!--{* ▲画面左 *}-->
70
71  <!--▼画面右-->
72  <div id="products-rank-right">
73    <h2><!--{$breadcrumbs}--></h2>
74  <!--{if count($arrProductsList) > 0}-->
75
76
77<script type="text/javascript">
78// カテゴリーテーブルのイニシャライズ
79$(document).ready(function() {
80    $("#categoryTable").tableDnD({
81        onDragClass: "movingHandle",
82        onDrop: function(table, row) {
83            var rows = table.tBodies[0].rows;
84            var keys = row.id;
85
86            for (var i = 0; i < rows.length; i++) {
87                if (row.id == rows[i].id) {
88                    keys += "-" + i;
89                    break;
90                }
91            }
92
93            fnModeSubmit('moveByDnD','keySet', keys);
94        },
95        dragHandle: "dragHandle"
96    });
97
98    $("#categoryTable tr").hover(function() {
99        $(this.cells[0]).addClass('activeHandle');
100    }, function() {
101        $(this.cells[0]).removeClass('activeHandle');
102    });
103});
104</script>
105
106    <p><span class="attention"><!--{$tpl_linemax}-->件</span>が該当しました。</p>
107    <!--{* ▼ページナビ *}-->
108    <!--{$tpl_strnavi}-->
109    <!--{* ▲ページナビ *}-->
110   
111    <!--{if $smarty.const.ADMIN_MODE == '1'}-->
112        <p class="right"><a class="btn-normal" href="javascript:;" onclick="fnModeSubmit('renumber', '', ''); return false;">内部順位再割り当て</a></p>
113    <!--{/if}-->
114   
115    <table class="list" id="categoryTable">
116        <colgroup width="20%">
117        <colgroup width="47%">
118        <colgroup width="10%">
119        <colgroup width="7%">
120        <colgroup width="15%">
121      <tr class="nodrop nodrag">
122        <th>商品コード</th>
123        <th>商品名</th>
124        <th>商品画像</th>
125        <th>順位</th>
126        <th>移動</th>
127      </tr>
128
129      <!--{assign var=rank value=$tpl_start_row}-->
130      <!--{section name=cnt loop=$arrProductsList}-->
131        <tr>
132          <td><!--{from_to from=$arrProductsList[cnt].product_code_min to=$arrProductsList[cnt].product_code_max separator="~<br />"}--></td>         
133          <td>
134            <!--{$arrProductsList[cnt].name|h}-->
135          </td>
136          <td align="center">
137            <!--{* 商品画像 *}-->
138            <img src="<!--{$smarty.const.ROOT_URLPATH}-->resize_image.php?image=<!--{$arrProductsList[cnt].main_list_image|sfNoImageMainList|h}-->&amp;width=65&amp;height=65" alt="<!--{$arrProducts[cnt].name|h}-->">
139          </td>
140          <!--{assign var=rank value=`$rank+1`}-->
141          <td align="center">
142            <!--{$rank}-->
143            <!--{if $arrProductsList[cnt].status == "2"}--><br />(非公開)<!--{/if}-->
144          </td>
145          <td align="center">
146          <!--{* 移動 *}-->
147          <!--{if !(count($arrProductsList) == 1 && $rank == 1)}-->
148          <input type="text" name="pos-<!--{$arrProductsList[cnt].product_id}-->" size="3" class="box3" />番目へ<a href="?" onclick="fnModeSubmit('move','product_id', '<!--{$arrProductsList[cnt].product_id}-->'); return false;">移動</a><br />
149          <!--{/if}-->
150          <!--{if !($smarty.section.cnt.first && $tpl_disppage eq 1)}-->
151          <a href="?" onclick="fnModeSubmit('up','product_id', '<!--{$arrProductsList[cnt].product_id}-->'); return false;">上へ</a>
152          <!--{/if}-->
153          <!--{if !($smarty.section.cnt.last && $tpl_disppage eq $tpl_pagemax)}-->
154          <a href="?" onclick="fnModeSubmit('down','product_id', '<!--{$arrProductsList[cnt].product_id}-->'); return false;">下へ</a>
155          <!--{/if}-->
156          </td>
157        </tr>
158      <!--{/section}-->
159    </table>
160   
161    <!--{* ▼ページナビ *}-->
162    <!--{$tpl_strnavi}-->
163    <!--{* ▲ページナビ *}-->
164  <!--{else}-->
165    <p>カテゴリを選択してください。</p>
166  <!--{/if}-->
167  </div>
168  <!--▲画面右-->
169
170</div>
171</form>
Note: See TracBrowser for help on using the repository browser.