Merge branch 'sprint/wangyidong_bug'

This commit is contained in:
wangyidong
2022-09-19 13:48:27 +08:00
3 changed files with 51 additions and 19 deletions
+4 -4
View File
@@ -1149,7 +1149,7 @@ class task extends control
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
return print(js::reload('parent') . js::execute("parent.parent.updateKanban($kanbanData)"));
}
if($from == 'taskkanban')
{
@@ -1159,9 +1159,9 @@ class task extends control
$kanbanData = $kanbanData[$kanbanType];
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban(\"task\", $kanbanData)"));
return print(js::reload('parent') . js::execute("parent.parent.updateKanban(\"task\", $kanbanData)"));
}
return print(js::closeModal('parent.parent', 'this'));
return print(js::reload('parent') . js::execute("if(typeof(parent.parent.ajaxRefresh) == 'function') parent.parent.ajaxRefresh()"));
}
return print(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
@@ -1199,7 +1199,7 @@ class task extends control
$actionID = $this->loadModel('action')->create('task', $estimate->task, 'EditEstimate', $this->post->work);
$this->action->logHistory($actionID, $changes);
$url = $this->session->estimateList ? $this->session->estimateList : inlink('record', "taskID={$estimate->task}");
$url = $this->session->estimateList ? $this->session->estimateList : inlink('recordEstimate', "taskID={$estimate->task}");
return print(js::locate($url, 'parent'));
}
+17 -3
View File
@@ -1,6 +1,7 @@
$(function()
{
if(config.onlybody == 'yes') $('.main-actions').css('width', '100%');
limitIframeLevel();
});
function assign(taskID, assignedTo)
@@ -10,7 +11,20 @@ function assign(taskID, assignedTo)
$('.assign').load(createLink('user', 'ajaxGetUser', 'taskID=' + taskID + '&assignedTo=' + assignedTo));
}
$(document).ready(function()
/**
* Ajax refresh
*
* @access public
* @return void
*/
function ajaxRefresh()
{
limitIframeLevel();
});
$.get(location.href, function(data)
{
$data = $(data);
$('#actionbox ol.histories-list').html($data.find('#actionbox ol.histories-list').html());
$('.side-col').html($data.find('.side-col').html());
if($('#actionbox ol.histories-list #lastComment').length > 0) $('#actionbox ol.histories-list #lastComment').kindeditor();
});
}
+30 -12
View File
@@ -56,19 +56,23 @@
<td>
<div class='input-group'><?php echo html::input('currentConsumed', 0, "class='form-control'");?> <span class='input-group-addon'><?php echo $lang->task->hour;?></span></div>
</td>
</tr>
<tr>
<th><?php echo empty($task->team) ? $lang->task->consumed : $lang->task->myConsumed;?></th>
<td>
<?php $consumed = empty($task->team) ? $task->consumed : (float)$task->myConsumed;?>
<?php
echo "<span id='totalConsumed'>" . (float)$consumed . "</span> " . $lang->workingHour . html::hidden('consumed', $consumed);
js::set('consumed', $consumed);
?>
<div class='table-row'>
<div class='table-col strong w-80px text-right' style='padding-right:10px'><?php echo empty($task->team) ? $lang->task->consumed : $lang->task->myConsumed;?> </div>
<div class='table-col'>
<?php $consumed = empty($task->team) ? $task->consumed : (float)$task->myConsumed;?>
<?php
echo "<span id='totalConsumed'>" . (float)$consumed . "</span> " . $lang->workingHour . html::hidden('consumed', $consumed);
js::set('consumed', $consumed);
?>
</div>
</div>
</td>
</tr>
<tr>
</tr>
<tr class='<?php if($task->mode == 'multi') echo 'hidden'?>'>
<th><?php echo (!empty($task->team) and $task->mode == 'linear') ? $lang->task->transferTo : $lang->task->assign;?></th>
<th><?php echo $lang->task->assign;?></th>
<td>
<?php
if(!empty($task->team) and $task->mode == 'linear')
@@ -83,11 +87,25 @@
</td>
</tr>
<tr>
<th><?php echo empty($task->team) ? $lang->task->realStarted : $lang->task->my . $lang->task->realStarted;?></th>
<td><div class='datepicker-wrapper'><?php echo html::input('realStarted', $task->realStarted != '0000-00-00 00:00:00' ? $task->realStarted : '', "class='form-control form-datetime'");?></div></td><td></td>
<th><?php echo $lang->task->realStarted;?></th>
<td>
<div class='datepicker-wrapper'>
<?php
$realStarted = $task->realStarted;
$readonly = 'readonly';
if(helper::isZeroDate($realStarted))
{
$realStarted = '';
$readonly = '';
}
?>
<?php echo html::input('realStarted', $realStarted, "class='form-control" . ($readonly ? '' : ' form-datetime') . "' $readonly");?>
</div>
</td>
<td></td>
</tr>
<tr>
<th><?php echo empty($task->team) ? $lang->task->finishedDate : $lang->task->my . $lang->task->finishedDate;?></th>
<th><?php echo $lang->task->finishedDate;?></th>
<td><div class='datepicker-wrapper'><?php echo html::input('finishedDate', helper::now(), "class='form-control form-datetime'");?></div></td><td></td>
</tr>
<tr class='hide'>