Merge branch 'master' into zenops_46

This commit is contained in:
caoyanyi
2022-11-14 08:55:13 +08:00
193 changed files with 2591 additions and 1293 deletions
+1
View File
@@ -62,6 +62,7 @@ class task extends control
$task = new stdClass();
$task->module = $moduleID;
$task->mode = '';
$task->assignedTo = '';
$task->name = '';
$task->story = $storyID;
+27 -17
View File
@@ -27,6 +27,32 @@ $(function()
loadStories(executionID);
})
/**
* Show team menu.
*
* @access public
* @return void
*/
function showTeamMenu()
{
if($('[name^=multiple]').prop('checked'))
{
$('#assignedTo, #assignedTo_chosen').addClass('hidden');
$('#assignedTo').next('.picker').addClass('hidden');
$('.team-group').removeClass('hidden');
$('.modeBox').removeClass('hidden');
$('#estimate').attr('readonly', true);
}
else
{
$('#assignedTo, #assignedTo_chosen').removeClass('hidden');
$('#assignedTo').next('.picker').removeClass('hidden');
$('.team-group').addClass('hidden');
$('.modeBox').addClass('hidden');
$('#estimate').attr('readonly', false);
}
$('#dataPlanGroup').fixInputGroup();
}
/**
* Load module, stories and members.
*
@@ -518,23 +544,7 @@ $(document).ready(function()
/* Show team menu. */
$('[name^=multiple]').change(function()
{
if($(this).prop('checked'))
{
$('#assignedTo, #assignedTo_chosen').addClass('hidden');
$('#assignedTo').next('.picker').addClass('hidden');
$('.team-group').removeClass('hidden');
$('.modeBox').removeClass('hidden');
$('#estimate').attr('readonly', true);
}
else
{
$('#assignedTo, #assignedTo_chosen').removeClass('hidden');
$('#assignedTo').next('.picker').removeClass('hidden');
$('.team-group').addClass('hidden');
$('.modeBox').addClass('hidden');
$('#estimate').attr('readonly', false);
}
$('#dataPlanGroup').fixInputGroup();
showTeamMenu();
});
$('#showAllModule').change(function()
+1
View File
@@ -23,6 +23,7 @@ function ajaxRefresh()
{
$data = $(data);
$('#actionbox ol.histories-list').html($data.find('#actionbox ol.histories-list').html());
$('#actionbox ol.histories-list form.comment-edit-form').ajaxForm();
$('.side-col').html($data.find('.side-col').html());
if($('#actionbox ol.histories-list #lastComment').length > 0) $('#actionbox ol.histories-list #lastComment').kindeditor();
+2 -1
View File
@@ -4067,6 +4067,7 @@ class taskModel extends model
}
}
$list .= '</td>';
if(!empty($execution->division) and $this->app->rawModule == 'project') $list .= '<td></td>';
$list .= "<td class='status-{$task->status} text-center'>" . $this->processStatus('task', $task) . '</td>';
$list .= '<td>' . zget($users, $task->assignedTo, '') . '</td>';
$list .= helper::isZeroDate($task->estStarted) ? '<td class="c-date"></td>' : '<td class="c-date">' . $task->estStarted . '</td>';
@@ -4140,7 +4141,7 @@ class taskModel extends model
$menu .= "<div class='divider'></div>";
$menu .= $this->buildMenu('task', 'edit', $params, $task, 'view', '', '', 'showinonlybody');
if(empty($task->team)) $menu .= $this->buildMenu('task', 'create', "projctID={$task->execution}&storyID=0&moduleID=0&taskID=$task->id", $task, 'view', 'copy');
$menu .= $this->buildMenu('task', 'create', "projctID={$task->execution}&storyID=0&moduleID=0&taskID=$task->id", $task, 'view', 'copy');
$menu .= $this->buildMenu('task', 'delete', "executionID=$task->execution&taskID=$task->id", $task, 'view', 'trash', 'hiddenwin', 'showinonlybody', true);
if($task->parent > 0) $menu .= $this->buildMenu('task', 'view', "taskID=$task->parent", $task, 'view', 'chevron-double-up', '', '', '', '', $this->lang->task->parent);
+4 -4
View File
@@ -43,8 +43,8 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
</div>
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
<table class='table table-form'>
<?php if(($execution->type != 'kanban' or $this->config->vision == 'lite') and $execution->multiple):?>
<tr>
<?php if($execution->type != 'kanban' or $this->config->vision == 'lite'):?>
<tr class="<?php echo !$execution->multiple ? 'hidden' : '';?>">
<th><?php echo $lang->task->execution;?></th>
<td><?php echo html::select('execution', $executions, $execution->id, "class='form-control chosen' onchange='loadAll(this.value)' required");?></td><td></td><td></td>
</tr>
@@ -63,7 +63,7 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
<td id='moduleIdBox'><?php echo html::select('module', $moduleOptionMenu, $task->module, "class='form-control chosen' onchange='setStories(this.value, $execution->id)'");?></td>
<td>
<div class="checkbox-primary c-modulel">
<input type="checkbox" id="showAllModule" <?php if($showAllModule) echo '';?>><label for="showAllModule" class="no-margin"><?php echo $lang->task->allModule;?></label>
<input type="checkbox" id="showAllModule" <?php if($showAllModule) echo 'checked';?>><label for="showAllModule" class="no-margin"><?php echo $lang->task->allModule;?></label>
</div>
</td>
<td></td>
@@ -86,7 +86,7 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
</tr>
<tr class='hidden modeBox'>
<th><?php echo $lang->task->mode;?></th>
<td><?php echo html::select('mode', $lang->task->modeList, '', "class='form-control chosen'");?></td>
<td><?php echo html::select('mode', $lang->task->modeList, $task->mode, "class='form-control chosen'");?></td>
</tr>
<?php if($execution->type == 'kanban'):?>
<tr>
+16 -5
View File
@@ -48,6 +48,12 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal
<?php if($memberDisabled) echo html::hidden("team[]", $member->account);?>
</td>
<td class='hourBox'>
<?php if($app->rawMethod == 'create'):?>
<div class='input-group estimateBox'>
<?php echo html::input("teamEstimate[]", (float)$member->estimate, "class='form-control text-center' placeholder='{$lang->task->estimateAB}'") ?>
<span class='input-group-addon'><?php echo 'h';?></span>
</div>
<?php else:?>
<div class='input-group'>
<div class="input-control has-icon-right">
<?php echo html::input("teamEstimate[]", (float)$member->estimate, "class='form-control text-center' placeholder='{$lang->task->estimate}'" . ($hourDisabled ? ' readonly' : ''))?>
@@ -62,11 +68,12 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal
<label class="input-control-icon-right">h</label>
</div>
</div>
<?php endif;?>
</td>
<td class='w-100px sort-handler'>
<button type="button" <?php echo $memberDisabled ? 'disabled' : '';?> class="btn btn-link btn-sm btn-icon btn-add"><i class="icon icon-plus"></i></button>
<button type="button" <?php echo $memberDisabled ? 'disabled' : '';?> class="btn btn-link btn-sm btn-icon btn-delete"><i class="icon icon-trash"></i></button>
<?php if(isset($task->mode) and $task->mode == 'linear'):?>
<?php if(!empty($task->mode) and $task->mode == 'linear'):?>
<button type="button" <?php echo $sortDisabled ? 'disabled' : '';?> class='btn btn-link btn-sm btn-icon btn-move'><i class='icon-move'></i></button>
<?php endif;?>
</td>
@@ -84,7 +91,7 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal
<?php echo html::hidden("teamSource[]", '');?>
</td>
<td class='hourBox'>
<?php if(empty($task->team)):?>
<?php if(empty($task->team) or $app->rawMethod == 'create'):?>
<div class='input-group estimateBox'>
<?php echo html::input("teamEstimate[]", '', "class='form-control text-center' placeholder='{$lang->task->estimateAB}'") ?>
<span class='input-group-addon'><?php echo 'h';?></span>
@@ -117,7 +124,7 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal
<?php $newRowCount = (!empty($task->team) and count($task->team) < 6) ? 6 - count($task->team) : 1;?>
<?php if(isset($task->status) and $task->status != 'wait' and $task->status != 'doing') $newRowCount = 0;?>
<?php js::set('newRowCount', $newRowCount);?>
<?php if(isset($task->mode) and $task->mode == 'linear') js::set('sortSelector', 'tr.member-wait');?>
<?php if(!empty($task->mode) and $task->mode == 'linear') js::set('sortSelector', 'tr.member-wait');?>
<?php js::set('teamMemberError', $lang->task->error->teamMember);?>
<?php if(isset($task->status)):?>
<?php js::set('taskStatus', $task->status);?>
@@ -133,10 +140,14 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal
<script>
$(document).ready(function()
{
<?php if(!empty($task->mode) and $app->rawMethod == 'create'):?>
$('#multipleBox').attr('checked', 'checked');
showTeamMenu();
<?php endif;?>
$('tr.teamTemplate').closest('tbody.sortable').sortable('destroy');
<?php if(!isset($task->mode) or $task->mode != 'multi'):?>
<?php if(empty($task->mode) or $task->mode != 'multi'):?>
var canSort = false;
var options = {
trigger: '.icon-move',
@@ -176,7 +187,7 @@ $(document).ready(function()
var disableMembers = function()
{
var mode = $('#mode').length > 0 ? $('#mode').val() : '<?php echo (isset($task->mode) ? $task->mode : '')?>';
var mode = $('#mode').length > 0 ? $('#mode').val() : '<?php echo (!empty($task->mode) ? $task->mode : '')?>';
if(mode == 'multi')
{
var members = [];