From 9dab175600619e38098effbee143ee78534a8566 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Wed, 18 May 2022 08:52:46 +0000 Subject: [PATCH] * Finish task #54491_1 --- module/product/config.php | 2 +- module/product/control.php | 2 +- module/product/js/all.js | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) 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) {