Changeset 19755


Ignore:
Timestamp:
2010/12/21 21:08:59 (11 years ago)
Author:
nanasess
bzr:base-revision:
svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:19754
bzr:committer:
Kentaro Ohkouchi <ohkouchi@loop-az.jp>
bzr:file-ids:

data/Smarty/templates/admin/order/index.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Forder%2Findex.tpl
data/Smarty/templates/admin/order/status.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Forder%2Fstatus.tpl
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/SC_Query.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2FSC_Query.php
data/class/pages/admin/products/LC_Page_Admin_Products_Class.php 15481@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Fproducts%2FLC_Page_Admin_Products_Class.php
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:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20101221120852-9uce1ti6it2ltrpk
bzr:revno:
2484
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:timestamp:
2010-12-21 21:08:52.874000072 +0900
bzr:user-agent:
bzr2.2.1+bzr-svn1.0.4
svn:original-date:
2010-12-21T12:08:52.874000Z
Message:
  • #855(SC_Query の #select, #getRow, #getCol, #get, #min, #max の引数順を統一する)
    • 関数内部の SC_Query::get() を修正
  • #781 (規格のデータベースを木構造に)
    • 規格1のみの登録ができなかったのを修正
  • #382(管理画面XHTMLに変更)
    • チェックボックスの全選択を統一
  • #854(PHP4対応)
    • 構文修正
Location:
branches/version-2_5-dev
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/Smarty/templates/admin/order/index.tpl

    r19719 r19755  
    7676        fm.action = tmpAction; 
    7777    } 
    78      
    79     $(function() { 
    80         $('#pdf_check').change(function() { 
    81             if ($(this).attr('checked')) { 
    82                 $('input[name=pdf_order_id[]]').attr('checked', true); 
    83             } else { 
    84                 $('input[name=pdf_order_id[]]').attr('checked', false); 
    85             } 
    86         }); 
    87     }); 
    8878//--> 
    8979</script> 
     
    323313            <th>全商品発送日</th> 
    324314            <th>対応状況</th> 
    325             <th><label for="pdf_check">帳票</label> <input type="checkbox" name="pdf_check" id="pdf_check" /></th> 
     315            <th><label for="pdf_check">帳票</label> <input type="checkbox" name="pdf_check" id="pdf_check" onclick="fnAllCheck(this, 'input[name=pdf_order_id[]]')" /></th> 
    326316            <th>編集</th> 
    327317            <th>メール</th> 
  • branches/version-2_5-dev/data/Smarty/templates/admin/order/status.tpl

    r19719 r19755  
    2222 */ 
    2323*}--> 
    24 <script type="text/javascript">//<![CDATA[ 
    25     $(function() { 
    26         $('#move_check').change(function() { 
    27             if ($(this).attr('checked')) { 
    28                 $('input[name=move[]]').attr('checked', true); 
    29             } else { 
    30                 $('input[name=move[]]').attr('checked', false); 
    31             } 
    32         }); 
    33     }); 
    34 //]]> 
    35 </script> 
    3624<form name="form1" id="form1" method="POST" action="?" > 
    3725<input type="hidden" name="mode" value="" /> 
     
    7765  <table class="list center"> 
    7866    <tr> 
    79       <th><label for="move_check">選択</label> <input type="checkbox" name="move_check" id="move_check" /></th> 
     67      <th><label for="move_check">選択</label> <input type="checkbox" name="move_check" id="move_check" onclick="fnAllCheck(this, 'input[name=move[]]')" /></th> 
    8068      <th>対応状況</th> 
    8169      <th>注文番号</th> 
  • branches/version-2_5-dev/data/Smarty/templates/admin/products/product_class.tpl

    r19711 r19755  
    8383 
    8484  <div class="btn"> 
    85     <button type="button" onclick="fnAllCheck(); return false;"><span>全選択</span></button> 
    86     <button type="button" onclick="fnAllUnCheck(); return false;"><span>全解除</span></button> 
    8785    <button type="button" onclick="fnCopyValue('<!--{$cnt}-->', '<!--{$smarty.const.DISABLED_RGB}-->'); return false;"><span>一行目のデータをコピーする</span></button> 
    8886  </div> 
     
    9492  <table class="list"> 
    9593    <tr> 
    96       <th>登録</th> 
     94      <th><label for="allCheck">登録</label> <input type="checkbox" onclick="fnAllCheck(this, 'input[name^=check]')" id="allCheck" /></th> 
    9795      <th>規格1(<!--{$arrClass[$class_id1]|default:"未選択"}-->)</th> 
    9896      <th>規格2(<!--{$arrClass[$class_id2]|default:"未選択"}-->)</th> 
     
    10199      <th><!--{$smarty.const.NORMAL_PRICE_TITLE}-->(円)</th> 
    102100      <th><!--{$smarty.const.SALE_PRICE_TITLE}-->(円)<span class="attention">*</span></th> 
    103       <th>商品種別<span class="attention"> *</span></th> 
    104       <th>支払方法<span class="attention"> *</span></th> 
     101      <th>商品種別<span class="attention">*</span></th> 
     102      <th><label for="allPaymentIds">支払方法</label><span class="attention">*</span> <input type="checkbox" name="allPaymentIds" onclick="fnAllCheck(this, 'input[name^=payment_ids]')" /></th> 
    105103      <th>ダウンロードファイル名<BR><span class="red"> (上限<!--{$smarty.const.STEXT_LEN}-->文字)</span></th> 
    106104      <th>ダウンロード商品用ファイルアップロード<BR>登録可能拡張子:<!--{$smarty.const.DOWNLOAD_EXTENSION}--> (パラメータ DOWNLOAD_EXTENSION)</th> 
  • branches/version-2_5-dev/data/class/SC_Query.php

    r19746 r19755  
    547547     */ 
    548548    function max($col, $table, $where = "", $arrval = array()) { 
    549         $ret = $this->get($table, "MAX($col)", $where, $arrval); 
     549        $ret = $this->get("MAX($col)", $table, $where, $arrval); 
    550550        return $ret; 
    551551    } 
     
    561561     */ 
    562562    function min($col, $table, $where = "", $arrval = array()) { 
    563         $ret = $this->get($table, "MIN($col)", $where, $arrval); 
     563        $ret = $this->get("MIN($col)", $table, $where, $arrval); 
    564564        return $ret; 
    565565    } 
  • branches/version-2_5-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Class.php

    r19732 r19755  
    6868    function action() { 
    6969        $objSess = new SC_Session(); 
    70         $objQuery = new SC_Query(); 
     70        $objQuery =& SC_Query::getSingletonInstance(); 
    7171        $objDb = new SC_Helper_DB_Ex(); 
    7272 
     
    102102        case 'delete': 
    103103            $objDb->sfDeleteRankRecord("dtb_class", "class_id", $_POST['class_id'], "", true); 
    104             $objQuery = new SC_Query(); 
    105104            $objQuery->delete("dtb_classcategory", "class_id = ?", $_POST['class_id']); 
    106105            // 再表示 
     
    149148    /* DBへの挿入 */ 
    150149    function lfInsertClass($arrData) { 
    151         $objQuery = new SC_Query(); 
     150        $objQuery =& SC_Query::getSingletonInstance(); 
    152151        // INSERTする値を作成する。 
    153152        $sqlval['name'] = $arrData['name']; 
     
    165164    /* DBへの更新 */ 
    166165    function lfUpdateClass($arrData) { 
    167         $objQuery = new SC_Query(); 
     166        $objQuery =& SC_Query::getSingletonInstance(); 
    168167        // UPDATEする値を作成する。 
    169168        $sqlval['name'] = $arrData['name']; 
     
    195194 
    196195        if(!isset($objErr->arrErr['name'])) { 
    197             $objQuery = new SC_Query(); 
     196            $objQuery =& SC_Query::getSingletonInstance(); 
    198197            $arrRet = $objQuery->select("class_id, name", "dtb_class", "del_flg = 0 AND name = ?", array($_POST['name'])); 
    199198            // 編集中のレコード以外に同じ名称が存在する場合 
  • branches/version-2_5-dev/data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php

    r19731 r19755  
    514514        if (NOSTOCK_HIDDEN === true) { 
    515515            // 件数カウントバッチ実行 
    516             //$objDb->sfCategory_Count($objQuery); 
     516            $objDb->sfCategory_Count($objQuery); 
    517517        } 
    518518    } 
     
    535535        if(SC_Utils_Ex::isBlank($class_id2)) { 
    536536            $table = "dtb_classcategory T1 "; 
    537             $objQuery->setWhere("T1.class_id = ?") 
    538                      ->setOrder("T1.rank DESC"); 
     537            $objQuery->setWhere("T1.class_id = ?"); 
     538            $objQuery->setOrder("T1.rank DESC"); 
    539539            $val = array($class_id1); 
    540540        } else { 
     
    545545                . "T2.rank AS rank2"; 
    546546            $table = "dtb_classcategory AS T1, dtb_classcategory AS T2"; 
    547             $objQuery->setWhere("T1.class_id = ? AND T2.class_id = ?") 
    548                      ->setOrder("T1.rank DESC, T2.rank DESC"); 
     547            $objQuery->setWhere("T1.class_id = ? AND T2.class_id = ?"); 
     548            $objQuery->setOrder("T1.rank DESC, T2.rank DESC"); 
    549549            $val = array($class_id1, $class_id2); 
    550550        } 
     
    617617    function getProductsClass($product_id) { 
    618618        $objQuery =& SC_Query::getSingletonInstance(); 
    619         return $objQuery->getRow("*", "dtb_products_class", "product_id = ?", array($product_id)); 
     619        $col = <<< __EOS__ 
     620            product_id, product_code, price01, price02, stock, 
     621            stock_unlimited, point_rate 
     622__EOS__; 
     623        return $objQuery->getRow($col, "dtb_products_class", "product_id = ?", array($product_id)); 
    620624    } 
    621625 
  • branches/version-2_5-dev/html/user_data/packages/admin/js/admin.js

    r18900 r19755  
    214214} 
    215215 
    216 function fnAllCheck() { 
    217     cnt = 1; 
    218     name = "check:" + cnt; 
    219     while (document.form1[name]) { 
    220         document.form1[name].checked = true; 
    221         cnt++; 
    222         name = "check:" + cnt; 
    223     } 
    224 } 
    225  
    226 function fnAllUnCheck() { 
    227     cnt = 1; 
    228     name = "check:" + cnt; 
    229     while (document.form1[name]) { 
    230         document.form1[name].checked = false; 
    231         cnt++; 
    232         name = "check:" + cnt; 
    233     } 
     216function fnAllCheck(input, selector) { 
     217    if ($(input).attr('checked')) { 
     218        $(selector).attr('checked', true); 
     219    } else { 
     220        $(selector).attr('checked', false); 
     221    } 
    234222} 
    235223 
Note: See TracChangeset for help on using the changeset viewer.