Merge branch 'sprint/191_liumengyi_fixbug' into 'master'
* Fix bug for kanban closed and bug batch assign. See merge request easycorp/zentaopms!3527
This commit is contained in:
@@ -1446,7 +1446,7 @@ class bug extends control
|
||||
$this->loadModel('score')->create('ajax', 'batchOther');
|
||||
}
|
||||
|
||||
if($type == 'product' || $type == 'my') return print(js::locate($this->session->bugList, 'parent'));
|
||||
if($type == 'product' || $type == 'my') return print(js::reload('parent'));
|
||||
if($type == 'execution') return print(js::locate($this->createLink('execution', 'bug', "executionID=$objectID")));
|
||||
if($type == 'project') return print(js::locate($this->createLink('project', 'bug', "projectID=$objectID")));
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ function renderHeaderCol($column, column, $header, kanbanData)
|
||||
}
|
||||
|
||||
var moreAction = ' <button class="btn btn-link action" title="' + kanbanLang.moreAction + '" data-contextmenu="column" data-column="' + column.id + '"><i class="icon icon-ellipsis-v"></i></button>';
|
||||
$actions.html(addItemBtn + moreAction);
|
||||
if(CRKanban || kanban.status != 'closed') $actions.html(addItemBtn + moreAction);
|
||||
|
||||
}
|
||||
if(columnPrivs.includes('sortColumn'))
|
||||
@@ -219,7 +219,7 @@ function renderLaneName($lane, lane, $kanban, columns, kanban)
|
||||
|
||||
$lane.parent().toggleClass('sort', canSort);
|
||||
|
||||
if(!$lane.children('.actions').length && (canSet || canDelete))
|
||||
if(!$lane.children('.actions').length && (canSet || canDelete) && (CRKanban || kanbanInfo.status != 'closed') )
|
||||
{
|
||||
$([
|
||||
'<div class="actions" title="' + kanbanLang.more + '">',
|
||||
@@ -286,7 +286,7 @@ function renderKanbanItem(item, $item)
|
||||
var printMoreBtn = (privs.includes('editCard') || privs.includes('archiveCard') || privs.includes('copyCard') || privs.includes('deleteCard') || privs.includes('moveCard') || privs.includes('setCardColor'));
|
||||
var $actions = $item.children('.actions');
|
||||
var $title = $item.children('.title');
|
||||
if(printMoreBtn && !$actions.length)
|
||||
if(printMoreBtn && !$actions.length && (CRKanban || kanban.status != 'closed'))
|
||||
{
|
||||
$(
|
||||
[
|
||||
@@ -962,7 +962,7 @@ function findDropColumns($element, $root)
|
||||
|
||||
return $root.find('.kanban-lane-col:not([data-type="EMPTY"],[data-type=""])').filter(function()
|
||||
{
|
||||
if($.cookie('isFullScreen') == 1 || (!CRKanban && kanban.status == 'closed')) return false;
|
||||
if($.cookie('isFullScreen') == 1 || (!CRKanban && kanbanInfo.status == 'closed')) return false;
|
||||
var $newCol = $(this);
|
||||
var newCol = $newCol.data();
|
||||
var $newLane = $newCol.closest('.kanban-lane');
|
||||
@@ -1309,6 +1309,8 @@ $(function()
|
||||
{
|
||||
window.isMultiLanes = laneCount > 1;
|
||||
|
||||
$.cookie('isFullScreen', 0);
|
||||
|
||||
/* Init first kanban */
|
||||
$('.kanban').each(function()
|
||||
{
|
||||
@@ -1419,20 +1421,14 @@ $(function()
|
||||
initSortable();
|
||||
|
||||
resetRegionHeight('open');
|
||||
|
||||
if(!CRKanban && kanban.status == "closed")
|
||||
{
|
||||
fullScreen();
|
||||
$.cookie('isFullScreen', 0);
|
||||
$('.region-actions > div > .action').show();
|
||||
$(".title").attr("disabled", false).css("pointer-events", "auto");
|
||||
}
|
||||
if(!CRKanban && kanbanInfo.status == 'closed') $('.kanban-col.kanban-header-col').css('padding', '0px 0px 0px 0px');
|
||||
});
|
||||
|
||||
function initSortable()
|
||||
{
|
||||
var sortType = '';
|
||||
var $cards = null;
|
||||
if(!CRKanban && kanbanInfo.status == 'closed') return;
|
||||
$('#kanban').sortable(
|
||||
{
|
||||
selector: '.region, .kanban-board, .kanban-lane, .kanban-col',
|
||||
|
||||
@@ -24,6 +24,7 @@ js::set('vision', $this->config->vision);
|
||||
js::set('CRKanban', isset($this->config->CRKanban) ? $this->config->CRKanban : 1);
|
||||
js::set('regions', $regions);
|
||||
js::set('kanban', $kanban);
|
||||
js::set('kanbanInfo', $kanban);
|
||||
js::set('kanbanLang', $lang->kanban);
|
||||
js::set('kanbanlaneLang', $lang->kanbanlane);
|
||||
js::set('kanbancolumnLang', $lang->kanbancolumn);
|
||||
@@ -58,7 +59,7 @@ $canCreateLane = commonModel::hasPriv('kanban', 'createLane');
|
||||
<strong><?php echo $region->name;?></strong>
|
||||
<a class="text-muted"><i class="icon icon-chevron-double-up" data-id="<?php echo $region->id;?>"></i></a>
|
||||
<div class='region-actions'>
|
||||
<?php if($canEditRegion || $canCreateLane || $canDeleteRegion):?>
|
||||
<?php if(($canEditRegion || $canCreateLane || $canDeleteRegion) and !(isset($this->config->CRKanban) and $this->config->CRKanban == '0' and $kanban->status == 'closed')):?>
|
||||
<button class="btn btn-link action" type="button" data-toggle="dropdown"><i class="icon icon-ellipsis-v"></i></button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<?php if($canEditRegion) echo '<li>' . html::a(inlink('editRegion', "regionID={$region->id}", '', 1), '<i class="icon icon-edit"></i>' . $this->lang->kanban->editRegion, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
|
||||
|
||||
Reference in New Issue
Block a user