Ignore:
Timestamp:
2010/03/11 10:35:11 (14 years ago)
Author:
kajiwara
Message:

正式版にナイトリービルド版をマージしてみるテスト

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tmp/version-2_5-test/data/Smarty/templates/default/admin/contents/csv.tpl

    r16582 r18609  
    33 * This file is part of EC-CUBE 
    44 * 
    5  * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
     5 * Copyright(c) 2000-2008 LOCKON CO.,LTD. All Rights Reserved. 
    66 * 
    77 * http://www.lockon.co.jp/ 
     
    2525<!-- 
    2626function 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     } 
     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  } 
    110110} 
    111111 
    112112function 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     } 
     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  } 
    147147} 
    148148 
    149149// submitした場合に、出力項目一覧を選択状態にする 
    150150function lfnCheckList(sel) { 
    151     var fm = document.form1; 
    152     for(i = 0; i < fm[sel].length; i++) { 
    153         fm[sel].options[i].selected = true; 
    154     } 
     151  var fm = document.form1; 
     152  for(i = 0; i < fm[sel].length; i++) { 
     153    fm[sel].options[i].selected = true; 
     154  } 
    155155} 
    156156 
    157157// リストボックスのサイズ変更 
    158158function 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     } 
     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  } 
    164164} 
    165165 
     
    168168 
    169169 
    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> 
     170 
     171<form name="form1" id="form1" method="post" action="?" onsubmit="lfnCheckList('output_list[]')"> 
     172<input type="hidden" name="mode" value="confirm" /> 
     173<input type="hidden" name="tpl_subno_csv" value="<!--{$tpl_subno_csv}-->" /> 
     174<div id="admin-contents" class="contents-main"> 
     175  <h2><!--{$SubnaviName}--></h2> 
     176  <table id="contents-csv-select"> 
     177    <tr> 
     178      <td> 
     179        <div class="btn"> 
     180          <button type="button" onClick="fnMoveOption('output_list[]', 'top');"><span> ▲ </span></button><br/> 
     181          <button type="button" onClick="fnMoveOption('output_list[]', 'bottom');"><span> ▼ </span></button> 
     182        </div> 
     183      </td> 
     184      <td> 
     185        <h3>出力項目一覧</h3> 
     186        <span class="attention"><!--{$arrErr.output_list}--></span> 
     187        <select multiple name="output_list[]"<!--{if $arrErr.output_list}--> style="<!--{$arrErr.output_list|sfGetErrorColor}-->;"<!--{/if}-->> 
     188          <!--{html_options options=$arrOutput}--> 
     189        </select> 
     190      </td> 
     191      <td> 
     192        <div class="btn"> 
     193          <button type="button" onClick="fnReplaceOption('choice_list[]', 'output_list[]');"><< 追加</button><br/> 
     194          <button type="button" onClick="fnReplaceOption('output_list[]', 'choice_list[]');">削除 &gt;&gt;</button> 
     195        </div> 
     196      </td> 
     197      <td> 
     198        <h3>出力可能項目一覧</h3> 
     199        <select multiple name="choice_list[]"> 
     200          <!--{html_options options=$arrChoice}--> 
     201        </select> 
     202      </td> 
     203    </tr> 
     204  </table> 
     205 
     206  <div class="btn"><button type="submit"><span>この内容で登録する</span></button></div> 
     207 
     208</div> 
    292209</form> 
    293 </table> 
    294 <!--★★メインコンテンツ★★--> 
    295  
    296  
    297 </script> 
Note: See TracChangeset for help on using the changeset viewer.