diff --git a/module/execution/js/kanban.ui.js b/module/execution/js/kanban.ui.js index b3d2870f24..ff940add6d 100644 --- a/module/execution/js/kanban.ui.js +++ b/module/execution/js/kanban.ui.js @@ -581,3 +581,16 @@ window.hideAllAction = function() { $('.btn').hide(); } + +window.changeBrowseType = function() +{ + const type = $('.c-type [name=type]').val(); + loadPage($.createLink('execution', 'kanban', "executionID=" + executionID + '&type=' + type)); +}; + +window.changeGroupBy = function() +{ + const group = $('.c-group [name=group]').val(); + const type = $('.c-type [name=type]').val(); + loadPage($.createLink('execution', 'kanban', 'executionID=' + executionID + '&type=' + type + '&orderBy=order_asc' + '&groupBy=' + group)); +}; diff --git a/module/execution/js/taskkanban.ui.js b/module/execution/js/taskkanban.ui.js index 2cc1696c5c..d88f9b6424 100644 --- a/module/execution/js/taskkanban.ui.js +++ b/module/execution/js/taskkanban.ui.js @@ -38,7 +38,7 @@ window.changeBrowseType = function() window.changeGroupBy = function() { - const troup = $('.c-group [name=group]').val(); + const group = $('.c-group [name=group]').val(); const type = $('.c-type [name=type]').val(); loadPage($.createLink('execution', 'taskKanban', 'executionID=' + executionID + '&type=' + type + '&orderBy=order_asc' + '&groupBy=' + group)); }; diff --git a/module/execution/ui/kanban.html.php b/module/execution/ui/kanban.html.php index 7198724802..0b3d236240 100644 --- a/module/execution/ui/kanban.html.php +++ b/module/execution/ui/kanban.html.php @@ -158,7 +158,38 @@ jsVar('priv', ) ); -featureBar(); +if(!$features['story']) unset($lang->kanban->type['story']); +if(!$features['qa']) unset($lang->kanban->type['bug']); +featureBar +( + ($features['story'] or $features['qa']) ? inputControl + ( + setClass('c-type'), + picker + ( + set::width('200'), + set::name('type'), + set::items($lang->kanban->type), + set::value($browseType), + set::required(true), + set::onchange('changeBrowseType()'), + ) + ) : null, + $browseType != 'all' ? inputControl + ( + setClass('c-group ml-5'), + picker + ( + set::width('200'), + set::name('group'), + set::items($lang->kanban->group->$browseType), + set::value($groupBy), + set::required(true), + set::onchange('changeGroupBy()'), + ) + ) : null, +); + toolbar ( btnGroup diff --git a/module/execution/ui/taskkanban.html.php b/module/execution/ui/taskkanban.html.php index 9a03e92eec..867de33985 100644 --- a/module/execution/ui/taskkanban.html.php +++ b/module/execution/ui/taskkanban.html.php @@ -137,20 +137,20 @@ row set::name('type'), set::items($lang->kanban->type), set::value($browseType), - set::require(true), + set::required(true), set::onchange('changeBrowseType()') ) ) : null, $browseType != 'all' ? inputControl ( - setClass('c-group'), + setClass('c-group ml-5'), picker ( set::width('200'), set::name('group'), set::items($lang->kanban->group->$browseType), set::value($groupBy), - set::require(true), + set::required(true), set::onchange('changeGroupBy()') ) ) : null