From e36fbbd17d78950699bb7cba880bb374c1068094 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Wed, 10 Jan 2024 15:07:56 +0800 Subject: [PATCH] * Fix bug #43579. --- module/execution/js/linkstory.ui.js | 5 +++++ module/execution/ui/linkstory.html.php | 9 ++++++++- module/execution/ui/taskkanban.html.php | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/module/execution/js/linkstory.ui.js b/module/execution/js/linkstory.ui.js index d1d57ca2cc..0a33932898 100644 --- a/module/execution/js/linkstory.ui.js +++ b/module/execution/js/linkstory.ui.js @@ -45,3 +45,8 @@ window.onRenderLinkStoryCell = function(result, {row, col}) return ['']; }; + +window.onSearchLinks = function(type, result) +{ + loadComponent('#table-execution-linkstory', {url: result.load, component: 'dtable', partial: true}); +}; diff --git a/module/execution/ui/linkstory.html.php b/module/execution/ui/linkstory.html.php index 49dc5c077f..021766c25a 100644 --- a/module/execution/ui/linkstory.html.php +++ b/module/execution/ui/linkstory.html.php @@ -16,9 +16,16 @@ featureBar(li ( setClass('nav-item'), a(setClass('active'), $lang->execution->linkStory), - isInModal() ? null : li(searchToggle(set::module('story'), set::open(true))) )); +searchForm +( + set::module('story'), + set::simple(true), + set::show(true), + set::onSearch(jsRaw("window.onSearchLinks.bind(null, 'story')")) +); + $cols = $config->execution->linkStory->dtable->fieldList; $cols['module']['map'] = $modules; $cols['product']['map'] = $productPairs; diff --git a/module/execution/ui/taskkanban.html.php b/module/execution/ui/taskkanban.html.php index 7fec67d955..3aa6dd6ecf 100644 --- a/module/execution/ui/taskkanban.html.php +++ b/module/execution/ui/taskkanban.html.php @@ -206,7 +206,7 @@ row ( ($features['story'] and $hasStoryButton and $canCreateStory) ? array('text' => $lang->execution->createStory, 'url' => createLink('story', 'create', "productID=$productID&branch=0&moduleID=0&story=0&execution=$execution->id"), 'data-toggle' => 'modal', 'data-size' => 'lg') : null, ($features['story'] and $hasStoryButton and $canBatchCreateStory) ? array('text' => $lang->execution->batchCreateStory, 'url' => createLink('story', 'batchCreate', "productID=$productID&branch=0&moduleID=0&story=0&execution=$execution->id"), 'data-toggle' => 'modal', 'data-size' => 'lg') : null, - ($features['story'] and $hasStoryButton and $canLinkStory) ? array('text' => $lang->execution->linkStory, 'url' => createLink('story', 'linkStory', "execution=$execution->id"), 'data-toggle' => 'modal', 'data-size' => 'lg') : null, + ($features['story'] and $hasStoryButton and $canLinkStory) ? array('text' => $lang->execution->linkStory, 'url' => createLink('execution', 'linkStory', "execution=$execution->id"), 'data-toggle' => 'modal', 'data-size' => 'lg') : null, ($features['story'] and $hasStoryButton and $canLinkStoryByPlan) ? array('text' => $lang->execution->linkStoryByPlan, 'url' => '#linkStoryByPlan', 'data-toggle' => 'modal') : null, ($features['story'] and $hasStoryButton and $features['qa']) ? array('class' => 'menu-divider') : null, ($features['qa'] && $canCreateBug) ? array('text' => $lang->bug->create, 'url' => createLink('bug', 'create', "productID=$productID&branch=0&extra=executionID=$execution->id"), 'data-toggle' => 'modal', 'data-size' => 'lg') : null,