Changeset 23487
- Timestamp:
- 2014/06/02 11:32:52 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/Smarty/templates/admin/products/product.tpl
r23473 r23487 23 23 *}--> 24 24 <script type="text/javascript"> 25 // 表示非表示切り替え 26 function lfDispSwitch(id){ 27 var obj = document.getElementById(id); 28 if (obj.style.display == 'none') { 29 obj.style.display = ''; 30 } else { 31 obj.style.display = 'none'; 25 // 表示非表示切り替え 26 function lfDispSwitch(id){ 27 var obj = document.getElementById(id); 28 if (obj.style.display == 'none') { 29 obj.style.display = ''; 30 } else { 31 obj.style.display = 'none'; 32 } 32 33 } 33 } 34 35 // セレクトボックスのリストを初期化 36 // ※キャッシュ対策 37 // (移動元セレクトボックス) 38 function fnInitSelect(select) { 39 var selectedOptions = <!--{$tpl_json_category_id}-->;40 $('#' + select + ' option').attr('selected', false);41 for(var i=0; i<selectedOptions.length; i++){42 $('#' + select + ' option[value="' + selectedOptions[i] + '"]')43 .attr('selected', 'selected');34 35 // セレクトボックスのリストを初期化 36 // ※キャッシュ対策 37 // (移動元セレクトボックス) 38 function fnInitSelect(select) { 39 var selectedOptions = <!--{$tpl_json_category_id}-->; 40 $('#' + select + ' option').attr('selected', false); 41 for(var i=0; i<selectedOptions.length; i++){ 42 $('#' + select + ' option[value="' + selectedOptions[i] + '"]') 43 .attr('selected', 'selected'); 44 } 44 45 } 45 } 46 47 // セレクトボックスのリストを移動 48 // (移動元セレクトボックスID, 移動先セレクトボックスID) 49 function fnMoveSelect(select, target) { 50 $('#' + select).children().each(function() { 51 if (this.selected) { 52 $('#' + target).append(this); 53 $(this).attr({selected: false}); 46 47 // セレクトボックスのリストを移動 48 // (移動元セレクトボックスID, 移動先セレクトボックスID) 49 function fnMoveSelect(select, target) { 50 $('#' + select).children().each(function() { 51 if (this.selected) { 52 $('#' + target).append(this); 53 $(this).attr({selected: false}); 54 } 55 }); 56 // IE7再描画不具合対策 57 var ua = navigator.userAgent.toLowerCase(); 58 if (ua.indexOf("msie") != -1 && ua.indexOf('msie 6') == -1) { 59 $('#' + select).hide(); 60 $('#' + select).show(); 61 $('#' + target).hide(); 62 $('#' + target).show(); 54 63 } 55 });56 // IE7再描画不具合対策57 var ua = navigator.userAgent.toLowerCase();58 if (ua.indexOf("msie") != -1 && ua.indexOf('msie 6') == -1) {59 $('#' + select).hide();60 $('#' + select).show();61 $('#' + target).hide();62 $('#' + target).show();63 64 } 64 } 65 66 // target の子要素を選択状態にする 67 function selectAll(target) { 68 $('#' + target).children().attr({selected: true}); 69 } 70 65 66 // target の子要素を選択状態にする 67 function selectAll(target) { 68 $('#' + target).children().attr({selected: true}); 69 } 70 71 // 商品種別によってダウンロード商品のフォームの表示非表示を切り替える 72 function toggleDownloadFileForms(value) { 73 if (value == '2') { 74 $('.type-download').show('fast'); 75 } else { 76 $('.type-download').hide('fast'); 77 } 78 } 79 80 $(function(){ 81 var form_product_type = $('input[name=product_type_id]'); 82 form_product_type.click(function(){ 83 toggleDownloadFileForms(form_product_type.filter(':checked').val()); 84 }); 85 toggleDownloadFileForms(form_product_type.filter(':checked').val()); 86 }) 71 87 </script> 72 88 … … 152 168 </td> 153 169 </tr> 154 <tr >170 <tr class="type-download"> 155 171 <th>ダウンロード商品ファイル名<span class="attention"> *</span></th> 156 172 <td> … … 160 176 </td> 161 177 </tr> 162 <tr >178 <tr class="type-download"> 163 179 <!--{assign var=key value="down_file"}--> 164 180 <th>ダウンロード商品用<br />ファイルアップロード<span class="attention"> *</span></th>
Note: See TracChangeset
for help on using the changeset viewer.