* Finish task #79664.
This commit is contained in:
@@ -546,7 +546,7 @@ $lang->resource->story->batchChangeModule = 'batchChangeModule';
|
||||
$lang->resource->story->batchToTask = 'batchToTask';
|
||||
$lang->resource->story->processStoryChange = 'processStoryChange';
|
||||
$lang->resource->story->linkStories = 'linkStoriesAB';
|
||||
$lang->resource->story->relieved = 'relievedSiblings';
|
||||
$lang->resource->story->relieved = 'relievedTwins';
|
||||
|
||||
$lang->story->methodOrder[5] = 'create';
|
||||
$lang->story->methodOrder[10] = 'batchCreate';
|
||||
|
||||
+23
-5
@@ -7,6 +7,25 @@ $(function()
|
||||
{
|
||||
$('#consumedSpan').parent().find('button').attr('disabled','disabled')
|
||||
}
|
||||
|
||||
$('#mode').change(function()
|
||||
{
|
||||
var mode = $(this).val();
|
||||
if(mode != 'single')
|
||||
{
|
||||
$('#assignedTo').attr('disabled', 'disabled').trigger('chosen:updated')
|
||||
$('.team-group').removeClass('hidden');
|
||||
$('#estimate').attr('disabled', 'disabled')
|
||||
$('#left').attr('disabled', 'disabled')
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#assignedTo').removeAttr('disabled').trigger('chosen:updated')
|
||||
$('.team-group').addClass('hidden');
|
||||
$('#estimate').attr('disabled', false)
|
||||
$('#left').attr('disabled', false)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
/**
|
||||
@@ -118,7 +137,7 @@ $('#confirmButton').click(function()
|
||||
var $left = $tr.find('[name^=teamLeft]');
|
||||
var left = parseFloat($left.val());
|
||||
if(!isNaN(left)) totalLeft += left;
|
||||
if(!$left.prop('readonly') && (isNaN(left) || left <= 0))
|
||||
if(!$left.prop('readonly') && (isNaN(left) || left <= 0) && team.length > 0)
|
||||
{
|
||||
bootbox.alert(account + ' ' + leftNotEmpty);
|
||||
error = true;
|
||||
@@ -165,12 +184,11 @@ $('#confirmButton').click(function()
|
||||
function updateAssignedTo()
|
||||
{
|
||||
var html = '';
|
||||
var multiple = $('#multiple').prop('checked');
|
||||
var mode = $('#mode').val();
|
||||
var assignedTo = $('#assignedTo').val();
|
||||
if(multiple)
|
||||
if(mode != 'single')
|
||||
{
|
||||
var isTeamMember = false;
|
||||
var mode = $('#mode').val();
|
||||
$('select[name^=team]').each(function()
|
||||
{
|
||||
if($(this).find('option:selected').text() == '') return;
|
||||
@@ -202,6 +220,6 @@ function updateAssignedTo()
|
||||
}
|
||||
|
||||
$('#assignedTo').html(html);
|
||||
if(multiple && mode == 'linear' && $('#modalTeam tr.member-doing').length == 0 && $('#modalTeam tr.member-wait').length >= 1) $('[name=assignedTo]').val($('#modalTeam tr.member-wait:first').find('select[name^=team]:first').val());
|
||||
if(mode != 'single' && mode == 'linear' && $('#modalTeam tr.member-doing').length == 0 && $('#modalTeam tr.member-wait').length >= 1) $('[name=assignedTo]').val($('#modalTeam tr.member-wait:first').find('select[name^=team]:first').val());
|
||||
$('#assignedTo').trigger('chosen:updated');
|
||||
}
|
||||
|
||||
@@ -215,6 +215,10 @@ $lang->task->reasonList['cancel'] = 'Abgebrochen';
|
||||
$lang->task->modeList['linear'] = 'Multiple Person Serial';
|
||||
$lang->task->modeList['multi'] = 'Multiple Person Parallel';
|
||||
|
||||
$lang->task->editModeList['single'] = 'Single';
|
||||
$lang->task->editModeList['linear'] = 'Serial';
|
||||
$lang->task->editModeList['multi'] = 'Parallel';
|
||||
|
||||
$lang->task->afterChoices['continueAdding'] = ' Weitere Aufgaben erfassen';
|
||||
$lang->task->afterChoices['toTaskList'] = 'Zurück zur Aufgabenliste';
|
||||
$lang->task->afterChoices['toStoryList'] = 'Zurück zur Storyliste';
|
||||
|
||||
@@ -215,6 +215,10 @@ $lang->task->reasonList['cancel'] = 'Cancelled';
|
||||
$lang->task->modeList['linear'] = 'Multiple Person Serial';
|
||||
$lang->task->modeList['multi'] = 'Multiple Person Parallel';
|
||||
|
||||
$lang->task->editModeList['single'] = 'Single';
|
||||
$lang->task->editModeList['linear'] = 'Serial';
|
||||
$lang->task->editModeList['multi'] = 'Parallel';
|
||||
|
||||
$lang->task->afterChoices['continueAdding'] = ' Continue Adding Tasks';
|
||||
$lang->task->afterChoices['toTaskList'] = 'Go to Task List';
|
||||
$lang->task->afterChoices['toStoryList'] = 'Go to Story List';
|
||||
|
||||
@@ -215,6 +215,10 @@ $lang->task->reasonList['cancel'] = '已取消';
|
||||
$lang->task->modeList['linear'] = '多人串行';
|
||||
$lang->task->modeList['multi'] = '多人并行';
|
||||
|
||||
$lang->task->editModeList['single'] = '单人任务';
|
||||
$lang->task->editModeList['linear'] = '多人串行';
|
||||
$lang->task->editModeList['multi'] = '多人并行';
|
||||
|
||||
$lang->task->afterChoices['continueAdding'] = "继续为该{$lang->SRCommon}添加任务";
|
||||
$lang->task->afterChoices['toTaskList'] = '返回任务列表';
|
||||
$lang->task->afterChoices['toStoryList'] = "返回{$lang->SRCommon}列表";
|
||||
|
||||
@@ -1094,6 +1094,7 @@ class taskModel extends model
|
||||
->setIF(strpos($this->config->task->edit->requiredFields, 'story') !== false, 'story', $this->post->story)
|
||||
->setIF($this->post->story != false and $this->post->story != $oldTask->story, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
|
||||
|
||||
->setIF($this->post->mode == 'single', 'mode', '')
|
||||
->setIF($this->post->status == 'done', 'left', 0)
|
||||
->setIF($this->post->status == 'done' and !$this->post->finishedBy, 'finishedBy', $this->app->user->account)
|
||||
->setIF($this->post->status == 'done' and !$this->post->finishedDate, 'finishedDate', $now)
|
||||
@@ -1193,6 +1194,11 @@ class taskModel extends model
|
||||
$this->dao->update(TABLE_TASK)->set('designVersion')->eq($design->version)->where('id')->eq($taskID)->exec();
|
||||
}
|
||||
|
||||
if($_POST['mode'] == 'single')
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_TASKTEAM)->where('task')->eq($taskID)->exec();
|
||||
}
|
||||
|
||||
/* Record task version. */
|
||||
if(isset($task->version) and $task->version > $oldTask->version)
|
||||
{
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
<?php js::set('currentUser', $app->user->account);?>
|
||||
<?php js::set('team', $task->members);?>
|
||||
<?php js::set('members', $members);?>
|
||||
<?php js::set('page', 'edit');?>
|
||||
<?php js::set('confirmChangeExecution', $lang->task->confirmChangeExecution);?>
|
||||
|
||||
<?php js::set('teamMemberError', $lang->task->error->teamMember);?>
|
||||
<?php js::set('totalLeftError', sprintf($this->lang->task->error->leftEmptyAB, $this->lang->task->statusList[$task->status]));?>
|
||||
<?php js::set('estimateNotEmpty', sprintf($lang->error->gt, $lang->task->estimate, '0'))?>
|
||||
@@ -52,25 +52,15 @@ foreach(explode(',', $config->task->edit->requiredFields) as $field)
|
||||
<div class='detail-title'><?php echo $lang->task->name;?></div>
|
||||
<div class='detail-content'>
|
||||
<div class='form-group'>
|
||||
<div class='<?php if(empty($task->children) and empty($task->parent) and $task->type != 'affair') echo 'input-group';?>'>
|
||||
<div class="input-control has-icon-right">
|
||||
<div class="colorpicker">
|
||||
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown" title="<?php echo $lang->task->colorTag ?>"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
|
||||
<ul class="dropdown-menu clearfix">
|
||||
<li class="heading"><?php echo $lang->task->colorTag;?><i class="icon icon-close"></i></li>
|
||||
</ul>
|
||||
<input type="hidden" class="colorpicker" id="color" name="color" value="<?php echo $task->color ?>" data-icon="color" data-wrapper="input-control-icon-right" data-update-color=".task-name" data-provide="colorpicker">
|
||||
</div>
|
||||
<?php echo html::input('name', $task->name, 'class="form-control task-name" placeholder="' . $lang->task->name . '"');?>
|
||||
<div class="input-control has-icon-right">
|
||||
<div class="colorpicker">
|
||||
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown" title="<?php echo $lang->task->colorTag ?>"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
|
||||
<ul class="dropdown-menu clearfix">
|
||||
<li class="heading"><?php echo $lang->task->colorTag;?><i class="icon icon-close"></i></li>
|
||||
</ul>
|
||||
<input type="hidden" class="colorpicker" id="color" name="color" value="<?php echo $task->color ?>" data-icon="color" data-wrapper="input-control-icon-right" data-update-color=".task-name" data-provide="colorpicker">
|
||||
</div>
|
||||
<?php if(empty($task->children) and empty($task->parent) and $task->type != 'affair'):?>
|
||||
<span class='input-group-addon'>
|
||||
<div class='checkbox-primary'>
|
||||
<input type='checkBox' name='multiple' id='multiple' value='1' disabled <?php echo empty($task->team) ? '' : 'checked';?> />
|
||||
<label for='multiple'><?php echo $lang->task->multipleAB;?></label>
|
||||
</div>
|
||||
</span>
|
||||
<?php endif;?>
|
||||
<?php echo html::input('name', $task->name, 'class="form-control task-name" placeholder="' . $lang->task->name . '"');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -140,6 +130,10 @@ foreach(explode(',', $config->task->edit->requiredFields) as $field)
|
||||
<td><?php echo html::select('parent', $tasks, $task->parent, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr class="modeBox">
|
||||
<th><?php echo $lang->task->mode;?></th>
|
||||
<td><?php echo $task->status == 'wait' ? html::select('mode', $lang->task->editModeList, $task->mode, "class='form-control chosen'") : zget($lang->task->editModeList, $task->mode);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->assignedTo;?></th>
|
||||
<?php $disableAssignedTo = (!empty($task->team) and $task->mode == 'linear') ? "disabled='disabled'" : '';?>
|
||||
@@ -159,15 +153,13 @@ foreach(explode(',', $config->task->edit->requiredFields) as $field)
|
||||
$taskMembers = $members;
|
||||
}
|
||||
?>
|
||||
<td><span id="assignedToIdBox"><?php echo html::select('assignedTo', $taskMembers, $task->assignedTo, "class='form-control chosen' {$disableAssignedTo}");?></span></td>
|
||||
</tr>
|
||||
<tr class="modeBox <?php echo $task->mode ? '' : 'hidden';?>">
|
||||
<th><?php echo $lang->task->mode;?></th>
|
||||
<td><?php echo zget($lang->task->modeList, $task->mode) . html::hidden('mode', $task->mode);?></td>
|
||||
</tr>
|
||||
<tr class='<?php echo empty($task->team) ? 'hidden' : ''?>' id='teamTr'>
|
||||
<th><?php echo $lang->task->team;?></th>
|
||||
<td><?php echo html::a('#modalTeam', $lang->task->team, '', "class='form-control btn' data-toggle='modal'");?></td>
|
||||
<td>
|
||||
<div class='input-group' id='assignedToIdBox'>
|
||||
<?php $hiddenTeam = $task->mode != '' ? '' : 'hidden';?>
|
||||
<?php echo html::select('assignedTo', $taskMembers, $task->assignedTo, "class='form-control chosen' {$disableAssignedTo}");?>
|
||||
<span class="input-group-btn team-group <?php echo $hiddenTeam;?>"><a class="btn br-0" href="#modalTeam" data-toggle="modal"><?php echo $lang->task->team;?></a></span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->type;?></th>
|
||||
|
||||
@@ -87,7 +87,7 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal
|
||||
<i class="icon icon-angle-down <?php echo $hiddenArrow;?>"></i>
|
||||
</td>
|
||||
<td class='w-240px'>
|
||||
<?php echo html::select("team[]", $members, '', "class='form-control chosen' data-placeholder='{$lang->task->assignedTo}'")?>
|
||||
<?php echo html::select("team[]", $members, isset($task->assignedTo) ? $task->assignedTo : '', "class='form-control chosen' data-placeholder='{$lang->task->assignedTo}'")?>
|
||||
<?php echo html::hidden("teamSource[]", '');?>
|
||||
</td>
|
||||
<td class='hourBox'>
|
||||
@@ -341,7 +341,7 @@ $(document).ready(function()
|
||||
$(this).find('option:disabled').removeAttr('disabled').trigger("chosen:updated");
|
||||
})
|
||||
}
|
||||
if($('#teamMember').val() != '') $taskTeamEditor.find('tfoot .btn').click();
|
||||
if($('#teamMember').val() != '' && page != 'edit') $taskTeamEditor.find('tfoot .btn').click();
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
@@ -339,9 +339,9 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->team?></th>
|
||||
<th class='text-center c-hours'><?php echo $lang->task->estimate?></th>
|
||||
<th class='text-center c-hours'><?php echo $lang->task->consumed?></th>
|
||||
<th class='text-center c-hours'><?php echo $lang->task->left?></th>
|
||||
<th class='text-center c-hours'><?php echo $lang->task->estimateAB?></th>
|
||||
<th class='text-center c-hours'><?php echo $lang->task->consumedAB?></th>
|
||||
<th class='text-center c-hours'><?php echo $lang->task->leftAB?></th>
|
||||
<th class='text-center'><?php echo $lang->statusAB;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
Reference in New Issue
Block a user