* Add batch operation buttons to the bug list.

This commit is contained in:
wangyuting
2023-05-24 14:03:24 +08:00
parent 21381685be
commit aa97cbc50b
2 changed files with 34 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
$(function()
{
var bugIdList = [1, 2];
$(document).on('click', '.edit-btn', function()
{
var batchEditLink = $.createLink('bug', 'batchEdit', 'productID=' + productID + '&branch=' + branch);
var tempform = document.createElement("form");
tempform.action = batchEditLink;
tempform.method = "post";
tempform.style.display = "none";
var opt = document.createElement("input");
opt.name = 'bugIdList';
opt.value = bugIdList;
tempform.appendChild(opt);
document.body.appendChild(tempform);
tempform.submit();
return false;
});
})
+11
View File
@@ -9,6 +9,8 @@ declare(strict_types=1);
* @link https://www.zentao.net
*/
namespace zin;
jsVar('productID', $product->id);
jsVar('branch', $branch);
$this->bug->buildOperateMenu(null, 'browse');
@@ -118,11 +120,20 @@ sidebar
)))
);
$footToolbar = array('items' => array
(
array('size' => 'sm', 'text' => $lang->edit, 'btnType' => 'primary', 'className' => 'edit-btn'),
array('size' => 'sm', 'text' => $lang->bug->moduleAB, 'btnType' => 'primary', 'className' => 'module-btn'),
array('size' => 'sm', 'text' => $lang->bug->assignedTo, 'btnType' => 'primary', 'className' => 'assignto-btn'),
));
dtable
(
set::cols($cols),
set::data($data),
set::footPager(usePager()),
set::checkable(true),
set::footToolbar($footToolbar),
set::footer(jsRaw('window.footerGenerator'))
);