Changeset 20636
- Timestamp:
- 2011/03/14 19:12:07 (12 years ago)
- bzr:base-revision:
- svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:20635
- bzr:committer:
- Kentaro Ohkouchi <ohkouchi@loop-az.jp>
- bzr:file-ids:
data/Smarty/templates/admin/products/product_class.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fproducts%2Fproduct_class.tpl
data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php 15559@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Fproducts%2FLC_Page_Admin_Products_ProductClass.php
html/user_data/packages/admin/js/admin.js 18900@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fversion-2_5-dev%2Fhtml%2Fuser_data%2Fpackages%2Fadmin%2Fjs%2Fadmin.js- bzr:mapping-version:
- v4
- bzr:merge:
ohkouchi@loop-az.jp-20110314101008-jhmex2rpdp00oz9c- bzr:repository-uuid:
- 1e3b908f-19a9-db11-a64c-001125224ba8
- bzr:revision-id:
- ohkouchi@loop-az.jp-20110314101204-z01ckz5omm152zrw
- bzr:revno:
- 3357
- bzr:revprop:branch-nick:
- branches/version-2_5-dev
- bzr:root:
- branches/version-2_5-dev
- bzr:text-revisions:
data/Smarty/templates/admin/products/product_class.tpl ohkouchi@loop-az.jp-20110314101008-jhmex2rpdp00oz9c
data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php ohkouchi@loop-az.jp-20110314101008-jhmex2rpdp00oz9c
html/user_data/packages/admin/js/admin.js ohkouchi@loop-az.jp-20110314101008-jhmex2rpdp00oz9c- bzr:timestamp:
- 2011-03-14 19:12:04.928999901 +0900
- bzr:user-agent:
- bzr2.2.1+bzr-svn1.0.4
- svn:original-date:
- 2011-03-14T10:12:04.929000Z
- Location:
- branches/version-2_5-dev
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/Smarty/templates/admin/products/product_class.tpl
r20617 r20636 24 24 <script type="text/javascript">//<![CDATA[ 25 25 $(function() { 26 // 無制限チェックボックスの初期化 26 27 $('input[id^=stock_unlimited_]').each(function() { 27 28 var index = $(this).attr('id').replace(/^stock_unlimited_/ig, ''); … … 35 36 }); 36 37 38 // 無制限チェックボックス 37 39 $('input[id^=stock_unlimited_]').change(function() { 38 40 var index = $(this).attr('id').replace(/^stock_unlimited_/ig, ''); … … 48 50 .css('background-color', ''); 49 51 } 52 }); 53 54 // 1行目をコピーボタン 55 $('#copy_from_first').click(function() { 56 var check = $('#check_0').attr('checked'); 57 $('input[id^=check_]').attr('checked', check); 58 59 var product_code = $('#product_code_0').val(); 60 $('input[id^=product_code_]').val(product_code); 61 62 var stock = $('#stock_0').val(); 63 $('input[id^=stock_]').val(stock); 64 65 var stock_unlimited = $('#stock_unlimited_0').attr('checked'); 66 $('input[id^=stock_unlimited_]').each(function() { 67 var checked = stock_unlimited; 68 var index = $(this).attr('id').replace(/^stock_unlimited_/ig, ''); 69 $(this).attr('checked', checked); 70 if (checked) { 71 $('#stock_' + index) 72 .attr('readonly', true) 73 .css('background-color', '<!--{$smarty.const.DISABLED_RGB}-->'); 74 } else { 75 $('#stock_' + index) 76 .attr('readonly', false) 77 .css('background-color', ''); 78 } 79 }); 80 81 var price01 = $('#price01_0').val(); 82 $('input[id^=price01_]').val(price01); 83 84 var price02 = $('#price02_0').val(); 85 $('input[id^=price02_]').val(price02); 86 87 var product_type_id_value = ''; 88 $('input[id^=product_type_id_0_]').each(function() { 89 if ($(this).attr('checked')) { 90 product_type_id_value = $(this).val(); 91 } 92 }); 93 $('input[id^=product_type_id_]').each(function() { 94 if ($(this).val() == product_type_id_value) { 95 $(this).attr('checked', true); 96 } 97 }); 98 99 var down_filename = $('#down_filename_0').val(); 100 $('input[id^=down_filename_]').val(down_filename); 50 101 }); 51 102 }); … … 68 119 <input type="hidden" name="upload_index" value=""> 69 120 <input type="hidden" name="total" value="<!--{$arrForm.total.value|h}-->" /> 70 <!--{* foreach key=name item=item from=$arrHidden *}--> 71 <input type="hidden" name="<!--{$name}-->" value="<!--{$item|h}-->" /> 72 <!--{* /foreach *}--> 121 73 122 <div id="products" class="contents-main"> 74 123 … … 125 174 126 175 <div class="list-info clearfix"> 127 <div class="btn"><a class="btn-normal" href="javascript:;" onclick="fnCopyValue('<!--{$cnt}-->', '<!--{$smarty.const.DISABLED_RGB}-->'); return false;"><span>一行目のデータをコピーする</span></a></div>176 <div class="btn"><a class="btn-normal" href="javascript:;" id="copy_from_first"><span>一行目のデータをコピーする</span></a></div> 128 177 <p><span class="bold">アップロード可能な拡張子:</span><!--{$smarty.const.DOWNLOAD_EXTENSION}-->(パラメータ DOWNLOAD_EXTENSION)</p> 129 178 </div> … … 172 221 <span class="attention"><!--{$arrErr[$key][$index]}--></span> 173 222 <!--{/if}--> 174 <input type="checkbox" name="<!--{$key}-->[<!--{$index}-->]" value="1" <!--{if $arrForm[$key].value[$index] == 1}-->checked="checked"<!--{/if}--> />223 <input type="checkbox" name="<!--{$key}-->[<!--{$index}-->]" value="1" <!--{if $arrForm[$key].value[$index] == 1}-->checked="checked"<!--{/if}--> id="<!--{$key}-->_<!--{$index}-->" /> 175 224 </td> 176 225 <td class="center"> … … 195 244 <span class="attention"><!--{$arrErr[$key][$index]}--></span> 196 245 <!--{/if}--> 197 <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" <!--{if $arrErr[$key][$index] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />246 <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" <!--{if $arrErr[$key][$index] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> id="<!--{$key}-->_<!--{$index}-->" /> 198 247 </td> 199 248 <td class="center"> … … 207 256 <span class="attention"><!--{$arrErr[$key][$index]}--></span> 208 257 <!--{/if}--> 209 <input type="checkbox" name="<!--{$key}-->[<!--{$index}-->]" value="1" <!--{if $arrForm[$key].value[$index] == "1"}-->checked="checked"<!--{/if}--> onClick="fnCheckStockNoLimit('<!--{$index}-->','<!--{$smarty.const.DISABLED_RGB}-->');"id="<!--{$key}-->_<!--{$index}-->" /><label for="<!--{$key}-->_<!--{$index}-->">無制限</label>258 <input type="checkbox" name="<!--{$key}-->[<!--{$index}-->]" value="1" <!--{if $arrForm[$key].value[$index] == "1"}-->checked="checked"<!--{/if}--> id="<!--{$key}-->_<!--{$index}-->" /><label for="<!--{$key}-->_<!--{$index}-->">無制限</label> 210 259 </td> 211 260 <td class="center"> … … 214 263 <span class="attention"><!--{$arrErr[$key][$index]}--></span> 215 264 <!--{/if}--> 216 <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" <!--{if $arrErr[$key][$index] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />265 <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" <!--{if $arrErr[$key][$index] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> id="<!--{$key}-->_<!--{$index}-->" /> 217 266 </td> 218 267 <td class="center"> … … 221 270 <span class="attention"><!--{$arrErr[$key][$index]}--></span> 222 271 <!--{/if}--> 223 <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" <!--{if $arrErr[$key][$index] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />272 <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" <!--{if $arrErr[$key][$index] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> id="<!--{$key}-->_<!--{$index}-->" /> 224 273 </td> 225 274 <td class="class-product-type"> … … 228 277 <span class="attention"><!--{$arrErr[$key][$index]}--></span> 229 278 <!--{/if}--> 230 <!--{html_radios name="`$key`[`$index`]" options=$arrProductType selected=$arrForm[$key].value[$index]|h separator='<br />'}--> 279 <!--{foreach from=$arrProductType key=productTypeKey item=productType name=productType}--> 280 <input type="radio" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$productTypeKey}-->" <!--{if $arrForm[$key].value[$index] == $productTypeKey}-->checked="checked"<!--{/if}--> <!--{if $arrErr[$key][$index] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> id="<!--{$key}-->_<!--{$index}-->_<!--{$smarty.foreach.productType.index}-->"><label for="<!--{$key}-->_<!--{$index}-->_<!--{$smarty.foreach.productType.index}-->"<!--{if $arrErr[$key][$index] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> ><!--{$productType}--></label><!--{if !$smarty.foreach.productType.last}--><br /><!--{/if}--> 281 <!--{/foreach}--> 231 282 </td> 232 283 <td class="center"> … … 235 286 <span class="attention"><!--{$arrErr[$key][$index]}--></span> 236 287 <!--{/if}--> 237 <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{if $arrErr[$key][$index] != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}--><!--{/if}-->" size="10" />288 <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{if $arrErr[$key][$index] != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}--><!--{/if}-->" size="10" id="<!--{$key}-->_<!--{$index}-->" /> 238 289 </td> 239 290 <td> -
branches/version-2_5-dev/data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php
r20617 r20636 100 100 $objFormParam->setParam($_POST); 101 101 $objFormParam->convParam(); 102 103 /* TODO104 // Hiddenからのデータを引き継ぐ105 $this->objDownFile->setHiddenFileList($_POST);106 // HIDDEN用に配列を渡す。107 $this->arrHidden = array_merge((array)$this->arrHidden, (array)$this->objDownFile->getHiddenFileList());108 // Form用に配列を渡す。109 $this->arrForm = array_merge((array)$this->arrForm, (array)$this->objDownFile->getFormKikakuDownFile());110 */111 102 } 112 103 break; … … 121 112 case 'pre_edit': 122 113 $this->doPreEdit($objFormParam); 123 124 /* TODO125 // HIDDEN用に配列を渡す。126 $this->arrHidden = array_merge((array)$this->arrHidden, (array)$this->objDownFile->getHiddenFileList());127 */128 114 break; 129 115 … … 467 453 $objFormParam->setValue($key, $arrValues); 468 454 } 455 456 // 商品種別を 1 に初期化 457 $objFormParam->setValue('product_type_id', array_pad(array(), $total, 1)); 469 458 } 470 459 -
branches/version-2_5-dev/html/user_data/packages/admin/js/admin.js
r20595 r20636 335 335 } 336 336 337 //一行目の価格を以下の行にコピーする338 function fnCopyValue(length, icolor) {339 fm = document.form1;340 for(i = 1; i <= length; i++) {341 fm['product_code:' + i].value = fm['product_code:1'].value;342 fm['stock:' + i].value = fm['stock:1'].value;343 fm['price01:' + i].value = fm['price01:1'].value;344 fm['price02:' + i].value = fm['price02:1'].value;345 fm['stock_unlimited:' + i].checked = fm['stock_unlimited:1'].checked;346 fm['stock:' + i].disabled = fm['stock:1'].disabled;347 fm['stock:' + i].style.backgroundColor = fm['stock:1'].style.backgroundColor;348 }349 }350 351 337 // タグの表示非表示切り替え 352 338 function fnDispChange(disp_id, inner_id, disp_flg){
Note: See TracChangeset
for help on using the changeset viewer.