Merge branch 'sprint/hufangzhou_feedback_863' into 'master'
* Handle feedback #863. See merge request easycorp/zentaopms!5438
This commit is contained in:
@@ -169,6 +169,7 @@ $filter->execution->export = new stdclass();
|
||||
$filter->tree->browse = new stdclass();
|
||||
$filter->productplan->browse = new stdclass();
|
||||
$filter->kanban->space = new stdclass();
|
||||
$filter->execution->kanban = new stdclass();
|
||||
|
||||
$filter->index->index->get['open'] = 'reg::base64';
|
||||
|
||||
@@ -300,6 +301,7 @@ $filter->execution->story->cookie['storyProductParam'] = 'int';
|
||||
$filter->execution->story->cookie['storyBranchParam'] = 'int';
|
||||
$filter->execution->story->cookie['executionStoryOrder'] = 'code';
|
||||
$filter->execution->export->cookie['checkedItem'] = 'reg::checked';
|
||||
$filter->execution->kanban->cookie['taskToOpen'] = 'int';
|
||||
|
||||
$filter->testcase->browse->cookie['caseModule'] = 'int';
|
||||
$filter->testcase->browse->cookie['caseSuite'] = 'int';
|
||||
|
||||
@@ -2365,10 +2365,10 @@ class execution extends control
|
||||
/**
|
||||
* Kanban.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $browseType
|
||||
* @param string $orderBy
|
||||
* @param string $groupBy
|
||||
* @param int $executionID
|
||||
* @param string $browseType
|
||||
* @param string $orderBy
|
||||
* @param string $groupBy
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -2422,7 +2422,6 @@ class execution extends control
|
||||
}
|
||||
foreach($products as $product) $productNames[$product->id] = $product->name;
|
||||
|
||||
|
||||
$plans = $this->execution->getPlans($products, 'skipParent', $executionID);
|
||||
$allPlans = array('' => '');
|
||||
if(!empty($plans))
|
||||
@@ -2430,6 +2429,9 @@ class execution extends control
|
||||
foreach($plans as $plan) $allPlans += $plan;
|
||||
}
|
||||
|
||||
$taskToOpen = !empty($_COOKIE['taskToOpen']) ? $_COOKIE['taskToOpen'] : 0;
|
||||
setcookie('taskToOpen', 0, time() - 3600, $this->config->webRoot, '', $this->config->cookieSecure, true);
|
||||
|
||||
$this->view->title = $this->lang->kanban->view;
|
||||
$this->view->users = $users;
|
||||
$this->view->regions = $kanbanData;
|
||||
@@ -2448,6 +2450,7 @@ class execution extends control
|
||||
$this->view->kanbanData = $kanbanData;
|
||||
$this->view->executionActions = $executionActions;
|
||||
$this->view->kanban = $this->lang->execution->kanban;
|
||||
$this->view->taskToOpen = $taskToOpen;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -304,4 +304,33 @@ js::set('priv',
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('taskToOpen', $taskToOpen);?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
/* Open the task details popup from dynamic. */
|
||||
if(taskToOpen)
|
||||
{
|
||||
var kanban = document.querySelector('#kanban');
|
||||
var observer = new MutationObserver(function (mutationsList, observer)
|
||||
{
|
||||
for(var mutation of mutationsList)
|
||||
{
|
||||
var target = mutation.target;
|
||||
if(mutation.type == 'childList' && target.tagName.toLowerCase() == 'a' && target.classList.contains('title') && target.parentElement.parentElement.dataset.id == taskToOpen && target.parentElement.className.includes('kanban-item-task'))
|
||||
{
|
||||
var a = document.querySelector('[data-id="' + taskToOpen +'"] a.title');
|
||||
if(a)
|
||||
{
|
||||
observer.disconnect();
|
||||
a.click();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
observer.observe(kanban, {subtree: true, childList: true});
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -941,7 +941,11 @@ class task extends control
|
||||
}
|
||||
|
||||
$execution = $this->execution->getById($task->execution);
|
||||
if(!isonlybody() and $execution->type == 'kanban') return print(js::locate($this->createLink('execution', 'kanban', "executionID=$execution->id")));
|
||||
if(!isonlybody() and $execution->type == 'kanban')
|
||||
{
|
||||
setcookie('taskToOpen', $taskID, 0, $this->config->webRoot, '', false, true);
|
||||
return print(js::locate($this->createLink('execution', 'kanban', "executionID=$execution->id")));
|
||||
}
|
||||
|
||||
$this->session->project = $task->project;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user