From c2e2cd2d3bd272ccb9a42cf9adba2378f0f3d976 Mon Sep 17 00:00:00 2001 From: wangzemei Date: Fri, 31 Oct 2025 09:16:35 +0800 Subject: [PATCH] * [task#151395] story list compatible with AI. --- module/bug/ui/browse.html.php | 2 +- module/execution/ui/story.html.php | 2 +- module/execution/ui/task.html.php | 2 +- module/product/ui/browse.html.php | 2 +- module/projectstory/ui/story.html.php | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/module/bug/ui/browse.html.php b/module/bug/ui/browse.html.php index f35b8fe5a6..db7d1ad239 100644 --- a/module/bug/ui/browse.html.php +++ b/module/bug/ui/browse.html.php @@ -287,7 +287,7 @@ dtable set::orderBy($orderBy), set::footToolbar($footToolbar), set::footPager(usePager()), - (!$isFromDoc && !$isFromAI) ? null : set::afterRender(jsCallback()->call('toggleCheckRows', $idList)), + !$isFromDoc ? null : set::afterRender(jsCallback()->call('toggleCheckRows', $idList)), (!$isFromDoc && !$isFromAI) ? null : set::height(400), (!$isFromDoc && !$isFromAI) ? null : set::onCheckChange(jsRaw('window.checkedChange')), ($isFromDoc || $isFromAI) ? null : set::customCols(true), diff --git a/module/execution/ui/story.html.php b/module/execution/ui/story.html.php index f59b1fe1a0..ca294dbdb9 100644 --- a/module/execution/ui/story.html.php +++ b/module/execution/ui/story.html.php @@ -604,7 +604,7 @@ dtable 'linkCreator' => helper::createLink('execution', 'story', "executionID={$execution->id}&storyType={$storyType}&orderBy=$orderBy&type={$type}¶m={$param}&recTotal={recTotal}&recPerPage={recPerPage}&page={page}&from={$from}&blockID={$blockID}") . "#app={$app->tab}" ))), set::emptyTip($lang->execution->noStory), - (!$isFromDoc && !$isFromAI) ? null : set::afterRender(jsCallback()->call('toggleCheckRows', $idList)), + !$isFromDoc ? null : set::afterRender(jsCallback()->call('toggleCheckRows', $idList)), (!$isFromDoc && !$isFromAI) ? null : set::onCheckChange(jsRaw('window.checkedChange')), (!$isFromDoc && !$isFromAI) ? null : set::height(400), ($isFromDoc || $isFromAI) ? null : set::customCols(array('url' => createLink('datatable', 'ajaxcustom', "module={$app->moduleName}&method={$app->methodName}&extra={$storyType}"), 'globalUrl' => createLink('datatable', 'ajaxsaveglobal', "module={$app->moduleName}&method={$app->methodName}&extra={$storyType}"))), diff --git a/module/execution/ui/task.html.php b/module/execution/ui/task.html.php index 059a4e9ba1..ee843ca9b2 100644 --- a/module/execution/ui/task.html.php +++ b/module/execution/ui/task.html.php @@ -337,7 +337,7 @@ dtable 'recTotal' => $pager->recTotal, 'linkCreator' => helper::createLink('execution', 'task', "executionID={$execution->id}&status={$status}¶m={$param}&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={recPerPage}&page={page}&from={$from}&blockID={$blockID}") . "#app={$app->tab}" ))), - (!$isFromDoc && !$isFromAI) ? null : set::afterRender(jsCallback()->call('toggleCheckRows', $idList)), + !$isFromDoc ? null : set::afterRender(jsCallback()->call('toggleCheckRows', $idList)), (!$isFromDoc && !$isFromAI) ? null : set::onCheckChange(jsRaw('window.checkedChange')), (!$isFromDoc && !$isFromAI) ? null : set::noNestedCheck(true), (!$isFromDoc && !$isFromAI) ? null : set::height(400), diff --git a/module/product/ui/browse.html.php b/module/product/ui/browse.html.php index 8acb063038..367dfcc277 100644 --- a/module/product/ui/browse.html.php +++ b/module/product/ui/browse.html.php @@ -552,7 +552,7 @@ dtable set::footPager(usePager()), set::emptyTip($emptyTip), set::footToolbar($footToolbar), - (!$isFromDoc && !$isFromAI) ? null : set::afterRender(jsCallback()->call('toggleCheckRows', $idList)), + !$isFromDoc ? null : set::afterRender(jsCallback()->call('toggleCheckRows', $idList)), (!$isFromDoc && !$isFromAI) ? null : set::onCheckChange(jsRaw('window.checkedChange')), (!$isFromDoc && !$isFromAI) ? null : set::height(400), ($isFromDoc || $isFromAI) ? null : set::customCols(array('url' => createLink('datatable', 'ajaxcustom', "module={$app->moduleName}&method={$app->methodName}&extra={$storyType}"), 'globalUrl' => createLink('datatable', 'ajaxsaveglobal', "module={$app->moduleName}&method={$app->methodName}&extra={$storyType}"), 'resetUrl' => createLink('datatable', 'ajaxreset', "module={$app->moduleName}&method={$app->methodName}&system=0&confirm=no&extra={$storyType}"), 'resetGlobalUrl' => createLink('datatable', 'ajaxreset', "module={$app->moduleName}&method={$app->methodName}&system=1&confirm=no&extra={$storyType}"))), diff --git a/module/projectstory/ui/story.html.php b/module/projectstory/ui/story.html.php index f8f3471f3d..eaffe53e5d 100644 --- a/module/projectstory/ui/story.html.php +++ b/module/projectstory/ui/story.html.php @@ -110,6 +110,7 @@ foreach($stories as $story) } $footToolbar = array(array('text' => $lang->doc->insertText, 'data-on' => 'click', 'data-call' => "insertListToDoc('#projectStories', 'projectStory', $blockID, '$insertListLink')")); +if($from == 'ai') $footToolbar = array(array('text' => $lang->doc->insertText, 'data-on' => 'click', 'data-call' => "insertListToAI('#projectStories', 'story')")); dtable (