From 7b56164e8a65b95ed407463d2e9594b02599d9bc Mon Sep 17 00:00:00 2001 From: zhaoke Date: Fri, 1 Sep 2023 11:53:11 +0800 Subject: [PATCH] * Fix bug #37285. --- module/repo/control.php | 4 ++-- module/repo/js/linkbug.ui.js | 2 +- module/repo/js/linkstory.ui.js | 11 +++++++++-- module/repo/js/linktask.ui.js | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/module/repo/control.php b/module/repo/control.php index 972c19541a..f5dad47e22 100644 --- a/module/repo/control.php +++ b/module/repo/control.php @@ -1130,7 +1130,7 @@ class repo extends control $linkedStories = $this->repo->getRelationByCommit($repoID, $revision, 'story'); if($browseType == 'bySearch') { - $allStories = $this->story->getBySearch($product->id, 0, $queryID, 'id', '', 'story', array_keys($linkedStories), $pager); + $allStories = $this->story->getBySearch($product->id, 0, $queryID, $orderBy, '', 'story', array_keys($linkedStories), $pager); } else { @@ -1217,7 +1217,7 @@ class repo extends control $linkedBugs = $this->repo->getRelationByCommit($repoID, $revision, 'bug'); if($browseType == 'bySearch') { - $allBugs = $this->bug->getBySearch($product->id, 0, $queryID, 'id_desc', array_keys($linkedBugs), $pager); + $allBugs = $this->bug->getBySearch($product->id, 0, $queryID, $orderBy, array_keys($linkedBugs), $pager); } else { diff --git a/module/repo/js/linkbug.ui.js b/module/repo/js/linkbug.ui.js index 475ab59c8f..f478e496a2 100644 --- a/module/repo/js/linkbug.ui.js +++ b/module/repo/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:loadModal('" + sortLink.replace('{orderBy}', sort) + "', '#table-repo-linkbug')"; } $(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer .batch-btn', function(e) diff --git a/module/repo/js/linkstory.ui.js b/module/repo/js/linkstory.ui.js index 475ab59c8f..896d7511d7 100644 --- a/module/repo/js/linkstory.ui.js +++ b/module/repo/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:loadModal('" + sortLink.replace('{orderBy}', sort) + "', '#table-repo-linkstory')"; } $(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer .batch-btn', function(e) @@ -20,4 +20,11 @@ $(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer url: $(this).data('url'), data: postData }); -}); \ No newline at end of file +}); + +$('#table-repo-linkstory').on('click', 'a', function(e) +{ + console.log(1111, e); + e.preventDefault(); + return; +}) \ No newline at end of file diff --git a/module/repo/js/linktask.ui.js b/module/repo/js/linktask.ui.js index 475ab59c8f..ee7cf6a266 100644 --- a/module/repo/js/linktask.ui.js +++ b/module/repo/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:loadModal('" + sortLink.replace('{orderBy}', sort) + "', '#table-repo-linktask')"; } $(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer .batch-btn', function(e)