* Fix can not load data in current page when click search button of mr module.

This commit is contained in:
zhaoke
2023-08-11 13:48:27 +08:00
parent db78242598
commit 37688315ad
5 changed files with 31 additions and 7 deletions
+3 -3
View File
@@ -624,7 +624,7 @@ class mr extends control
$queryID = ($browseType == 'bySearch') ? (int) $param : 0;
unset($this->config->product->search['fields']['product']);
$this->config->product->search['actionURL'] = $this->createLink('mr', 'link', "$MRID=$MRID&type=story&orderBy=$orderBy&link=true&param=" . helper::safe64Encode('&browseType=bySearch&queryID=myQueryID'));
$this->config->product->search['actionURL'] = $this->createLink('mr', 'linkStory', "MRID={$MRID}&productID={$productID}&browseType=bySearch&param=myQueryID&orderBy={$orderBy}");
$this->config->product->search['queryID'] = $queryID;
$this->config->product->search['style'] = 'simple';
$this->config->product->search['params']['product']['values'] = array($product) + array('all' => $this->lang->product->allProductsOfProject);
@@ -711,7 +711,7 @@ class mr extends control
$pager = new pager($recTotal, $recPerPage, $pageID);
/* Build search form. */
$this->config->bug->search['actionURL'] = $this->createLink('mr', 'link', "$MRID=$MRID&type=bug&orderBy=$orderBy&link=true&param=" . helper::safe64Encode('&browseType=bySearch&queryID=myQueryID'));
$this->config->bug->search['actionURL'] = $this->createLink('mr', 'linkBug', "MRID={$MRID}&productID={$productID}&browseType=bySearch&param=myQueryID&orderBy={$orderBy}");
$this->config->bug->search['queryID'] = $queryID;
$this->config->bug->search['style'] = 'simple';
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($productID => $productID));
@@ -806,7 +806,7 @@ class mr extends control
$pager = new pager($recTotal, $recPerPage, $pageID);
/* Build search form. */
$this->config->execution->search['actionURL'] = $this->createLink('mr', 'link', "$MRID=$MRID&type=task&orderBy=$orderBy&link=true&param=" . helper::safe64Encode('&browseType=bySearch&queryID=myQueryID'));
$this->config->execution->search['actionURL'] = $this->createLink('mr', 'linkTask', "MRID={$MRID}&productID={$productID}&browseType=bySearch&param=myQueryID&orderBy={$orderBy}");
$this->config->execution->search['queryID'] = $queryID;
$this->config->execution->search['params']['module']['values'] = $modules;
$this->config->execution->search['params']['execution']['values'] = $this->product->getExecutionPairsByProduct($productID);
+9 -1
View File
@@ -20,4 +20,12 @@ $(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer
url: $(this).data('url'),
data: postData
});
});
});
window.onSearchFormResult = function(formName, response)
{
response.then(res => res.json())
.then(json => {
loadTarget(json.load, 'mr-bug');
}).catch(console.error);
}
+9 -1
View File
@@ -20,4 +20,12 @@ $(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer
url: $(this).data('url'),
data: postData
});
});
});
window.onSearchFormResult = function(formName, response)
{
response.then(res => res.json())
.then(json => {
loadTarget(json.load, 'mr-story');
}).catch(console.error);
}
+9 -1
View File
@@ -20,4 +20,12 @@ $(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer
url: $(this).data('url'),
data: postData
});
});
});
window.onSearchFormResult = function(formName, response)
{
response.then(res => res.json())
.then(json => {
loadTarget(json.load, 'mr-task');
}).catch(console.error);
}
+1 -1
View File
@@ -1,4 +1,4 @@
window.onSearchFormResult = function(formName, response)
if(window.onSearchFormResult === undefined) window.onSearchFormResult = function(formName, response)
{
response.then(res => res.json())
.then(json => {