From 48c0068017057935dc2dfdaa456886031463ee5d Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 30 May 2023 10:32:59 +0800 Subject: [PATCH] * Modify story load and style issues. --- module/execution/control.php | 2 +- module/task/css/common.ui.css | 2 +- module/task/js/batchcreate.ui.js | 2 +- module/task/js/create.ui.js | 10 ++++++++-- module/tree/control.php | 1 - module/tree/model.php | 1 - 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 2ed6c78bdc..ec29795e50 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3487,7 +3487,7 @@ class execution extends control } else { - $allStories = $this->story->getProductStories(array_keys($products), $branchIDList, $moduleID = '0', $status = 'active', 'story', 'id_desc', $hasParent = false, '', $pager = null); + $allStories = $this->story->getProductStories(implode(',', array_keys($products)), $branchIDList, $moduleID = '0', $status = 'active', 'story', 'id_desc', $hasParent = false, '', $pager = null); } $linkedStories = $this->story->getExecutionStoryPairs($objectID); diff --git a/module/task/css/common.ui.css b/module/task/css/common.ui.css index 80025e5fc8..b3a217e703 100644 --- a/module/task/css/common.ui.css +++ b/module/task/css/common.ui.css @@ -1,4 +1,4 @@ -div.input-group.no-background .input-group-addon {background: none;} +div.no-background .input-group-addon {background: none;} .items-center {align-items: center !important;} .flex-center {justify-content: center;} .panel-form > .panel-heading.status-heading {justify-content: flex-start; padding-bottom: 0px;} diff --git a/module/task/js/batchcreate.ui.js b/module/task/js/batchcreate.ui.js index e04314ac4f..98073984be 100644 --- a/module/task/js/batchcreate.ui.js +++ b/module/task/js/batchcreate.ui.js @@ -76,7 +76,7 @@ function setStoryRelated(event) const $preview = $currentRow.find('.form-batch-input[data-name="preview"]'); if(storyID) { - var link = $.createLink('story', 'ajaxGetInfo', 'storyID=' + storyID); + var link = $.createLink('story', 'ajaxGetInfo', 'storyID=' + storyID + '&pageType=batch'); $.getJSON(link, function(data) { const storyInfo = data['storyInfo']; diff --git a/module/task/js/create.ui.js b/module/task/js/create.ui.js index 54c4f735c8..16c2c6a362 100644 --- a/module/task/js/create.ui.js +++ b/module/task/js/create.ui.js @@ -6,6 +6,11 @@ $(function() $("input[name='after'][value='continueAdding']").parent().hide(); $("input[name='after'][value='toTaskList']").prop('checked', true); } + + $('#module').on('change', function() + { + loadExecutionStories(); + }); }) /** @@ -253,6 +258,7 @@ function setStoryRelated() { setPreview(); setStoryModule(); + setAfter(); } /** @@ -335,7 +341,7 @@ function setAfter() { /* If the exeuction has stories, show the selections of story. */ if(!toTaskList) $('input[value="continueAdding"]').prop('checked', true); - $('input[value="continueAdding"]').attr('disabled', false); - $('input[value="toStoryList"]').attr('disabled', false); + $('input[value="continueAdding"]').removeAttr('disabled'); + $('input[value="toStoryList"]').removeAttr('disabled'); } } diff --git a/module/tree/control.php b/module/tree/control.php index 92f28d00ee..7288cf6055 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -574,7 +574,6 @@ class tree extends control { $changeFunc = ''; if($viewType == 'bug' or $viewType == 'case') $changeFunc = "onchange='loadModuleRelated()'"; - if($viewType == 'task') $changeFunc = "onchange='setStories(this.value, $rootID)'"; $field = $fieldID !== '' ? "modules[$fieldID]" : 'module'; $currentModule = $this->tree->getById($currentModuleID); diff --git a/module/tree/model.php b/module/tree/model.php index 37a85d2726..bac232f986 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -293,7 +293,6 @@ class treeModel extends model $startModulePath = $startModule->path . '%'; $modulePaths = explode(",", $startModulePath); $rootModule = $this->getById($modulePaths[0]); - $productID = $rootModule->root; } } $treeMenu = array();