* [bug#55350,done,1h,0h] Fix save query to menu bug.

This commit is contained in:
wangyuting
2024-09-13 14:57:21 +08:00
committed by 胡方舟
parent b089597800
commit b0426fab9b
3 changed files with 8 additions and 2 deletions
+3 -1
View File
@@ -16,6 +16,7 @@ class featureBar extends wg
'load?: string="table"',
'loadID?: string',
'app?: string=""',
'param?: int=0',
'labelCount?: int=-1'
);
@@ -48,6 +49,7 @@ class featureBar extends wg
$loadID = $this->prop('loadID');
$load = $this->prop('load');
$tab = $this->prop('app');
$param = $this->prop('param');
$commonLink = $this->prop('link');
$itemLink = $this->prop('itemLink');
@@ -85,7 +87,7 @@ class featureBar extends wg
$subItem = array();
$subItem['text'] = $text;
$subItem['active'] = $key == $current;
$subItem['active'] = $item->name == 'QUERY' ? $key == $param : $key == $current;
$subItem['url'] = ($callback instanceof \Closure) ? $callback($key, $text) : str_replace('{key}', (string)$key, $link);
$subItem['attrs'] = ['data-id' => $key, 'data-load' => $load, 'data-target' => $loadID, 'data-app' => $tab, 'data-success' => "() => zui.updateSearchForm('$searchModule')"];
+3
View File
@@ -26,6 +26,7 @@ jsVar('hourPointNotEmpty', sprintf($lang->error->notempty, $lang->story->conver
jsVar('hourPointNotError', sprintf($lang->story->float, $lang->story->convertRelations));
/* Show feature bar. */
$queryMenuLink = createLink($app->rawModule, $app->rawMethod, "&executionID=$execution->id&storyType=$storyType&orderBy=$orderBy&type=bySearch&param={queryID}");
featureBar
(
to::leading
@@ -49,8 +50,10 @@ featureBar
)
)
),
set::param($param),
set::current($this->session->storyBrowseType),
set::link(createLink($app->rawModule, $app->rawMethod, "&executionID=$execution->id&storyType=$storyType&orderBy=$orderBy&type={key}")),
set::queryMenuLinkCallback(array(fn($key) => str_replace('{queryID}', (string)$key, $queryMenuLink))),
li(searchToggle(set::module('executionStory'), set::open($type == 'bysearch')))
);
+2 -1
View File
@@ -362,7 +362,7 @@ jsVar('modulePairs', $modulePairs);
jsVar('storyType', $storyType);
jsVar('checkedSummary', $checkedSummary);
$queryMenuLink = createLink($app->rawModule, $app->rawMethod, $projectIDParam . "productID=$productID&branch=$branch&browseType=bySearch&param={queryID}");
$queryMenuLink = createLink($app->rawModule, $app->rawMethod, $projectIDParam . "productID=$productID&branch=$branch&browseType=bySearch&param={queryID}&storyType=$storyType&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}&projectID=$projectID");
featureBar
(
$hideGrade ? null : to::leading
@@ -386,6 +386,7 @@ featureBar
)
)
),
set::param($param),
set::current($storyBrowseType),
set::link(createLink($app->rawModule, $app->rawMethod, $projectIDParam . "productID=$productID&branch=$branch&browseType={key}&param=$param&storyType=$storyType&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}&projectID=$projectID")),
set::queryMenuLinkCallback(array(fn($key) => str_replace('{queryID}', (string)$key, $queryMenuLink))),