Merge branch 'sprint/224_liumengyi_fixissue' into 'master'
* Fix issue #709. See merge request easycorp/zentaopms!4833
This commit is contained in:
@@ -761,14 +761,15 @@ function renderCount($count, count, column)
|
||||
{
|
||||
if(groupBy == 'story' && column.type == 'story')
|
||||
{
|
||||
var orderButton = '<button class="btn btn-link action storyColumn" type="button" data-toggle="dropdown">'
|
||||
+ ' <span class="text">' + (kanbanLang.orderList[orderBy] == undefined ? kanbanLang.orderList['pri_asc'] : kanbanLang.orderList[orderBy]) + '</span><span class="caret"></span>'
|
||||
+ '</button>'
|
||||
var orderButton = '<a class="btn btn-link action storyColumn ' + (changeOrder ? 'text-primary' : '') + '" type="button" data-toggle="dropdown">'
|
||||
+ "<i class='icon icon-swap'></i>"
|
||||
+ '</a>'
|
||||
+ '<ul class="dropdown-menu">';
|
||||
for(var order in kanbanLang.orderList) orderButton += '<li class="' + (order == orderBy ? 'active' : '') + '"><a href="###" onclick="searchCards(rdSearchValue, \'' + order + '\')">' + kanbanLang.orderList[order] + '</a></li>';
|
||||
orderButton += '</ul>';
|
||||
|
||||
$count.prev().replaceWith(orderButton);
|
||||
$count.parent().next().html(orderButton);
|
||||
$count.parent().next().addClass('createButton');
|
||||
$count.remove();
|
||||
return;
|
||||
}
|
||||
@@ -1484,6 +1485,8 @@ $(function()
|
||||
|
||||
if($.cookie('isFullScreen') == 1) $.cookie('isFullScreen', 0);
|
||||
|
||||
changeOrder = false;
|
||||
|
||||
window.kanbanScaleSize = +$.zui.store.get('executionKanbanScaleSize', 1);
|
||||
$('#kanbanScaleSize').text(window.kanbanScaleSize);
|
||||
$('#kanbanScaleControl .btn[data-type="+"]').attr('disabled', window.kanbanScaleSize >= 4 ? 'disabled' : null);
|
||||
@@ -1838,6 +1841,7 @@ function searchCards(value, order = '')
|
||||
{
|
||||
rdSearchValue = value;
|
||||
orderBy = order == '' ? orderBy : order;
|
||||
if(order != '') changeOrder = true;
|
||||
$.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=0&browseType=" + browseType + "&groupBy=" + groupBy + '&from=RD&searchValue=' + rdSearchValue + '&orderBy=' + orderBy), function(data)
|
||||
{
|
||||
lastUpdateData = data;
|
||||
|
||||
@@ -341,15 +341,15 @@ function renderColumnCount($count, count, col)
|
||||
{
|
||||
if(groupBy == 'story' && col.type == 'story')
|
||||
{
|
||||
var orderButton = '<button class="btn btn-link action storyColumn" type="button" data-toggle="dropdown">'
|
||||
+ ' <span class="text">' + (kanbanLang.orderList[orderBy] == undefined ? kanbanLang.orderList['pri_asc'] : kanbanLang.orderList[orderBy]) + '</span><span class="caret"></span>'
|
||||
+ '</button>'
|
||||
var orderButton = '<a class="btn btn-link action storyColumn ' + (changeOrder ? 'text-primary' : '') + '" type="button" data-toggle="dropdown">'
|
||||
+ "<i class='icon icon-swap'></i>"
|
||||
+ '</a>'
|
||||
+ '<ul class="dropdown-menu">';
|
||||
for(var order in kanbanLang.orderList) orderButton += '<li class="' + (order == orderBy ? 'active' : '') + '"><a href="###" onclick="searchCards(searchValue, \'' + order + '\')">' + kanbanLang.orderList[order] + '</a></li>';
|
||||
orderButton += '</ul>';
|
||||
|
||||
$count.siblings('.storyColumn').remove();
|
||||
$count.prev().replaceWith(orderButton);
|
||||
$count.parent().next().html(orderButton);
|
||||
$count.parent().next().addClass('createButton');
|
||||
$count.hide();
|
||||
return;
|
||||
}
|
||||
@@ -1227,6 +1227,7 @@ $(function()
|
||||
$('#kanbanScaleControl .btn[data-type="+"]').attr('disabled', window.kanbanScaleSize >= 4 ? 'disabled' : null);
|
||||
$('#kanbanScaleControl .btn[data-type="-"]').attr('disabled', window.kanbanScaleSize <= 1 ? 'disabled' : null);
|
||||
|
||||
changeOrder = false;
|
||||
/* Common options */
|
||||
var commonOptions =
|
||||
{
|
||||
@@ -1484,6 +1485,7 @@ function searchCards(value, order = '')
|
||||
{
|
||||
searchValue = value;
|
||||
orderBy = order == '' ? orderBy : order;
|
||||
if(order != '') changeOrder = true;
|
||||
$.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=0&browseType=" + browseType + "&groupBy=" + groupBy + '&from=execution&searchValue=' + value + '&orderBy=' + orderBy), function(data)
|
||||
{
|
||||
lastUpdateData = data;
|
||||
|
||||
@@ -1605,7 +1605,7 @@ class kanbanModel extends model
|
||||
{
|
||||
$columnData[0]['id'] = 0;
|
||||
$columnData[0]['type'] = 'story';
|
||||
$columnData[0]['name'] = zget($this->lang->kanban->orderList, $orderBy, '');
|
||||
$columnData[0]['name'] = $this->lang->SRCommon;
|
||||
$columnData[0]['color'] = '#333';
|
||||
$columnData[0]['limit'] = '-1';
|
||||
$columnData[0]['laneType'] = $browseType;
|
||||
|
||||
Reference in New Issue
Block a user