diff --git a/module/product/config.php b/module/product/config.php index ba557eda1f..f7130554c9 100644 --- a/module/product/config.php +++ b/module/product/config.php @@ -1,6 +1,6 @@ product = new stdclass(); -$config->product->orderBy = 'isClosed,order_desc'; +$config->product->orderBy = 'isClosed,program_asc,order_asc'; $config->product->customBatchEditFields = 'line,PO,QD,RD,status,type,acl'; if($config->systemMode == 'new') $config->product->customBatchEditFields = 'program,' . $config->product->customBatchEditFields; diff --git a/module/product/control.php b/module/product/control.php index 401edefb9b..0e61a9e2ef 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -1197,7 +1197,7 @@ class product extends control * @access public * @return void */ - public function all($browseType = 'noclosed', $orderBy = 'program_asc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function all($browseType = 'noclosed', $orderBy = 'program_asc,order_asc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) { /* Load module and set session. */ $this->loadModel('program'); diff --git a/module/product/js/all.js b/module/product/js/all.js index ad907622ad..0d36409e28 100644 --- a/module/product/js/all.js +++ b/module/product/js/all.js @@ -13,7 +13,9 @@ $(function() /* Set movable conditions. */ canMoveHere: function($ele, $target) { - return $ele.data('parent') === $target.data('parent'); + var canMove = true; + if($ele.hasClass('no-nest')) canMove = $target.hasClass('no-nest') ? true : false; + return $ele.data('parent') === $target.data('parent') && canMove; }, start: function(e) {