* Refresh block when finished todo.
This commit is contained in:
@@ -455,6 +455,7 @@ class bug extends control
|
||||
{
|
||||
$builds = $this->loadModel('build')->getExecutionBuildPairs($executionID, $productID, $branch, 'noempty,noterminate,nodone');
|
||||
$stories = $this->story->getExecutionStoryPairs($executionID);
|
||||
if(!$projectID) $projectID = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch('project');
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -496,6 +497,18 @@ class bug extends control
|
||||
$projects += $this->product->getProjectPairsByProduct($productID, $branch);
|
||||
}
|
||||
|
||||
/* Get block id of assinge to me. */
|
||||
$blockID = 0;
|
||||
if(isonlybody())
|
||||
{
|
||||
$blockID = $this->dao->select('id')->from(TABLE_BLOCK)
|
||||
->where('block')->eq('assingtome')
|
||||
->andWhere('module')->eq('my')
|
||||
->andWhere('account')->eq($this->app->user->account)
|
||||
->orderBy('order_desc')
|
||||
->fetch('id');
|
||||
}
|
||||
|
||||
/* Get executions. */
|
||||
$executions = array('' => '');
|
||||
if(isset($projects[$projectID])) $executions += $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID);
|
||||
@@ -541,6 +554,7 @@ class bug extends control
|
||||
$this->view->type = $type;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->branches = $branches;
|
||||
$this->view->blockID = $blockID;
|
||||
$this->view->color = $color;
|
||||
$this->view->stepsRequired = strpos($this->config->bug->create->requiredFields, 'steps');
|
||||
$this->view->isStepsTemplate = $steps == $this->lang->bug->tplStep . $this->lang->bug->tplResult . $this->lang->bug->tplExpect ? true : false;
|
||||
|
||||
@@ -144,3 +144,7 @@ $(function()
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(window).unload(function(){
|
||||
if(blockID) window.parent.refreshBlock($('#block' + blockID));
|
||||
});
|
||||
|
||||
@@ -24,6 +24,7 @@ js::set('stepsRequired', $stepsRequired);
|
||||
js::set('stepsNotEmpty', $lang->bug->stepsNotEmpty);
|
||||
js::set('isStepsTemplate', $isStepsTemplate);
|
||||
js::set('oldProjectID', $projectID);
|
||||
js::set('blockID', $blockID);
|
||||
?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="center-block">
|
||||
|
||||
@@ -267,6 +267,18 @@ class story extends control
|
||||
}
|
||||
}
|
||||
|
||||
/* Get block id of assinge to me. */
|
||||
$blockID = 0;
|
||||
if(isonlybody())
|
||||
{
|
||||
$blockID = $this->dao->select('id')->from(TABLE_BLOCK)
|
||||
->where('block')->eq('assingtome')
|
||||
->andWhere('module')->eq('my')
|
||||
->andWhere('account')->eq($this->app->user->account)
|
||||
->orderBy('order_desc')
|
||||
->fetch('id');
|
||||
}
|
||||
|
||||
/* Set Custom. */
|
||||
foreach(explode(',', $this->config->story->list->customCreateFields) as $field) $customFields[$field] = $this->lang->story->$field;
|
||||
$this->view->customFields = $customFields;
|
||||
@@ -297,6 +309,7 @@ class story extends control
|
||||
$this->view->verify = $verify;
|
||||
$this->view->keywords = $keywords;
|
||||
$this->view->mailto = $mailto;
|
||||
$this->view->blockID = $blockID;
|
||||
$this->view->URS = $type == 'story' ? $this->story->getRequierements($productID) : '';
|
||||
$this->view->needReview = ($this->app->user->account == $product->PO || $executionID > 0 || $this->config->story->needReview == 0) ? "checked='checked'" : "";
|
||||
$this->view->type = $type;
|
||||
|
||||
@@ -21,3 +21,7 @@ function refreshPlan()
|
||||
{
|
||||
$('a.refresh').click();
|
||||
}
|
||||
|
||||
$(window).unload(function(){
|
||||
if(blockID) window.parent.refreshBlock($('#block' + blockID));
|
||||
});
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<?php js::set('holders', $lang->story->placeholder); ?>
|
||||
<?php js::set('blockID', $blockID); ?>
|
||||
<?php if(common::checkNotCN()):?>
|
||||
<style> .sourceTd > .input-group > .input-group > .input-group-addon:first-child{padding: 5px 18px} </style>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -192,6 +192,18 @@ class task extends control
|
||||
}
|
||||
$stories = $this->story->getExecutionStoryPairs($executionID, 0, 0, $moduleIdList, 'full', 'unclosed');
|
||||
|
||||
/* Get block id of assinge to me. */
|
||||
$blockID = 0;
|
||||
if(isonlybody())
|
||||
{
|
||||
$blockID = $this->dao->select('id')->from(TABLE_BLOCK)
|
||||
->where('block')->eq('assingtome')
|
||||
->andWhere('module')->eq('my')
|
||||
->andWhere('account')->eq($this->app->user->account)
|
||||
->orderBy('order_desc')
|
||||
->fetch('id');
|
||||
}
|
||||
|
||||
$title = $execution->name . $this->lang->colon . $this->lang->task->create;
|
||||
$position[] = html::a($taskLink, $execution->name);
|
||||
$position[] = $this->lang->task->common;
|
||||
@@ -214,6 +226,7 @@ class task extends control
|
||||
$this->view->stories = $stories;
|
||||
$this->view->testStoryIdList = $this->loadModel('story')->getTestStories(array_keys($stories), $execution->id);
|
||||
$this->view->members = $members;
|
||||
$this->view->blockID = $blockID;
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -474,3 +474,7 @@ $('#modalTeam .btn').click(function()
|
||||
$('#estimate').val(time);
|
||||
})
|
||||
});
|
||||
|
||||
$(window).unload(function(){
|
||||
if(blockID) window.parent.refreshBlock($('#block' + blockID));
|
||||
});
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php include '../../common/view/sortable.html.php';?>
|
||||
<?php js::set('toTaskList', !empty($task->id));?>
|
||||
<?php js::set('blockID', $blockID);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
|
||||
Reference in New Issue
Block a user