Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
wangyidong
2016-12-02 09:21:02 +08:00
35 changed files with 126 additions and 116 deletions
+5 -2
View File
@@ -6,6 +6,9 @@
.chosen-container {max-width: 980px}
.minw-80px {min-width: 120px;}
.minw-60px {min-width: 50px;}
#priRowCol, #estRowCol {width: 110px;}
.col-table .input-group {width: 100%}
#taskPlanCol, #mailCol {width: 50%}
#planAndMailCell.has-mail-col #taskPlanCol {padding-right: 5px;}
#planAndMailCell.has-mail-col #taskPlanCol + #mailCol {padding-left: 5px;}
+12 -6
View File
@@ -152,14 +152,20 @@ $(document).ready(function()
$('[data-toggle=tooltip]').tooltip();
/* Code for kanban following codes. */
// ajust style for file box
var ajustFilebox = function()
// adjust form controls layout
var ajustFormControls = function()
{
applyCssStyle('.fileBox > tbody > tr > td:first-child {transition: none; width: ' + ($('#dataPlanGroup').width() - 2) + 'px}', 'filebox')
// adjust style for file box
applyCssStyle('.fileBox > tbody > tr > td:first-child {transition: none; width: ' + ($('#dataPlanGroup').width() - 1) + 'px}', 'filebox');
// adjust #priRowCol and #estRowCol size
var $priRowCol = $('#priRowCol'),
$estRowCol = $('#estRowCol');
$priRowCol.css('width', 54 + $priRowCol.find('.input-group-addon').outerWidth());
$estRowCol.css('width', 55 + $estRowCol.find('.input-group-addon').outerWidth());
};
ajustFilebox();
$(window).resize(ajustFilebox);
ajustFormControls();
$(window).resize(ajustFormControls);
/* First unbind ajaxForm for form.*/
$("form[data-type='ajax']").unbind('submit');
+1
View File
@@ -34,6 +34,7 @@ $lang->task->fromBug = 'From Bug';
$lang->task->case = 'Related Case';
$lang->task->confirmStoryChange = "Confirm Story Change";
$lang->task->progess = 'Progess';
$lang->task->progessTips = 'Consumed/(Consumed+Left)';
$lang->task->common = 'Task';
$lang->task->id = 'ID';
+1
View File
@@ -34,6 +34,7 @@ $lang->task->fromBug = '来源Bug';
$lang->task->case = '相关用例';
$lang->task->confirmStoryChange = "确认需求变动";
$lang->task->progess = '进度';
$lang->task->progessTips = '已消耗/(已消耗+剩余)';
$lang->task->common = '任务';
$lang->task->id = '编号';
+2 -2
View File
@@ -812,7 +812,7 @@ class taskModel extends model
$task->files = $this->loadModel('file')->getByObject('task', $taskID);
/* Get related test cases. */
if($task->story)$this->cases = $this->dao->select('id, title')->from(TABLE_CASE)->where('story')->eq($task->story)->andWhere('storyVersion')->eq($task->storyVersion)->fetchPairs();
if($task->story) $task->cases = $this->dao->select('id, title')->from(TABLE_CASE)->where('story')->eq($task->story)->andWhere('storyVersion')->eq($task->storyVersion)->fetchPairs();
return $this->processTask($task);
}
@@ -1203,7 +1203,7 @@ class taskModel extends model
}
else
{
$task->progess = round($task->consumed / ($task->consumed + $task->left), 3) * 100;
$task->progess = round($task->consumed / ($task->consumed + $task->left), 2) * 100;
}
return $task;
+7 -4
View File
@@ -29,6 +29,9 @@ foreach(explode(',', $showFields) as $field)
{
if($field)$visibleFields[$field] = '';
}
$colspan = count($visibleFields) + 3;
$hiddenStory = (isonlybody() and $storyID) ? ' hidden' : '';
if($hiddenStory and isset($visibleFields['story'])) $colspan -= 1;
?>
<form class='form-condensed' method='post' target='hiddenwin'>
<table class='table table-form table-fixed with-border'>
@@ -36,7 +39,7 @@ foreach(explode(',', $showFields) as $field)
<tr class='text-center'>
<th class='w-30px'><?php echo $lang->idAB;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'module', ' hidden')?>'><?php echo $lang->task->module?></th>
<th class='w-200px<?php echo zget($visibleFields, 'story', ' hidden')?>'><?php echo $lang->task->story;?></th>
<th class='w-200px<?php echo zget($visibleFields, 'story', ' hidden'); echo $hiddenStory;?>'><?php echo $lang->task->story;?></th>
<th><?php echo $lang->task->name;?> <span class='required'></span></th>
<th class='w-80px'><?php echo $lang->typeAB;?> <span class='required'></span></th>
<th class='w-150px<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>'><?php echo $lang->task->assignedTo;?></th>
@@ -72,7 +75,7 @@ foreach(explode(',', $showFields) as $field)
<tr>
<td class='text-center'><?php echo $i+1;?></td>
<td <?php echo zget($visibleFields, 'module', "class='hidden'")?> style='overflow:visible'><?php echo html::select("module[$i]", $modules, $module, "class='form-control chosen' onchange='setStories(this.value, $project->id, $i)'")?></td>
<td <?php echo zget($visibleFields, 'story', "class='hidden'")?> style='overflow: visible'>
<td <?php echo zget($visibleFields, 'story', "class='hidden'"); echo $hiddenStory;?> style='overflow: visible'>
<div class='input-group'>
<?php echo html::select("story[$i]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated($i)'");?>
<span class='input-group-btn'>
@@ -95,7 +98,7 @@ foreach(explode(',', $showFields) as $field)
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pri[$i]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
</tr>
<?php endfor;?>
<tr><td colspan='<?php echo count($visibleFields) + 3?>' class='text-center'><?php echo html::submitButton() . html::backButton();?></td></tr>
<tr><td colspan='<?php echo $colspan?>' class='text-center'><?php echo html::submitButton() . html::backButton();?></td></tr>
</table>
</form>
<table class='hide' id='trTemp'>
@@ -103,7 +106,7 @@ foreach(explode(',', $showFields) as $field)
<tr>
<td class='text-center'>%s</td>
<td <?php echo zget($visibleFields, 'module', "class='hidden'")?> style='overflow:visible'><?php echo html::select("module[%s]", $modules, $module, "class='form-control' onchange='setStories(this.value, $project->id, \"%s\")'")?></td>
<td <?php echo zget($visibleFields, 'story', "class='hidden'")?> style='overflow: visible'>
<td <?php echo zget($visibleFields, 'story', "class='hidden'"); echo $hiddenStory;?> style='overflow: visible'>
<div class='input-group'>
<?php echo html::select("story[%s]", $stories, $currentStory, "class='form-control' onchange='setStoryRelated(\"%s\")'");?>
<span class='input-group-btn'>
+43 -38
View File
@@ -72,11 +72,9 @@
$hiddenPri = strpos(",$showFields,", ',pri,') === false;
$hiddenEst = strpos(",$showFields,", ',estimate,') === false;
?>
<?php if(!$hiddenPri or !$hiddenEst):?>
<?php $widthClass = ($hiddenPri or $hiddenEst) ? 'w-120px' : 'w-250px';?>
<div class='col-table <?php echo $widthClass?>'>
<div class="input-group">
<?php if(!$hiddenPri):?>
<?php if(!$hiddenPri):?>
<div class='col-table' id='priRowCol'>
<div class='input-group'>
<span class='input-group-addon fix-border br-0'><?php echo $lang->task->pri;?></span>
<?php
$hasCustomPri = false;
@@ -90,7 +88,7 @@
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', $lang->task->priList, '', "class='form-control minw-80px'");?>
<?php echo html::select('pri', $lang->task->priList, '', "class='form-control'");?>
<?php else: ?>
<div class='input-group-btn dropdown-pris'>
<button type='button' class='btn dropdown-toggle br-0' data-toggle='dropdown'>
@@ -100,14 +98,18 @@
<?php echo html::select('pri', $lang->task->priList, '', "class='hide'");?>
</div>
<?php endif; ?>
<?php endif?>
<?php if(!$hiddenEst):?>
<span class='input-group-addon fix-border br-0'><?php echo $lang->task->estimateAB;?></span>
<?php echo html::input('estimate', '', "class='form-control minw-60px' placeholder='{$lang->task->hour}'");?>
<?php endif;?>
</div>
</div>
<?php endif;?>
<?php endif; ?>
<?php if(!$hiddenEst):?>
<div class='col-table' id='estRowCol'>
<div class='input-group'>
<span class='input-group-addon fix-border br-0'><?php echo $lang->task->estimateAB;?></span>
<?php echo html::input('estimate', '', "class='form-control' placeholder='{$lang->task->hour}'");?>
</div>
</div>
<?php endif; ?>
</div>
</td>
</tr>
@@ -123,33 +125,36 @@
<?php if(!$hiddenEstStarted or !$hiddenDeadline or !$hiddenMailto):?>
<tr>
<th><?php echo ($hiddenEstStarted and $hiddenDeadline) ? $lang->task->mailto : $lang->task->datePlan;?></th>
<?php if(!$hiddenEstStarted or !$hiddenDeadline):?>
<td colspan='2'>
<div class='input-group' id='dataPlanGroup'>
<?php if(!$hiddenEstStarted):?>
<?php echo html::input('estStarted', $task->estStarted, "class='form-control form-date' placeholder='{$lang->task->estStarted}'");?>
<?php endif;?>
<?php if(!$hiddenEstStarted and !$hiddenDeadline):?>
<span class='input-group-addon fix-border'>~</span>
<?php endif;?>
<?php if(!$hiddenDeadline):?>
<?php echo html::input('deadline', $task->deadline, "class='form-control form-date' placeholder='{$lang->task->deadline}'");?>
<?php endif;?>
</div>
<td id='planAndMailCell' colspan='5' class='<?php if(!$hiddenMailto) echo 'has-mail-col' ?>'>
<div class='row-table'>
<?php if(!$hiddenEstStarted or !$hiddenDeadline):?>
<div class='col-table' id='taskPlanCol'>
<div class='input-group' id='dataPlanGroup'>
<?php if(!$hiddenEstStarted):?>
<?php echo html::input('estStarted', $task->estStarted, "class='form-control form-date' placeholder='{$lang->task->estStarted}'");?>
<?php endif;?>
<?php if(!$hiddenEstStarted and !$hiddenDeadline):?>
<span class='input-group-addon fix-border'>~</span>
<?php endif;?>
<?php if(!$hiddenDeadline):?>
<?php echo html::input('deadline', $task->deadline, "class='form-control form-date' placeholder='{$lang->task->deadline}'");?>
<?php endif;?>
</div>
</div>
<?php endif;?>
<?php if(!$hiddenMailto):?>
<div class='col-table' id='mailCol'>
<div id='mailtoGroup' class='input-group'>
<?php if(!$hiddenEstStarted or !$hiddenDeadline):?>
<span class='input-group-addon'><?php echo $lang->task->mailto;?></span>
<?php endif;?>
<?php echo html::select('mailto[]', $project->acl == 'private' ? $members : $users, str_replace(' ', '', $task->mailto), "multiple class='form-control'");?>
<?php echo $this->fetch('my', 'buildContactLists');?>
</div>
</div>
<?php endif;?>
</div>
</td>
<?php endif;?>
<?php if(!$hiddenMailto):?>
<?php $colspan = ($hiddenEstStarted and $hiddenDeadline) ? '5' : '4';?>
<td colspan='<?php echo $colspan?>'>
<div id='mailtoGroup' class='input-group'>
<?php if(!$hiddenEstStarted or !$hiddenDeadline):?>
<span class='input-group-addon'><?php echo $lang->task->mailto;?></span>
<?php endif;?>
<?php echo html::select('mailto[]', $project->acl == 'private' ? $members : $users, str_replace(' ', '', $task->mailto), "multiple class='form-control'");?>
<?php echo $this->fetch('my', 'buildContactLists');?>
</div>
</td>
<?php endif;?>
</tr>
<?php endif;?>
<tr>
+1 -1
View File
@@ -88,7 +88,7 @@
</fieldset>
<?php endif;?>
<?php if(isset($task->cases)):?>
<?php if(isset($task->cases) and $task->cases):?>
<fieldset>
<legend><?php echo $lang->task->case;?></legend>
<div class='article-content'>