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 | <script type="text/javascript"> |
---|
25 | <!-- |
---|
26 | function fnMoveOption(sel , moveflg) { |
---|
27 | var fm = document.form1; |
---|
28 | var arrChoice = new Array(); // 選択されている項目 |
---|
29 | var arrNotChoice = new Array(); // 選択されていない項目 |
---|
30 | var arrNew = new Array(); // 移動後のリスト |
---|
31 | var arrTmp = new Array(); |
---|
32 | var arrRev = new Array(); |
---|
33 | |
---|
34 | if(fm[sel].selectedIndex == -1) alert("何も選択されていません。"); |
---|
35 | else { |
---|
36 | // 下に移動する場合にはまずOPTIONを逆にする |
---|
37 | if (moveflg == 'bottom') { |
---|
38 | for(i=fm[sel].length-1, j=0; i >= 0; i--, j++){ |
---|
39 | fm[sel].options[i].label=i; // 順番をlabelに退避 |
---|
40 | arrRev[j] = fm[sel].options[i]; |
---|
41 | } |
---|
42 | for(i=0; i < arrRev.length; i++){ |
---|
43 | fm[sel].options[i] = new Option(arrRev[i].text, arrRev[i].value); |
---|
44 | fm[sel].options[i].selected = arrRev[i].selected; |
---|
45 | } |
---|
46 | } |
---|
47 | |
---|
48 | // 一番下に空白を追加 |
---|
49 | fm[sel].options[fm[sel].length] = new Option('', ''); |
---|
50 | |
---|
51 | for(i = 0, choiceCnt = 0, notCnt = 0; i < fm[sel].length; i++) { |
---|
52 | if(!fm[sel].options[i].selected) { |
---|
53 | // 選択されていない項目配列を生成 |
---|
54 | fm[sel].options[i].label=i; // 順番をlabelに退避 |
---|
55 | arrNotChoice[choiceCnt] = fm[sel].options[i]; |
---|
56 | choiceCnt++; |
---|
57 | }else{ |
---|
58 | // 選択されている項目配列を生成 |
---|
59 | fm[sel].options[i].label=i; // 順番をlabelに退避 |
---|
60 | arrChoice[notCnt] = fm[sel].options[i]; |
---|
61 | notCnt++; |
---|
62 | } |
---|
63 | } |
---|
64 | |
---|
65 | // 選択項目を上に移動 |
---|
66 | for(i = arrChoice.length; i < 1; i--){ |
---|
67 | arrChoice[i].label = arrChoice[i-1].label+1; |
---|
68 | } |
---|
69 | |
---|
70 | // 非選択項目を下に移動 |
---|
71 | for(i = 0; i < arrNotChoice.length - 1; i++){ |
---|
72 | arrNotChoice[i].label = arrNotChoice[i+1].label-1; |
---|
73 | } |
---|
74 | |
---|
75 | // 選択項目と非選択項目をマージする |
---|
76 | for(choiceCnt = 0, notCnt = 0, cnt = 0; cnt < fm[sel].length; cnt++){ |
---|
77 | if (choiceCnt >= arrChoice.length) { |
---|
78 | arrNew[cnt] = arrNotChoice[notCnt]; |
---|
79 | notCnt++; |
---|
80 | }else if (notCnt >= arrNotChoice.length) { |
---|
81 | arrNew[cnt] = arrChoice[choiceCnt]; |
---|
82 | choiceCnt++; |
---|
83 | }else{ |
---|
84 | if(arrChoice[choiceCnt].label-1 <= arrNotChoice[notCnt].label){ |
---|
85 | arrNew[cnt] = arrChoice[choiceCnt]; |
---|
86 | choiceCnt++; |
---|
87 | }else{ |
---|
88 | arrNew[cnt] = arrNotChoice[notCnt]; |
---|
89 | notCnt++; |
---|
90 | } |
---|
91 | } |
---|
92 | } |
---|
93 | |
---|
94 | // 下に移動する場合には逆にしたものを元に戻す |
---|
95 | if (moveflg == 'bottom') { |
---|
96 | for(i=arrNew.length-2, j=0; i >= 0; i--, j++){ |
---|
97 | arrTmp[j] = arrNew[i]; |
---|
98 | } |
---|
99 | arrTmp[j]=""; |
---|
100 | arrNew = arrTmp; |
---|
101 | } |
---|
102 | |
---|
103 | // optionを再作成 |
---|
104 | fm[sel].length = arrNew.length - 1; |
---|
105 | for(i=0; i < arrNew.length - 1; i++){ |
---|
106 | fm[sel].options[i] = new Option(arrNew[i].text, arrNew[i].value); |
---|
107 | fm[sel].options[i].selected = arrNew[i].selected; |
---|
108 | } |
---|
109 | } |
---|
110 | } |
---|
111 | |
---|
112 | function fnReplaceOption(restSel, addSel) { |
---|
113 | var fm = document.form1; |
---|
114 | var arrRest = new Array(); // 残りのリスト |
---|
115 | var arrAdd = new Array(); // 追加のリスト |
---|
116 | |
---|
117 | if(fm[restSel].selectedIndex == -1) alert("何も選択されていません。"); |
---|
118 | else { |
---|
119 | for(i = 0, restCnt = 0, addCnt = 0; i < fm[restSel].length; i++) { |
---|
120 | if(!fm[restSel].options[i].selected) { |
---|
121 | // 残要素の配列を生成 |
---|
122 | arrRest[restCnt] = fm[restSel].options[i]; |
---|
123 | restCnt++; |
---|
124 | }else{ |
---|
125 | // 追加要素の配列を生成 |
---|
126 | arrAdd[addCnt] = fm[restSel].options[i]; |
---|
127 | addCnt++; |
---|
128 | } |
---|
129 | } |
---|
130 | |
---|
131 | // 残リスト生成 |
---|
132 | fm[restSel].length = arrRest.length; |
---|
133 | for(i=0; i < arrRest.length; i++) |
---|
134 | { |
---|
135 | fm[restSel].options[i] = new Option(arrRest[i].text, arrRest[i].value); |
---|
136 | } |
---|
137 | |
---|
138 | // 追加先に項目を追加 |
---|
139 | //fm[addSel].options[fm[addSel].length] = new Option(fm[sel2].value, fm[sel2].value); |
---|
140 | |
---|
141 | for(i=0; i < arrAdd.length; i++) |
---|
142 | { |
---|
143 | fm[addSel].options[fm[addSel].length] = new Option(arrAdd[i].text, arrAdd[i].value); |
---|
144 | fm[addSel].options[fm[addSel].length-1].selected = true; |
---|
145 | } |
---|
146 | } |
---|
147 | } |
---|
148 | |
---|
149 | // submitした場合に、出力項目一覧を選択状態にする |
---|
150 | function lfnCheckList(sel) { |
---|
151 | var fm = document.form1; |
---|
152 | for(i = 0; i < fm[sel].length; i++) { |
---|
153 | fm[sel].options[i].selected = true; |
---|
154 | } |
---|
155 | } |
---|
156 | |
---|
157 | // リストボックスのサイズ変更 |
---|
158 | function ChangeSize(button, TextArea, Max, Min, row_tmp){ |
---|
159 | if(TextArea.rows <= Min){ |
---|
160 | TextArea.rows=Max; button.value="小さくする"; row_tmp.value=Max; |
---|
161 | }else{ |
---|
162 | TextArea.rows =Min; button.value="大きくする"; row_tmp.value=Min; |
---|
163 | } |
---|
164 | } |
---|
165 | |
---|
166 | //--> |
---|
167 | </script> |
---|
168 | |
---|
169 | |
---|
170 | <!--★★メインコンテンツ★★--> |
---|
171 | <table width="878" border="0" cellspacing="0" cellpadding="0" summary=" "> |
---|
172 | <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->" onsubmit="lfnCheckList('output_list[]')"> |
---|
173 | <input type="hidden" name="mode" value="confirm"> |
---|
174 | <input type="hidden" name="tpl_subno_csv" value="<!--{$tpl_subno_csv}-->"> |
---|
175 | <tr valign="top"> |
---|
176 | <td background="<!--{$TPL_DIR}-->img/contents/navi_bg.gif" height="402"> |
---|
177 | <!--▼SUB NAVI--> |
---|
178 | <!--{include file=$tpl_subnavi}--> |
---|
179 | <!--▲SUB NAVI--> |
---|
180 | </td> |
---|
181 | <td class="mainbg"> |
---|
182 | <!--▼登録テーブルここから--> |
---|
183 | <table width="737" border="0" cellspacing="0" cellpadding="0" summary=" "> |
---|
184 | <!--メインエリア--> |
---|
185 | <tr> |
---|
186 | <td align="center"> |
---|
187 | <table width="706" border="0" cellspacing="0" cellpadding="0" summary=" "> |
---|
188 | <tr><td height="14"></td></tr> |
---|
189 | <tr> |
---|
190 | <td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/main_top.jpg" width="706" height="14" alt=""></td> |
---|
191 | </tr> |
---|
192 | <tr> |
---|
193 | <td background="<!--{$TPL_DIR}-->img/contents/main_left.jpg"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="14" height="1" alt=""></td> |
---|
194 | <td bgcolor="#cccccc"> |
---|
195 | <table width="678" border="0" cellspacing="0" cellpadding="0" summary=" "> |
---|
196 | <tr> |
---|
197 | <td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/contents_title_top.gif" width="678" height="7" alt=""></td> |
---|
198 | </tr> |
---|
199 | <tr> |
---|
200 | <td background="<!--{$TPL_DIR}-->img/contents/contents_title_left_bg.gif"><img src="<!--{$TPL_DIR}-->img/contents/contents_title_left.gif" width="22" height="12" alt=""></td> |
---|
201 | <td bgcolor="#636469" width="638" class="fs14n"><span class="white"><!--コンテンツタイトル--><!--{$SubnaviName}--></span></td> |
---|
202 | <td background="<!--{$TPL_DIR}-->img/contents/contents_title_right_bg.gif"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="18" height="1" alt=""></td> |
---|
203 | </tr> |
---|
204 | <tr> |
---|
205 | <td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/contents_title_bottom.gif" width="678" height="7" alt=""></td> |
---|
206 | </tr> |
---|
207 | <tr> |
---|
208 | <td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/main_bar.jpg" width="678" height="10" alt=""></td> |
---|
209 | </tr> |
---|
210 | </table> |
---|
211 | |
---|
212 | <table width="678" border="0" cellspacing="1" cellpadding="0" summary=" "><tr><td> |
---|
213 | <table width="676" border="0" cellspacing="" cellpadding="3" summary=" "> |
---|
214 | <tr class="fs12n"> |
---|
215 | <td bgcolor="#ffffff" align="right"> |
---|
216 | <input type="button" value=" ▲ " onClick="fnMoveOption('output_list[]', 'top');"><br/><br/><br/> |
---|
217 | <input type="button" value=" ▼ " onClick="fnMoveOption('output_list[]', 'bottom');"> |
---|
218 | </td> |
---|
219 | <td bgcolor="#ffffff" align="left"> |
---|
220 | <table width="270" border="1" cellspacing="0" cellpadding="3" summary=" "> |
---|
221 | <tr class="fs12n"> |
---|
222 | <td bgcolor="#f2f1ec" align="center"><strong>出力項目一覧</strong></td> |
---|
223 | </tr> |
---|
224 | <tr class="fs12n"> |
---|
225 | <td bgcolor="#ffffff" align="center"> |
---|
226 | <span class="red12"><!--{$arrErr.output_list}--></span> |
---|
227 | <select multiple name="output_list[]" size="30" style="<!--{$arrErr.output_list|sfGetErrorColor}-->; width:250px; height:425px;"> |
---|
228 | <!--{html_options options=$arrOutput}--> |
---|
229 | </select> |
---|
230 | </td> |
---|
231 | </tr> |
---|
232 | </table> |
---|
233 | </td> |
---|
234 | <td bgcolor="#ffffff" align="cneter"> |
---|
235 | <input type="button" value="<< 追加" onClick="fnReplaceOption('choice_list[]', 'output_list[]');"><br/><br/><br/> |
---|
236 | <input type="button" value="削除 >>" onClick="fnReplaceOption('output_list[]', 'choice_list[]');"> |
---|
237 | </td> |
---|
238 | <td bgcolor="#ffffff" align="right"> |
---|
239 | <table width="270" border="1" cellspacing="0" cellpadding="3" summary=" "> |
---|
240 | <tr class="fs12n"> |
---|
241 | <td bgcolor="#f2f1ec" align="center"><strong>出力可能項目一覧</strong></td> |
---|
242 | </tr> |
---|
243 | <tr class="fs12n"> |
---|
244 | <td bgcolor="#ffffff" align="center"> |
---|
245 | <select multiple name="choice_list[]" size="30" style="width:250px; height:425px;"> |
---|
246 | <!--{html_options options=$arrChoice}--> |
---|
247 | </select> |
---|
248 | </td> |
---|
249 | </tr> |
---|
250 | </table> |
---|
251 | </td> |
---|
252 | </tr> |
---|
253 | </table> |
---|
254 | </td></tr></table> |
---|
255 | |
---|
256 | <table width="678" border="0" cellspacing="0" cellpadding="0" summary=" "> |
---|
257 | <tr> |
---|
258 | <td bgcolor="#cccccc"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="1" height="5" alt=""></td> |
---|
259 | <td><img src="<!--{$TPL_DIR}-->img/contents/tbl_top.gif" width="676" height="7" alt=""></td> |
---|
260 | <td bgcolor="#cccccc"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="1" height="5" alt=""></td> |
---|
261 | </tr> |
---|
262 | <tr> |
---|
263 | <td bgcolor="#cccccc"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="1" height="10" alt=""></td> |
---|
264 | <td bgcolor="#e9e7de" align="center"> |
---|
265 | <table border="0" cellspacing="0" cellpadding="0" summary=" "> |
---|
266 | <tr> |
---|
267 | <td><input type="image" onMouseover="chgImgImageSubmit('<!--{$TPL_DIR}-->img/contents/btn_regist_on.jpg',this)" onMouseout="chgImgImageSubmit('<!--{$TPL_DIR}-->img/contents/btn_regist.jpg',this)" src="<!--{$TPL_DIR}-->img/contents/btn_regist.jpg" width="123" height="24" alt="この内容で登録する" border="0" name="subm"></td> |
---|
268 | </tr> |
---|
269 | </table> |
---|
270 | </td> |
---|
271 | <td bgcolor="#cccccc"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="1" height="10" alt=""></td> |
---|
272 | </tr> |
---|
273 | <tr> |
---|
274 | <td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/tbl_bottom.gif" width="678" height="8" alt=""></td> |
---|
275 | </tr> |
---|
276 | </table> |
---|
277 | </td> |
---|
278 | <td background="<!--{$TPL_DIR}-->img/contents/main_right.jpg"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="14" height="1" alt=""></td> |
---|
279 | </tr> |
---|
280 | <tr> |
---|
281 | <td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/main_bottom.jpg" width="706" height="14" alt=""></td> |
---|
282 | </tr> |
---|
283 | <tr><td height="30"></td></tr> |
---|
284 | </table> |
---|
285 | </td> |
---|
286 | </tr> |
---|
287 | <!--メインエリア--> |
---|
288 | </table> |
---|
289 | <!--▲登録テーブルここまで--> |
---|
290 | </td> |
---|
291 | </tr> |
---|
292 | </form> |
---|
293 | </table> |
---|
294 | <!--★★メインコンテンツ★★--> |
---|
295 | |
---|
296 | |
---|
297 | </script> |
---|