diff --git a/module/bug/model.php b/module/bug/model.php index 7576b8b929..6a874f1dc1 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -606,7 +606,7 @@ class bugModel extends model * @access public * @return array */ - public function getActiveBugs($products, $branch, $executions, $excludeBugs, $pager = null) + public function getActiveBugs($products, $branch, $executions, $excludeBugs, $pager = null, $orderBy = 'id desc') { return $this->dao->select('*')->from(TABLE_BUG) ->where('status')->eq('active') @@ -617,7 +617,7 @@ class bugModel extends model ->beginIF(!empty($executions))->andWhere('execution')->in($executions)->fi() ->beginIF($excludeBugs)->andWhere('id')->notIN($excludeBugs)->fi() ->andWhere('deleted')->eq(0) - ->orderBy('id desc') + ->orderBy($orderBy) ->page($pager) ->fetchAll(); } diff --git a/module/mr/control.php b/module/mr/control.php index 841fe561b0..4eec724421 100644 --- a/module/mr/control.php +++ b/module/mr/control.php @@ -652,7 +652,7 @@ class mr extends control $linkedStories = $this->mr->getLinkList($MRID, $product->id, 'story'); if($browseType == 'bySearch') { - $allStories = $this->story->getBySearch($productID, 0, $queryID, 'id', '', 'story', array_keys($linkedStories), '', $pager); + $allStories = $this->story->getBySearch($productID, 0, $queryID, $orderBy, '', 'story', array_keys($linkedStories), '', $pager); } else { @@ -741,17 +741,13 @@ class mr extends control $linkedBugs = $this->mr->getLinkList($MRID, $product->id, 'bug'); if($browseType == 'bySearch') { - $allBugs = $this->bug->getBySearch($productID, 0, $queryID, 'id_desc', array_keys($linkedBugs), $pager); + $allBugs = $this->bug->getBySearch($productID, 0, $queryID, $orderBy, array_keys($linkedBugs), $pager); } else { - $allBugs = $this->bug->getActiveBugs($productID, 0, '0', array_keys($linkedBugs), $pager); + $allBugs = $this->bug->getActiveBugs($productID, 0, '0', array_keys($linkedBugs), $pager, $orderBy); } - list($order, $sort) = explode('_', $orderBy); - $sortCol = array_column($allBugs, $order); - array_multisort($sortCol, $sort == 'asc' ? SORT_ASC : SORT_DESC, $allBugs); - $this->view->modules = $modules; $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->allBugs = $allBugs; diff --git a/module/mr/css/common.ui.css b/module/mr/css/common.ui.css index db027f7627..cf0c538b1e 100644 --- a/module/mr/css/common.ui.css +++ b/module/mr/css/common.ui.css @@ -1,2 +1,3 @@ .mr-linkstory-title {background-color: #e6f0ff; color: #2e7fff; padding: 12px 6px 12px;} -#log .action-btn .caret {display: none; color: red} \ No newline at end of file +#log .action-btn .caret {display: none; color: red} +.dropmenu-btn>.text {max-width: 280px;} \ No newline at end of file diff --git a/module/mr/js/linkbug.ui.js b/module/mr/js/linkbug.ui.js index f64dd9a1ad..140c1a0598 100644 --- a/module/mr/js/linkbug.ui.js +++ b/module/mr/js/linkbug.ui.js @@ -3,7 +3,7 @@ window.createSortLink = function(col) var sort = col.name + '_asc'; if(sort == orderBy) sort = col.name + '_desc'; - return sortLink.replace('{orderBy}', sort); + return "javascript:loadTarget('" + sortLink.replace('{orderBy}', sort) + "', 'mr-bug')"; } $(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer .batch-btn', function(e) diff --git a/module/mr/js/linkstory.ui.js b/module/mr/js/linkstory.ui.js index 23596b2a6d..d453762ae5 100644 --- a/module/mr/js/linkstory.ui.js +++ b/module/mr/js/linkstory.ui.js @@ -3,7 +3,7 @@ window.createSortLink = function(col) var sort = col.name + '_asc'; if(sort == orderBy) sort = col.name + '_desc'; - return sortLink.replace('{orderBy}', sort); + return "javascript:loadTarget('" + sortLink.replace('{orderBy}', sort) + "', 'mr-story')"; } $(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer .batch-btn', function(e) diff --git a/module/mr/js/linktask.ui.js b/module/mr/js/linktask.ui.js index 012ec34b27..fa7816d895 100644 --- a/module/mr/js/linktask.ui.js +++ b/module/mr/js/linktask.ui.js @@ -3,7 +3,7 @@ window.createSortLink = function(col) var sort = col.name + '_asc'; if(sort == orderBy) sort = col.name + '_desc'; - return sortLink.replace('{orderBy}', sort); + return "javascript:loadTarget('" + sortLink.replace('{orderBy}', sort) + "', 'mr-task')"; } $(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer .batch-btn', function(e) diff --git a/module/mr/model.php b/module/mr/model.php index a2ac2d03ed..5bf6a2a600 100644 --- a/module/mr/model.php +++ b/module/mr/model.php @@ -1973,7 +1973,7 @@ class mrModel extends model { $product = array(); - if($MR->repoID) + if(is_object($MR) && $MR->repoID) { $productID = $this->dao->select('product')->from(TABLE_REPO)->where('id')->eq($MR->repoID)->fetch('product'); } diff --git a/module/ops/lang/zh-cn.php b/module/ops/lang/zh-cn.php index 93e13faea9..542fc346b0 100644 --- a/module/ops/lang/zh-cn.php +++ b/module/ops/lang/zh-cn.php @@ -1,5 +1,5 @@ ops->common = 'devops设置'; +$lang->ops->common = 'DevOps设置'; $lang->ops->setting = '设置'; $lang->ops->provider = '服务商'; $lang->ops->provider = '服务商'; diff --git a/module/ops/lang/zh-tw.php b/module/ops/lang/zh-tw.php index 93e13faea9..542fc346b0 100644 --- a/module/ops/lang/zh-tw.php +++ b/module/ops/lang/zh-tw.php @@ -1,5 +1,5 @@ ops->common = 'devops设置'; +$lang->ops->common = 'DevOps设置'; $lang->ops->setting = '设置'; $lang->ops->provider = '服务商'; $lang->ops->provider = '服务商'; diff --git a/module/repo/control.php b/module/repo/control.php index f5dad47e22..930467ccee 100644 --- a/module/repo/control.php +++ b/module/repo/control.php @@ -1221,7 +1221,7 @@ class repo extends control } else { - $allBugs = $this->bug->getActiveBugs($product->id, 0, '0', array_keys($linkedBugs), $pager); + $allBugs = $this->bug->getActiveBugs($product->id, 0, '0', array_keys($linkedBugs), $pager, $orderBy); } foreach($allBugs as $bug) $bug->statusText = $this->processStatus('bug', $bug); diff --git a/module/repo/js/linkstory.ui.js b/module/repo/js/linkstory.ui.js index 896d7511d7..8d2c7ce53f 100644 --- a/module/repo/js/linkstory.ui.js +++ b/module/repo/js/linkstory.ui.js @@ -21,10 +21,3 @@ $(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer data: postData }); }); - -$('#table-repo-linkstory').on('click', 'a', function(e) -{ - console.log(1111, e); - e.preventDefault(); - return; -}) \ No newline at end of file