diff --git a/module/execution/css/kanban.css b/module/execution/css/kanban.css index 7a47cf694f..8fd1aef6f0 100644 --- a/module/execution/css/kanban.css +++ b/module/execution/css/kanban.css @@ -36,7 +36,8 @@ .region .kanban-header-col > .title {max-width: 80% !important;} .region .kanban-header-col > .title {margin: 0} .region .kanban-header-col > .title > span {display: inline-block; overflow: hidden; padding-right:2px; position: initial; max-width: 85px !important;} -.region .kanban-header-col > .title > span.storyColumn {max-width: 100% !important;} +.region .kanban-header-col > .title > .storyColumn {margin-right: 30px;} +.region .kanban-header-col > .title > .storyColumn + .dropdown-menu {top: 45px; left: auto;} .region .kanban-header-col > .title > .text-grey {opacity: .5; font-weight: bold; color: #8b91a2;} .region .kanban-header-col > .title > .count {opacity: .5; font-weight: bold; color: #8b91a2;} .region .kanban-header-col > .title > .error {color: #333333; padding-left: 2px; font-size: 10px; padding-top: 1px; padding-right: 2px;} diff --git a/module/execution/css/taskkanban.css b/module/execution/css/taskkanban.css index 74960863c8..29bf6df0ce 100644 --- a/module/execution/css/taskkanban.css +++ b/module/execution/css/taskkanban.css @@ -29,7 +29,7 @@ .kanban-affixed .kanban-header-col > .title > .text, .kanban-affixed .kanban-header-col > .title > .count {color: #fff!important;} .kanban-header-col > .title > .text {max-width: 110px !important;} -.kanban-header-col > .title > .storyColumn.text {max-width: 100% !important;} +.kanban-header-col > .title > .storyColumn + .dropdown-menu {top: 45px; left: auto;} #kanbanContainer {margin: 0;} #kanbanContainer > .panel-body {overflow: auto;} diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index 1f36b660d7..bace521740 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -760,8 +760,14 @@ function renderCount($count, count, column) { if(groupBy == 'story' && column.type == 'story') { - $count.prev().addClass('storyColumn'); - $count.prev().parent().append(''); + var orderButton = '' + + ''; + + $count.prev().replaceWith(orderButton); $count.remove(); return; } @@ -1590,12 +1596,6 @@ $(function() $('.color0 .cardcolor').css('border', '1px solid #fff'); }); - $(document).on('click', '#kanban span.caret.changeOrderBy', function(event) - { - orderBy = orderBy == 'pri_desc' ? 'pri_asc' : 'pri_desc'; - searchCards(rdSearchValue); - }) - /* Init sortable */ var sortType = ''; var $cards = null; @@ -1823,12 +1823,15 @@ function toggleRDSearchBox() * Search all cards. * * @param string $value + * @param string order + * * @access public * @return void */ -function searchCards(value) +function searchCards(value, order = '') { rdSearchValue = value; + orderBy = order == '' ? orderBy : order; $.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=0&browseType=" + browseType + "&groupBy=" + groupBy + '&from=RD&searchValue=' + rdSearchValue + '&orderBy=' + orderBy), function(data) { lastUpdateData = data; diff --git a/module/execution/js/taskkanban.js b/module/execution/js/taskkanban.js index 8614e2e64f..b7f1befcab 100644 --- a/module/execution/js/taskkanban.js +++ b/module/execution/js/taskkanban.js @@ -341,9 +341,16 @@ function renderColumnCount($count, count, col) { if(groupBy == 'story' && col.type == 'story') { - $count.prev().addClass('storyColumn'); - $count.prev().parent().append(''); - $count.remove(); + var orderButton = '' + + ''; + + $count.siblings('.storyColumn').remove(); + $count.prev().replaceWith(orderButton); + $count.hide(); return; } @@ -1274,12 +1281,6 @@ $(function() event.preventDefault(); }); - $(document).on('click', '#kanbans span.caret.changeOrderBy', function(event) - { - orderBy = orderBy == 'pri_desc' ? 'pri_asc' : 'pri_desc'; - searchCards(searchValue); - }) - /* Init contextmenu */ $('#kanbans').on('click', '[data-contextmenu]', function(event) { @@ -1339,7 +1340,7 @@ $(function() lastUpdateData = ''; setInterval(function() { - $.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=" + entertime + "&browseType=" + browseType + "&groupBy=" + groupBy + '&from=execution&searchValue=' + searchValue + '&orderBy' + orderBy), function(data) + $.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=" + entertime + "&browseType=" + browseType + "&groupBy=" + groupBy + '&from=execution&searchValue=' + searchValue + '&orderBy=' + orderBy), function(data) { if(lastUpdateData == '') lastUpdateData = data; if(data && lastUpdateData !== data) @@ -1469,12 +1470,15 @@ function toggleSearchBox() * Search kanban cards. * * @param string value + * @param string order + * * @access public * @return void */ -function searchCards(value) +function searchCards(value, order = '') { searchValue = value; + orderBy = order == '' ? orderBy : order; $.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=0&browseType=" + browseType + "&groupBy=" + groupBy + '&from=execution&searchValue=' + value + '&orderBy=' + orderBy), function(data) { lastUpdateData = data; diff --git a/module/kanban/lang/de.php b/module/kanban/lang/de.php index 01aefc72bc..5aecfc67fb 100644 --- a/module/kanban/lang/de.php +++ b/module/kanban/lang/de.php @@ -216,8 +216,13 @@ $lang->kanban->error->childLimitNote = 'The sum of products in the child colu $lang->kanban->error->importObjNotEmpty = 'Please select at least one import object.'; $lang->kanban->error->childLimitEmpty = 'Please set the WIP quantity of the sub column before operation.'; -$lang->kanban->orderList['pri_asc'] = 'Story Priority Ascending'; -$lang->kanban->orderList['pri_desc'] = 'Story Priority Descending'; +$lang->kanban->orderList['pri_asc'] = 'Story Priority Ascending'; +$lang->kanban->orderList['pri_desc'] = 'Story Priority Descending'; +$lang->kanban->orderList['id_asc'] = 'Story ID Ascending'; +$lang->kanban->orderList['id_desc'] = 'Story ID Descending'; +$lang->kanban->orderList['stage_asc'] = 'Story Stage Ascending'; +$lang->kanban->orderList['stage_desc'] = 'Story Stage Descending'; +$lang->kanban->orderList['assignedTo'] = 'Assigned To'; $lang->kanban->importList = array(); $lang->kanban->importList['off'] = 'Import is not enabled'; diff --git a/module/kanban/lang/en.php b/module/kanban/lang/en.php index 33b350d8f6..5debde3b40 100644 --- a/module/kanban/lang/en.php +++ b/module/kanban/lang/en.php @@ -216,8 +216,13 @@ $lang->kanban->error->childLimitNote = 'The sum of products in the child colu $lang->kanban->error->importObjNotEmpty = 'Please select at least one import object.'; $lang->kanban->error->childLimitEmpty = 'Please set the WIP quantity of the sub column before operation.'; -$lang->kanban->orderList['pri_asc'] = 'Story Priority Ascending'; -$lang->kanban->orderList['pri_desc'] = 'Story Priority Descending'; +$lang->kanban->orderList['pri_asc'] = 'Story Priority Ascending'; +$lang->kanban->orderList['pri_desc'] = 'Story Priority Descending'; +$lang->kanban->orderList['id_asc'] = 'Story ID Ascending'; +$lang->kanban->orderList['id_desc'] = 'Story ID Descending'; +$lang->kanban->orderList['stage_asc'] = 'Story Stage Ascending'; +$lang->kanban->orderList['stage_desc'] = 'Story Stage Descending'; +$lang->kanban->orderList['assignedTo'] = 'Assigned To'; $lang->kanban->importList = array(); $lang->kanban->importList['off'] = 'Import is not enabled'; diff --git a/module/kanban/lang/fr.php b/module/kanban/lang/fr.php index 98068f4554..f51ae42a87 100644 --- a/module/kanban/lang/fr.php +++ b/module/kanban/lang/fr.php @@ -216,8 +216,13 @@ $lang->kanban->error->childLimitNote = 'The sum of products in the child colu $lang->kanban->error->importObjNotEmpty = 'Please select at least one import object.'; $lang->kanban->error->childLimitEmpty = 'Please set the WIP quantity of the sub column before operation.'; -$lang->kanban->orderList['pri_asc'] = 'Story Priorité Ascendante'; -$lang->kanban->orderList['pri_desc'] = 'Story Priorité Descendante'; +$lang->kanban->orderList['pri_asc'] = 'Story Priorité Ascendante'; +$lang->kanban->orderList['pri_desc'] = 'Story Priorité Descendante'; +$lang->kanban->orderList['id_asc'] = 'Story ID Ascending'; +$lang->kanban->orderList['id_desc'] = 'Story ID Descending'; +$lang->kanban->orderList['stage_asc'] = 'Story Stage Ascending'; +$lang->kanban->orderList['stage_desc'] = 'Story Stage Descending'; +$lang->kanban->orderList['assignedTo'] = 'Assigned To'; $lang->kanban->importList = array(); $lang->kanban->importList['off'] = 'Import is not enabled'; diff --git a/module/kanban/lang/zh-cn.php b/module/kanban/lang/zh-cn.php index 199330b009..4476875b89 100644 --- a/module/kanban/lang/zh-cn.php +++ b/module/kanban/lang/zh-cn.php @@ -216,8 +216,13 @@ $lang->kanban->error->childLimitNote = '子列在制品数量之和不能大 $lang->kanban->error->importObjNotEmpty = '请至少选择一个导入对象'; $lang->kanban->error->childLimitEmpty = '请先设置子列的在制品数量后再操作'; -$lang->kanban->orderList['pri_asc'] = '需求优先级正序排序'; -$lang->kanban->orderList['pri_desc'] = '需求优先级倒序排序'; +$lang->kanban->orderList['pri_asc'] = '需求优先级正序'; +$lang->kanban->orderList['pri_desc'] = '需求优先级倒序'; +$lang->kanban->orderList['id_asc'] = '需求ID正序'; +$lang->kanban->orderList['id_desc'] = '需求ID倒序'; +$lang->kanban->orderList['stage_asc'] = '需求阶段正序'; +$lang->kanban->orderList['stage_desc'] = '需求阶段倒序'; +$lang->kanban->orderList['assignedTo'] = '指派给'; $lang->kanban->importList = array(); $lang->kanban->importList['off'] = '不启用导入功能';