Merge branch 'master' into 'cyy_gitlab'

# Conflicts:
#   module/common/lang/menu.php
This commit is contained in:
李玉春
2022-07-05 00:44:06 +00:00
52 changed files with 496 additions and 202 deletions
@@ -127,10 +127,10 @@ $(function()
<div class="tile-title"><?php echo $lang->SRCommon;?></div>
<?php if($product->stories):?>
<div class="tile-amount"><?php echo array_sum($product->stories);?></div>
<?php common::printLink('product', 'browse', "productID={$product->id}&branch=&type=allstory", $lang->story->viewAll . '<span class="label label-badge label-icon"><i class="icon icon-arrow-right"></i></span>', '', 'class="btn btn-primary btn-circle btn-icon-right btn-sm"');?>
<?php common::printLink('product', 'browse', "productID={$product->id}&branch=&type=allstory", $lang->story->viewAll . '<span class="label label-badge label-icon"><i class="icon icon-arrow-right"></i></span>', '', 'class="btn btn-primary btn-circle btn-icon-right btn-sm" data-app="product"');?>
<?php else:?>
<div class="tile-amount">0</div>
<?php common::printLink('story', 'create', "productID={$product->id}", '<span class="label label-badge label-icon"><i class="icon icon-plus"></i></span>' . $lang->story->create, '', 'class="btn btn-primary btn-circle btn-icon-left btn-sm"');?>
<?php common::printLink('story', 'create', "productID={$product->id}", '<span class="label label-badge label-icon"><i class="icon icon-plus"></i></span>' . $lang->story->create, '', 'class="btn btn-primary btn-circle btn-icon-left btn-sm" data-app="product"');?>
<?php endif;?>
</div>
<ul class="types-line">
@@ -157,7 +157,7 @@ $(function()
</div>
<?php else:?>
<div class="actions">
<?php common::printLink('productplan', 'create', "productID={$product->id}", "<i class='icon icon-plus'></i> " . $lang->productplan->create, '', "class='btn btn-info'");?>
<?php common::printLink('productplan', 'create', "productID={$product->id}", "<i class='icon icon-plus'></i> " . $lang->productplan->create, '', "class='btn btn-info' data-app='product'");?>
</div>
<?php endif;?>
<div class="type-info">
@@ -190,7 +190,7 @@ $(function()
</div>
<?php else:?>
<div class="actions">
<?php common::printLink('release', 'create', "productID={$product->id}", "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
<?php common::printLink('release', 'create', "productID={$product->id}", "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info' data-app='product'");?>
</div>
<?php endif;?>
<div class="type-info">
@@ -5,6 +5,8 @@
.block-issues .c-id {width: 55px;}
.block-issues .c-status {width: 80px;}
.block-issues.block-sm .c-status {text-align: center;}
.c-assignedTo {width: 100px; padding:0px !important;text-align:center;}
.c-severity, .c-pri {text-align:center;}
</style>
<div class='panel-body has-table scrollbar-hover'>
<table class='table table-borderless table-hover table-fixed table-fixed-head tablesorter block-issues <?php if(!$longBlock) echo 'block-sm';?>'>
@@ -17,7 +19,7 @@
<th class='c-status'><?php echo $lang->issue->severity;?></th>
<th class='c-number'><?php echo $lang->issue->pri;?></th>
<th class='c-user'><?php echo $lang->issue->owner;?></th>
<th class='c-user'><?php echo $lang->issue->assignedTo;?></th>
<th class='c-assignedTo'><?php echo $lang->issue->assignedTo;?></th>
<?php endif;?>
<th class='c-status'><?php echo $lang->issue->status;?></th>
</tr>
@@ -35,7 +37,7 @@
<td class='c-severity'><?php echo zget($lang->issue->severityList, $issue->severity, $issue->severity)?></td>
<td class='c-pri'><?php echo zget($lang->issue->priList, $issue->pri, $issue->pri)?></td>
<td><?php echo zget($users, $issue->owner, $issue->owner)?></td>
<td><?php echo zget($users, $issue->assignedTo, $issue->assignedTo)?></td>
<td class='c-assignedTo'><?php echo zget($users, $issue->assignedTo, $issue->assignedTo)?></td>
<?php endif;?>
<td class='c-status'>
<span class="status-issue status-<?php echo $issue->status?>"><?php echo zget($lang->issue->statusList, $issue->status);?></span>
@@ -3,9 +3,11 @@
<?php else:?>
<style>
.block-risks .c-id {width: 40px;}
.block-risks .c-pri {width: 70px; text-align: center;}
.block-risks .c-strategy, .block-risks .c-status {width: 60px;}
.block-risks .c-user, .block-risks .c-rate, .block-risks .c-category {width: 80px;}
.block-risks .c-pri {width: 85px; text-align: center;}
.block-risks .c-strategy, .block-risks .c-status {width: 80px;}
.block-risks .c-user, .block-risks .c-rate, .block-risks .c-category {width: 110px;}
.c-rate, .c-category {text-align:center;}
.c-assignedTo {width: 100px; padding:0px !important;text-align:center;}
.pri-low {color: #000000;}
.pri-middle {color: #FF9900;}
.pri-high {color: #E53333;}
@@ -23,7 +25,7 @@
<?php if($longBlock):?>
<th class='c-rate'><?php echo $lang->risk->rate;?></th>
<th class='c-pri'><?php echo $lang->risk->pri;?></th>
<th class='c-user'><?php echo $lang->risk->assignedTo;?></th>
<th class='c-assignedTo text-center'><?php echo $lang->risk->assignedTo;?></th>
<th class='c-category'><?php echo $lang->risk->category;?></th>
<?php endif;?>
</tr>
@@ -44,8 +46,8 @@
</td>
<?php if($longBlock):?>
<td class='c-rate'><?php echo $risk->rate?></td>
<td><?php echo "<span class='pri-{$risk->pri}'>" . zget($lang->risk->priList, $risk->pri) . "</span>";?></td>
<td><?php echo zget($users, $risk->assignedTo, $risk->assignedTo)?></td>
<td class='c-pri'><?php echo "<span class='pri-{$risk->pri}'>" . zget($lang->risk->priList, $risk->pri) . "</span>";?></td>
<td class='c-assignedTo'><?php echo zget($users, $risk->assignedTo, $risk->assignedTo)?></td>
<td class='c-category'><?php echo zget($lang->risk->categoryList, $risk->category, $risk->category)?></td>
<?php endif;?>
</tr>
+85
View File
@@ -4,8 +4,93 @@ $(function()
var $titleCol = $('#batchCreateForm table thead tr th.c-title');
if($titleCol.width() < 150) $titleCol.width(150);
$('#customField').click(function()
{
hiddenRequireFields();
});
/* Implement a custom form without feeling refresh. */
$('#formSettingForm .btn-primary').click(function()
{
var fields = '';
$('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function()
{
fields += ',' + $(this).val();
});
var link = createLink('custom', 'ajaxSaveCustomFields', 'module=bug&section=custom&key=batchCreateFields');
$.post(link, {'fields' : fields}, function()
{
checkedShowFields(fields);
$('#formSetting').parent().removeClass('open');
if($('#batchCreateForm table thead tr th.c-title').width() < 150) $titleCol.width(150);
var fieldCount = $('#batchCreateForm .table thead>tr>th:visible').length;
$('.form-actions').attr('colspan', fieldCount);
if(fieldCount > 10)
{
$('#batchCreateForm > .table-responsive').removeClass('scroll-none');
$('#batchCreateForm > .table-responsive').css('overflow', 'auto');
}
else
{
$('#batchCreateForm > .table-responsive').addClass('scroll-none');
$('#batchCreateForm > .table-responsive').css('overflow', 'visible');
}
});
return false;
});
})
/**
* Checked show fields.
*
* @param string fields
* @access public
* @return void
*/
function checkedShowFields(fields)
{
var fieldList = ',' + fields + ',';
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
{
var field = ',' + $(this).val() + ',';
var $field = $('[name^=' + $(this).val() + ']');
var required = ',' + requiredFields + ',';
var $fieldBox = $('.' + $(this).val() + 'Box' );
if(fieldList.indexOf(field) >= 0 || required.indexOf(field) >= 0)
{
$fieldBox.removeClass('hidden');
$field.removeAttr('disabled');
}
else if(!$fieldBox.hasClass('hidden'))
{
$fieldBox.addClass('hidden');
$field.attr('disabled', true);
}
});
}
/**
* Hidden require field.
*
* @access public
* @return void
*/
function hiddenRequireFields()
{
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
{
var field = ',' + $(this).val() + ',';
var required = ',' + requiredFields + ',';
if(required.indexOf(field) >= 0) $(this).closest('div').addClass('hidden');
});
}
/**
* Set opened builds.
*
+63 -62
View File
@@ -14,6 +14,24 @@
include '../../common/view/header.html.php';
js::set('requiredFields', $config->bug->create->requiredFields);
?>
<?php
$visibleFields = array();
$requiredFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field) $visibleFields[$field] = '';
}
foreach(explode(',', $config->bug->create->requiredFields) as $field)
{
if($field)
{
$requiredFields[$field] = '';
if(strpos(",{$config->bug->list->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
}
}
?>
<?php js::set('showFields', $showFields);?>
<div id='mainContent' class='main-content fade'>
<div class='main-header'>
<h2>
@@ -30,49 +48,32 @@ js::set('requiredFields', $config->bug->create->requiredFields);
<?php endif;?>
</div>
</div>
<?php
$visibleFields = array();
$requiredFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field) $visibleFields[$field] = '';
}
foreach(explode(',', $config->bug->create->requiredFields) as $field)
{
if($field)
{
$requiredFields[$field] = '';
if(strpos(",{$config->bug->list->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
}
}
?>
<form class='main-form' method='post' target='hiddenwin' id='batchCreateForm'>
<div class="table-responsive">
<table class='table table-form'>
<thead>
<tr>
<th class='c-id'><?php echo $lang->idAB;?></th>
<th class='c-branch<?php echo zget($visibleFields, $product->type, ' hidden')?>'> <?php echo $lang->product->branch;?></th>
<th class='c-branch<?php echo zget($visibleFields, $product->type, ' hidden')?> branchBox'> <?php echo $lang->product->branch;?></th>
<th class='c-module<?php echo zget($requiredFields, 'module', '', ' required');?>'> <?php echo $lang->bug->module;?></th>
<?php if($config->systemMode == 'new'):?>
<th class='c-project<?php echo zget($visibleFields, 'project', ' hidden') . zget($requiredFields, 'project', '', ' required');?>'><?php echo (isset($project->model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->project;?></th>
<th class='c-project<?php echo zget($visibleFields, 'project', ' hidden') . zget($requiredFields, 'project', '', ' required');?> projectBox'><?php echo (isset($project->model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->project;?></th>
<?php endif;?>
<th class='c-execution<?php echo zget($visibleFields, 'execution', ' hidden') . zget($requiredFields, 'execution', '', ' required');?>'><?php echo (isset($project->model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->execution;?></th>
<th class='c-execution<?php echo zget($visibleFields, 'execution', ' hidden') . zget($requiredFields, 'execution', '', ' required');?> executionBox'><?php echo (isset($project->model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->execution;?></th>
<th class='c-build required'><?php echo $lang->bug->openedBuild;?></th>
<th class='c-title required'><?php echo $lang->bug->title;?></th>
<?php if(isset($executionType) and $executionType == 'kanban'):?>
<th class='c-execution'><?php echo $lang->kanbancard->region;?></th>
<th class='c-execution'><?php echo $lang->kanbancard->lane;?></th>
<?php endif;?>
<th class='c-date<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?>'><?php echo $lang->bug->deadline;?></th>
<th class='c-steps<?php echo zget($visibleFields, 'steps', ' hidden') . zget($requiredFields, 'steps', '', ' required');?>'><?php echo $lang->bug->steps;?></th>
<th class='c-type<?php echo zget($visibleFields, 'type', ' hidden') . zget($requiredFields, 'type', '', ' required');?>'><?php echo $lang->typeAB;?></th>
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?>'><?php echo $lang->bug->pri;?></th>
<th class='c-severity<?php echo zget($visibleFields, 'severity', ' hidden') . zget($requiredFields, 'severity', '', ' required');?>'><?php echo $lang->bug->severity;?></th>
<th class='c-os<?php echo zget($visibleFields, 'os', ' hidden') . zget($requiredFields, 'os', '', ' required');?>'><?php echo $lang->bug->os;?></th>
<th class='c-browser<?php echo zget($visibleFields, 'browser', ' hidden') . zget($requiredFields, 'browser', '', ' required');?>'><?php echo $lang->bug->browser;?></th>
<th class='c-keywords<?php echo zget($visibleFields, 'keywords', ' hidden') . zget($requiredFields, 'keywords', '', ' required');?>'><?php echo $lang->bug->keywords;?></th>
<th class='c-date<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?> deadlineBox'><?php echo $lang->bug->deadline;?></th>
<th class='c-steps<?php echo zget($visibleFields, 'steps', ' hidden') . zget($requiredFields, 'steps', '', ' required');?> stepsBox'><?php echo $lang->bug->steps;?></th>
<th class='c-type<?php echo zget($visibleFields, 'type', ' hidden') . zget($requiredFields, 'type', '', ' required');?> typeBox'><?php echo $lang->typeAB;?></th>
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?> priBox'><?php echo $lang->bug->pri;?></th>
<th class='c-severity<?php echo zget($visibleFields, 'severity', ' hidden') . zget($requiredFields, 'severity', '', ' required');?> severityBox'><?php echo $lang->bug->severity;?></th>
<th class='c-os<?php echo zget($visibleFields, 'os', ' hidden') . zget($requiredFields, 'os', '', ' required');?> osBox'><?php echo $lang->bug->os;?></th>
<th class='c-browser<?php echo zget($visibleFields, 'browser', ' hidden') . zget($requiredFields, 'browser', '', ' required');?> browserBox'><?php echo $lang->bug->browser;?></th>
<th class='c-keywords<?php echo zget($visibleFields, 'keywords', ' hidden') . zget($requiredFields, 'keywords', '', ' required');?> keywordsBox'><?php echo $lang->bug->keywords;?></th>
<?php
$extendFields = $this->bug->getFlowExtendFields();
foreach($extendFields as $extendField)
@@ -107,12 +108,12 @@ js::set('requiredFields', $config->bug->create->requiredFields);
?>
<tr>
<td class='text-center'><?php echo $i;?></td>
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?>' style='overflow:visible'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, $i)'");?></td>
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?> branchBox' style='overflow:visible'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, $i)'");?></td>
<td><?php echo html::select("modules[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
<?php if($config->systemMode == 'new'):?>
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?>' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, $i)'");?></td>
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?> projectBox' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, $i)'");?></td>
<?php endif;?>
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?>' style='overflow:visible'><?php echo html::select("executions[$i]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, $i)'");?></td>
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?> executionBox' style='overflow:visible'><?php echo html::select("executions[$i]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, $i)'");?></td>
<td id='buildBox<?php echo $i;?>'><?php echo html::select("openedBuilds[$i][]", $builds, 'trunk', "class='form-control chosen' multiple");?></td>
<td>
<div class='input-group'>
@@ -132,14 +133,14 @@ js::set('requiredFields', $config->bug->create->requiredFields);
<td><?php echo html::select("regions[$i]", $regionPairs, $regionID, "class='form-control chosen'");?></td>
<td><?php echo html::select("lanes[$i]", $lanePairs, $laneID, "class='form-control chosen'");?></td>
<?php endif;?>
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?>'><?php echo html::input("deadlines[$i]", '', "class='form-control form-date'");?></td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'><?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?>' style='overflow:visible'> <?php echo html::select("types[$i]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?>' style='overflow:visible'> <?php echo html::select("pris[$i]", $lang->bug->priList, $pri, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>' style='overflow:visible'><?php echo html::select("severities[$i]", $lang->bug->severityList, '3', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?>' style='overflow:visible'> <?php echo html::select("oses[$i]", $lang->bug->osList, $os, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?>' style='overflow:visible'> <?php echo html::select("browsers[$i]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[$i]", '', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox'><?php echo html::input("deadlines[$i]", '', "class='form-control form-date'");?></td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?> stepsBox'><?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?> typeBox' style='overflow:visible'> <?php echo html::select("types[$i]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox' style='overflow:visible'> <?php echo html::select("pris[$i]", $lang->bug->priList, $pri, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?> severityBox' style='overflow:visible'><?php echo html::select("severities[$i]", $lang->bug->severityList, '3', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?> osBox' style='overflow:visible'> <?php echo html::select("oses[$i]", $lang->bug->osList, $os, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?> browserBox' style='overflow:visible'> <?php echo html::select("browsers[$i]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?> keywordsBox'><?php echo html::input("keywords[$i]", '', "class='form-control'");?></td>
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . "</td>";
@@ -161,12 +162,12 @@ js::set('requiredFields', $config->bug->create->requiredFields);
?>
<tr>
<td><?php echo $i;?></td>
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?>' style='overflow:visible'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, $i)'");?></td>
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?> branchBox' style='overflow:visible'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, $i)'");?></td>
<td><?php echo html::select("modules[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
<?php if($config->systemMode == 'new'):?>
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?>' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, $i)'");?></td>
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?> projectBox' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, $i)'");?></td>
<?php endif;?>
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?>' style='overflow:visible'><?php echo html::select("executions[$i]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, $i)'");?></td>
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?> executionBox' style='overflow:visible'><?php echo html::select("executions[$i]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, $i)'");?></td>
<td id='buildBox<?php echo $i;?>'><?php echo html::select("openedBuilds[$i][]", $builds, '', "class='form-control chosen' multiple");?></td>
<td>
<div class='input-group'>
@@ -186,14 +187,14 @@ js::set('requiredFields', $config->bug->create->requiredFields);
<td><?php echo html::select("regions[$i]", $regionPairs, $regionID, "class='form-control chosen' onchange='setLane(this.value, $i)'");?></td>
<td><?php echo html::select("lanes[$i]", $lanePairs, $laneID, "class='form-control chosen'");?></td>
<?php endif;?>
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?>'><?php echo html::input("deadlines[$i]", '', "class='form-control form-date'");?></td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'><?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?>' style='overflow:visible'> <?php echo html::select("types[$i]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?>' style='overflow:visible'> <?php echo html::select("pris[$i]", $lang->bug->priList, $pri, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>' style='overflow:visible'><?php echo html::select("severities[$i]", $lang->bug->severityList, '3', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?>' style='overflow:visible'> <?php echo html::select("oses[$i]", $lang->bug->osList, $os, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?>' style='overflow:visible'> <?php echo html::select("browsers[$i]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[$i]", '', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox'><?php echo html::input("deadlines[$i]", '', "class='form-control form-date'");?></td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?> stepsBox'><?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?> typeBox' style='overflow:visible'> <?php echo html::select("types[$i]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox' style='overflow:visible'> <?php echo html::select("pris[$i]", $lang->bug->priList, $pri, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?> severityBox' style='overflow:visible'><?php echo html::select("severities[$i]", $lang->bug->severityList, '3', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?> osBox' style='overflow:visible'> <?php echo html::select("oses[$i]", $lang->bug->osList, $os, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?> browserBox' style='overflow:visible'> <?php echo html::select("browsers[$i]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?> keywordsBox'><?php echo html::input("keywords[$i]", '', "class='form-control'");?></td>
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . "</td>";
@@ -203,7 +204,7 @@ js::set('requiredFields', $config->bug->create->requiredFields);
</tbody>
<tfoot>
<tr>
<td colspan='<?php echo count($visibleFields) + 3?>' class='text-center form-actions'>
<td colspan='<?php echo count($visibleFields) + 4?>' class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</td>
@@ -217,12 +218,12 @@ js::set('requiredFields', $config->bug->create->requiredFields);
<tbody>
<tr>
<td>%s</td>
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?>' style='overflow:visible'><?php echo html::select("branches[%s]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, \"%s\")'");?></td>
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?> productBox' style='overflow:visible'><?php echo html::select("branches[%s]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, \"%s\")'");?></td>
<td><?php echo html::select("modules[%s]", $moduleOptionMenu, $moduleID, "class='form-control'");?></td>
<?php if($config->systemMode == 'new'):?>
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?>' style='overflow:visible'><?php echo html::select("projects[%s]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, \"%s\")'");?></td>
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?> projectBox' style='overflow:visible'><?php echo html::select("projects[%s]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, \"%s\")'");?></td>
<?php endif;?>
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?>' style='overflow:visible'><?php echo html::select("executions[%s]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, \"%s\")'");?></td>
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?> executionBox' style='overflow:visible'><?php echo html::select("executions[%s]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, \"%s\")'");?></td>
<td id='buildBox%s'><?php echo html::select("openedBuilds[%s][]", $builds, '', "class='form-control chosen' multiple");?></td>
<td>
<div class='input-group'>
@@ -238,14 +239,14 @@ js::set('requiredFields', $config->bug->create->requiredFields);
</div>
</div>
</td>
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?>'><?php echo html::input("deadlines[%s]", '', "class='form-control form-date'");?></td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'><?php echo html::textarea("stepses[%s]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?>' style='overflow:visible'> <?php echo html::select("types[%s]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?>' style='overflow:visible'> <?php echo html::select("pris[%s]", $lang->bug->priList, '', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>' style='overflow:visible'><?php echo html::select("severities[%s]", $lang->bug->severityList, '3', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?>' style='overflow:visible'> <?php echo html::select("oses[%s]", $lang->bug->osList, $os, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?>' style='overflow:visible'> <?php echo html::select("browsers[%s]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[%s]", '', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox'><?php echo html::input("deadlines[%s]", '', "class='form-control form-date'");?></td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?> stepsBox'><?php echo html::textarea("stepses[%s]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?> typeBox' style='overflow:visible'> <?php echo html::select("types[%s]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox' style='overflow:visible'> <?php echo html::select("pris[%s]", $lang->bug->priList, '', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?> severityBox' style='overflow:visible'><?php echo html::select("severities[%s]", $lang->bug->severityList, '3', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?> osBox' style='overflow:visible'> <?php echo html::select("oses[%s]", $lang->bug->osList, $os, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?> browserBox' style='overflow:visible'> <?php echo html::select("browsers[%s]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?> keywordsBox'><?php echo html::input("keywords[%s]", '', "class='form-control'");?></td>
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[%s]") . "</td>";
+1
View File
@@ -1 +1,2 @@
.table table td,.outer .table table tbody > tr:last-child td {padding: 2px 0 2px 5px !important; border: none !important;}
.c-pri{width: 70px;}
+16 -8
View File
@@ -20,6 +20,7 @@ $(function()
});
</script>
<?php else:?>
<?php js::set('requiredFields', $requiredFields);?>
<div id="mainContent" class="main-content">
<div class="main-header clearfix">
<h2><?php echo $lang->caselib->import;?></h2>
@@ -29,13 +30,13 @@ $(function()
<thead>
<tr>
<th class='c-number'><?php echo $lang->testcase->id?></th>
<th><?php echo $lang->testcase->title?></th>
<th class='c-module'><?php echo $lang->testcase->module?></th>
<th class='c-status'><?php echo $lang->testcase->pri?></th>
<th class='c-status'><?php echo $lang->testcase->type?></th>
<th><?php echo $lang->testcase->stage?></th>
<th class='c-text'><?php echo $lang->testcase->keywords?></th>
<th><?php echo $lang->testcase->precondition?></th>
<th class='c-title' id='title'> <?php echo $lang->testcase->title?></th>
<th class='c-module' id='module'> <?php echo $lang->testcase->module?></th>
<th class='c-pri' id='pri'> <?php echo $lang->testcase->pri?></th>
<th class='c-type' id='type'> <?php echo $lang->testcase->type?></th>
<th class='c-stage' id='stage'> <?php echo $lang->testcase->stage?></th>
<th class='c-text' id='keywords'> <?php echo $lang->testcase->keywords?></th>
<th class='c-precondition' id='precondition'><?php echo $lang->testcase->precondition?></th>
<th class='c-case-step col-content'>
<table class='w-p100 table-borderless'>
<tr>
@@ -127,6 +128,13 @@ $(function()
<style>#mainContent .col-content{display: none;}</style>
<?php endif;?>
<script>
$(function(){$.fixedTableHead('#showData');});
$(function()
{
$.fixedTableHead('#showData');
$("#showData th").each(function()
{
if(requiredFields.indexOf(this.id) !== -1) $("#" + this.id).addClass('required');
});
});
</script>
<?php include '../../common/view/footer.html.php';?>
+1
View File
@@ -84,6 +84,7 @@ $lang->waterfallModel = 'Waterfall';
$lang->scrumModel = 'Scrum';
$lang->all = 'All';
$lang->viewDetails = 'View Details';
$lang->app = 'APP';
$lang->actions = 'Aktionen';
$lang->restore = 'Wiederherstellen';
+1
View File
@@ -84,6 +84,7 @@ $lang->waterfallModel = 'Waterfall';
$lang->scrumModel = 'Scrum';
$lang->all = 'All';
$lang->viewDetails = 'View Details';
$lang->app = 'APP';
$lang->actions = 'Action';
$lang->restore = 'Reset';
+1
View File
@@ -84,6 +84,7 @@ $lang->waterfallModel = 'Waterfall';
$lang->scrumModel = 'Scrum';
$lang->all = 'All';
$lang->viewDetails = 'View Details';
$lang->app = 'APP';
$lang->actions = 'Action';
$lang->restore = 'Réinitialiser';
+8 -4
View File
@@ -397,18 +397,22 @@ $lang->devops->menu = new stdclass();
$lang->devops->menu->code = array('link' => "{$lang->repo->common}|repo|browse|repoID=%s", 'alias' => 'diff,view,revision,log,blame,showsynccommit');
$lang->devops->menu->mr = array('link' => "{$lang->devops->mr}|mr|browse|repoID=%s");
$lang->devops->menu->compile = array('link' => "{$lang->devops->compile}|job|browse", 'subModule' => 'compile,job');
$lang->devops->menu->set = array('link' => "{$lang->devops->set}|repo|maintain", 'subModule' => 'gitlab');
$lang->devops->menu->app = array('link' => "{$lang->app}|devops|app|%s");
$lang->devops->menu->set = array('link' => "{$lang->devops->set}|repo|maintain", 'subModule' => 'gitlab,jenkins,sonarqube', 'alias' => 'setrules,create,edit');
$lang->devops->menuOrder[5] = 'code';
$lang->devops->menuOrder[10] = 'mr';
$lang->devops->menuOrder[15] = 'compile';
$lang->devops->menuOrder[20] = 'app';
$lang->devops->menuOrder[25] = 'set';
$lang->devops->dividerMenu = ',set,';
$lang->devops->menu->set['subMenu'] = new stdclass();
$lang->devops->menu->set['subMenu']->repo = array('link' => "{$lang->devops->repo}|repo|maintain", 'subModule' => 'repo');
$lang->devops->menu->set['subMenu']->repo = array('link' => "{$lang->devops->repo}|repo|maintain", 'alias' => 'create,edit');
$lang->devops->menu->set['subMenu']->gitlab = array('link' => 'GitLab|gitlab|browse', 'subModule' => 'gitlab');
$lang->devops->menu->set['subMenu']->jenkins = array('link' => 'Jenkins|jenkins|browse');
$lang->devops->menu->set['subMenu']->sonarqube = array('link' => 'SonarQube|sonarqube|browse');
$lang->devops->menu->set['subMenu']->jenkins = array('link' => 'Jenkins|jenkins|browse', 'subModule' => '');
$lang->devops->menu->set['subMenu']->sonarqube = array('link' => 'SonarQube|sonarqube|browse', 'subModule' => 'sonarqube');
$lang->devops->menu->set['subMenu']->setrules = array('link' => "{$lang->devops->rules}|repo|setrules");
/* Kanban menu. */
+1
View File
@@ -65,6 +65,7 @@ $lang->noData = 'Không có dữ liệu.';
$lang->fullscreen = 'Fullscreen';
$lang->retrack = 'Retrack';
$lang->whitelist = 'Lista bianca';
$lang->app = 'APP';
$lang->actions = 'Hành động';
$lang->restore = 'Thiết lập lại';
+1
View File
@@ -84,6 +84,7 @@ $lang->waterfallModel = '瀑布模型';
$lang->scrumModel = '敏捷模型';
$lang->all = '所有';
$lang->viewDetails = '查看详情';
$lang->app = '应用';
$lang->actions = '操作';
$lang->restore = '恢复默认';
+1
View File
@@ -78,6 +78,7 @@ $lang->globalSetting = '全局設置';
$lang->waterfallModel = '瀑布模型';
$lang->all = '所有';
$lang->viewDetails = '查看詳情';
$lang->app = '應用';
$lang->actions = '操作';
$lang->restore = '恢復預設';
+1
View File
@@ -2453,6 +2453,7 @@ EOD;
if($module == 'company' and $method == 'dynamic') return true;
if($module == 'action' and $method == 'editcomment') return true;
if($module == 'action' and $method == 'comment') return true;
if($module == 'report' and $method == 'export') return true;
if(!isset($acls['views'][$menu])) return false;
return true;
+3 -1
View File
@@ -16,10 +16,12 @@
#formSettingForm .checkboxes {padding: 10px 3px;}
#formSettingForm .checkbox-primary {width: 50%; float: left; margin: 3px 0;}
#formSetting .btn {margin-right: 8px;}
[lang^='de'] #formSetting {min-width: 360px;}
[lang^='fr'] #formSetting {min-width: 320px;}
</style>
<button type="button" title="<?php echo $lang->customField;?>" class="btn btn-link" id="customField" data-toggle="dropdown"><i class="icon icon-cog"></i></button>
<div class="dropdown-menu pull-right" id="formSetting">
<form class='with-padding load-indicator' id='formSettingForm' method='post' target='hiddenwin' action='<?php echo $customLink?>'>
<form class='with-padding load-indicator not-watch' id='formSettingForm' method='post' target='hiddenwin' action='<?php echo $customLink?>'>
<div><?php echo $lang->customField;?></div>
<div class="clearfix checkboxes">
<?php echo html::checkbox('fields', $customFields, $showFields);?>
+4 -1
View File
@@ -676,14 +676,17 @@ class custom extends control
$account = $this->app->user->account;
if($this->server->request_method == 'POST')
{
$fields = $this->post->fields;
$fields = $this->post->fields;
if(is_array($fields)) $fields = join(',', $fields);
$this->loadModel('setting')->setItem("$account.$module.$section.$key", $fields);
if(in_array($module, array('task', 'testcase', 'story')) and $section == 'custom' and in_array($key, array('createFields', 'batchCreateFields'))) return;
if($module == 'bug' and $section == 'custom' and $key == 'batchCreateFields') return;
}
else
{
$this->loadModel('setting')->deleteItems("owner=$account&module=$module&section=$section&key=$key");
}
return print(js::reload('parent'));
}
+3 -2
View File
@@ -12,10 +12,11 @@
<?php endif;?>
</div>
<div class="info">
<div class="version">
<?php $version = $version ? $version : $doc->version;?>
<div class="version" data-version='<?php echo $version;?>'>
<div class='btn-group'>
<a href='javascript:;' class='btn btn-link btn-limit text-ellipsis' data-toggle='dropdown' style="max-width: 120px;">
#<?php echo $version ? $version : $doc->version;?>
#<?php echo $version;?>
<span class="caret"></span>
</a>
<ul class='dropdown-menu doc-version-menu' style='max-height:240px; max-width: 300px; overflow-y:auto'>
+10 -1
View File
@@ -805,6 +805,14 @@ class execution extends control
}
$actionURL = $this->createLink('execution', 'story', "executionID=$executionID&orderBy=$orderBy&type=bySearch&queryID=myQueryID");
$branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products));
$branchOption = array();
foreach($branchGroups as $productID => $branches)
{
foreach($branches as $branchID => $name)
{
$branchOption[$branchID] = $name;
}
}
$this->execution->buildStorySearchForm($products, $branchGroups, $modules, $queryID, $actionURL, 'executionStory', $executionID);
/* Header and position. */
@@ -867,9 +875,10 @@ class execution extends control
$this->view->pager = $pager;
$this->view->setModule = true;
$this->view->branchGroups = $branchGroups;
$this->view->branchOption = $branchOption;
$this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable.
$this->view->showBranch = $showBranch;
$this->view->storyStages = $this->product->batchGetStoryStage($stories);
$this->view->storyStages = $this->product->batchGetStoryStage($stories);
$this->display();
}
+1 -1
View File
@@ -1,7 +1,6 @@
td.delayed {background: #e84e0f !important; color: white;}
#int-dropdown {margin-left: -8px; border-radius: 4px; border: 1px solid #0c64eb;}
#projectTaskForm table tbody tr td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
th.c-deadline {text-align: center;}
.table td.c-estimate, .table td.c-consumed, .table td.c-left {padding-right: 12px;}
.c-estimate {text-align: right;}
.c-consumed {text-align: right;}
@@ -10,3 +9,4 @@ th.c-deadline {text-align: center;}
.btn-toolbar > .btn {margin-right: 5px !important;}
#taskList .c-progress{padding-right: 8px; text-align: right;}
#datatable-taskList .c-progress{padding-right: 8px; text-align: right;}
.c-finishedBy, .c-lastEditedBy {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
+1 -1
View File
@@ -231,7 +231,7 @@
<tr id="story<?php echo $story->id;?>" data-id='<?php echo $story->id;?>' data-order='<?php echo $story->order ?>' data-estimate='<?php echo $story->estimate?>' data-cases='<?php echo zget($storyCases, $story->id, 0)?>'>
<?php foreach($setting as $key => $value)
{
$this->story->printCell($value, $story, $users, '', $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table', '', $execution, $showBranch);
$this->story->printCell($value, $story, $users, $branchOption, $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table', '', $execution, $showBranch);
}
?>
</tr>
-2
View File
@@ -35,8 +35,6 @@ class jenkins extends control
*/
public function browse($orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
if(common::hasPriv('jenkins', 'create')) $this->lang->TRActions = html::a(helper::createLink('jenkins', 'create'), "<i class='icon icon-plus'></i> " . $this->lang->jenkins->create, '', "class='btn btn-primary'");
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
+3 -4
View File
@@ -1762,7 +1762,6 @@ class kanbanModel extends model
->where('deleted')->eq(0)
->andWhere('id')->in($spaceIdList)
->beginIF(in_array($browseType, array('private', 'cooperation', 'public')))->andWhere('type')->eq($browseType)->fi()
->beginIF($browseType == 'involved')->andWhere('owner')->ne($account)->fi()
->beginIF($this->cookie->showClosed == 0 and $browseType != 'showClosed')->andWhere('status')->ne('closed')->fi()
->orderBy('id_desc')
->fetchPairs('id');
@@ -1808,10 +1807,11 @@ class kanbanModel extends model
$account = $this->app->user->account;
foreach($objects as $objectID => $object)
{
$remove = true;
if($objectType == 'kanbanspace' and $object->type == 'public' and $param != 'involved') continue;
if($object->owner == $account and $param != 'involved') $remove = false;
$remove = true;
if($object->owner == $account) $remove = false;
if(strpos(",{$object->team},", ",$account,") !== false) $remove = false;
if(strpos(",{$object->whitelist},", ",$account,") !== false) $remove = false;
@@ -1823,7 +1823,6 @@ class kanbanModel extends model
if($spaceType == 'public' and $param != 'involved') $remove = false;
}
if($objectType == 'kanbanspace' and $param == 'involved' and $object->owner == $account) $remove = true;
if($remove) unset($objects[$objectID]);
}
+1 -2
View File
@@ -35,13 +35,12 @@
</div>
<div id="mainContent">
<?php $dataModule = $app->rawMethod == 'work' ? 'workBug' : 'contributeBug';?>
<?php if(empty($bugs)):?>
<div class="cell<?php if($type == 'bySearch') echo ' show';?>" id="queryBox" data-module=<?php echo $dataModule;?>></div>
<?php if(empty($bugs)):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->bug->noBug;?></span></p>
</div>
<?php else:?>
<div class="cell<?php if($type == 'bySearch') echo ' show';?>" id="queryBox" data-module=<?php echo $dataModule;?>></div>
<form id='myBugForm' class="main-table table-bug" data-ride="table" method="post" action='<?php echo $this->createLink('bug', 'batchEdit', "productID=0");?>'>
<?php
$canBatchEdit = (common::hasPriv('bug', 'batchEdit') and $type == 'assignedTo');
+2 -1
View File
@@ -17,6 +17,7 @@ body {margin-bottom: 25px;}
#mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text {color: #fff;}
#mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text:after {border-bottom: unset;}
.body-modal #mainMenu>.btn-toolbar {width: auto;}
.assignedTo{border-radius: 4px !important;}
</style>
<?php js::set('browseType', $browseType);?>
<?php js::set('productID', $productID);?>
@@ -550,7 +551,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
<?php if($canBatchAssignTo):?>
<div class="btn-group dropup">
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->assignedTo;?> <span class="caret"></span></button>
<button data-toggle="dropdown" type="button" class="btn assignedTo"><?php echo $lang->story->assignedTo;?> <span class="caret"></span></button>
<?php
$withSearch = count($users) > 10;
$actionLink = $this->createLink('story', 'batchAssignTo', "productID=$productID");
+9 -9
View File
@@ -3849,12 +3849,11 @@ class storyModel extends model
if(common::canBeChanged('story', $story))
{
$storyReviewer = isset($story->reviewer) ? $story->reviewer : array();
if($story->URChanged) return $this->buildMenu('story', 'processStoryChange', $params, $story, $type, 'search', '', 'iframe', true, '', $this->lang->confirm);
$isClick = $this->isClickable($story, 'change');
$title = (!$isClick and $story->status != 'closed') ? $this->lang->story->changeTip : '';
$menu .= $this->buildMenu('story', 'change', $params . "&from=$story->from", $story, $type, 'alter', '', '', false, '', $title);
$menu .= $this->buildMenu('story', 'change', $params . "&from=$story->from", $story, $type, 'alter', '', 'showinonlybody', false, '', $title);
$isClick = $this->isClickable($story, 'review');
$title = $this->lang->story->review;
@@ -3877,8 +3876,7 @@ class storyModel extends model
$title = $this->lang->story->reviewTip['recalled'];
}
}
$menu .= $this->buildMenu('story', 'review', $params . "&from=$story->from", $story, $type, 'search', '', '', false, '', $title);
$menu .= $this->buildMenu('story', 'review', $params . "&from=$story->from", $story, $type, 'search', '', 'showinonlybody', false, '', $title);
$title = $this->lang->story->recall;
$isClick = $this->isClickable($story, 'recall');
if(!$isClick and $story->status != 'closed')
@@ -3888,12 +3886,12 @@ class storyModel extends model
if(empty($story->reviewedBy) and strpos('draft,changed', $story->status) !== false and !empty($story->reviewer) and $this->app->user->account != $story->openedBy) $title = $this->lang->story->recallTip['notOpenedBy'];
if($story->status == 'active' and empty($story->reviewer)) $title = $this->lang->story->recallTip['actived'];
}
$menu .= $this->buildMenu('story', 'recall', $params, $story, $type, 'undo', 'hiddenwin', '', '', '', $title);
$menu .= $this->buildMenu('story', 'recall', $params, $story, $type, 'undo', 'hiddenwin', 'showinonlybody', '', '', $title);
$menu .= $this->buildMenu('story', 'close', $params, $story, $type, '', '', 'iframe', true);
$menu .= $this->buildMenu('story', 'edit', $params . "&from=$story->from", $story, $type);
$menu .= $this->buildMenu('story', 'edit', $params . "&from=$story->from", $story, $type, '', '', 'showinonlybody');
$tab = $this->app->tab == 'project' ? 'project' : 'qa';
if($story->type != 'requirement' and $this->config->vision != 'lite') $menu .= $this->buildMenu('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=&param=0&$params", $story, $type, 'sitemap', '', '', false, "data-app='$tab'");
if($story->type != 'requirement' and $this->config->vision != 'lite') $menu .= $this->buildMenu('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=&param=0&$params", $story, $type, 'sitemap', '', 'showinonlybody', false, "data-app='$tab'");
if($this->app->rawModule != 'projectstory' OR $this->config->vision == 'lite')
{
@@ -3912,9 +3910,10 @@ class storyModel extends model
if($story->stage == 'projected') $title = $this->lang->story->subDivideTip['projected'];
}
}
$menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&$params&executionID={$this->session->project}", $story, $type, 'split', '', '', '', '', $title);
$menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&$params&executionID={$this->session->project}", $story, $type, 'split', '', 'showinonlybody', '', '', $title);
}
if($this->app->rawModule == 'projectstory' and $this->config->vision != 'lite') $menu .= $this->buildMenu('projectstory', 'unlinkStory', "projectID={$this->session->project}&$params", $story, $type, 'unlink', 'hiddenwin');
if($this->app->rawModule == 'projectstory' and $this->config->vision != 'lite') $menu .= $this->buildMenu('projectstory', 'unlinkStory', "projectID={$this->session->project}&$params", $story, $type, 'unlink', 'hiddenwin', 'showinonlybody');
}
else
{
@@ -4350,6 +4349,7 @@ class storyModel extends model
}
elseif($tab == 'execution')
{
$showBranch = 0;
if($isShowBranch) $showBranch = isset($this->config->execution->story->showBranch) ? $this->config->execution->story->showBranch : 1;
}
else
+4 -1
View File
@@ -11,8 +11,11 @@ select[id^="story"] + .picker-single {width: 130px; max-width: 130px;}
.main-header .pull-left {max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
#zeroTaskStory {margin: 0 0 0 20px; height: 32px; padding: 5px 5px 5px 5px; border-radius: 3px; border: 2px solid transparent;}
[lang^='en'] #zeroTaskStory {max-width: 205px !important;}
[lang^='de'] #zeroTaskStory {max-width: 220px !important;}
[lang^='fr'] #zeroTaskStory {max-width: 265px !important;}
#zeroTaskStory > label:before {top: 7px; left: 5px;}
#zeroTaskStory > label:after {top: 5px; left: 5px;}
#zeroTaskStory > label:after {top: 7px; left: 5px;}
#zeroTaskStory.checked {border-color: #00a9fc; background: #E9F2FB;}
.chosen-results > li.has-task,
+30 -1
View File
@@ -2,9 +2,38 @@
$(function()
{
removeDitto();
if($('th.c-name').width() < 200) $('th.c-name').width(200);
if($('th.c-name').width() < 165) $('th.c-name').width(165);
if(taskConsumed > 0) bootbox.alert(addChildTask);
$('#customField').on('click', function(){$('#tableBody .chosen-with-drop').removeClass('chosen-with-drop chosen-container-active')});
$('#customField').click(function()
{
hiddenRequireFields();
});
/* Implement a custom form without feeling refresh. */
$('#formSettingForm .btn-primary').click(function()
{
var fields = '';
$('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function()
{
fields += ',' + $(this).val();
});
var link = createLink('custom', 'ajaxSaveCustomFields', 'module=task&section=custom&key=batchCreateFields');
$.post(link, {'fields' : fields}, function()
{
checkedShowFields(fields);
$('#formSetting').parent().removeClass('open');
var fieldCount = $('#batchCreateForm .table thead>tr>th:visible').length;
$('.form-actions').attr('colspan', fieldCount);
if($('th.c-name').width() < 165) $('th.c-name').width(165);
});
return false;
});
});
$(document).on('change', "[name^='estStarted'], [name^='deadline']", function()
+61
View File
@@ -20,3 +20,64 @@ function setStoryModule()
}
}
/**
* Checked show fields.
*
* @param string fields
* @access public
* @return void
*/
function checkedShowFields(fields)
{
var fieldList = ',' + fields + ',';
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
{
var field = ',' + $(this).val() + ',';
var $field = config.currentMethod == 'create' ? $('#' + $(this).val()) : $('[name^=' + $(this).val() + ']');
var $fieldBox = $('.' + $(this).val() + 'Box' );
if(fieldList.indexOf(field) >= 0)
{
$fieldBox.removeClass('hidden');
$field.removeAttr('disabled');
}
else if(!$fieldBox.hasClass('hidden'))
{
$fieldBox.addClass('hidden');
$field.attr('disabled', true);
}
});
if(config.currentMethod == 'create');
{
if(fieldList.indexOf(',estStarted,') >= 0 && fieldList.indexOf(',deadline,') >= 0)
{
$('.borderBox').removeClass('hidden');
}
else if(fieldList.indexOf(',estStarted,') >= 0 || fieldList.indexOf(',deadline,') >= 0)
{
$('.datePlanBox').removeClass('hidden');
if(!$('.borderBox').hasClass('hidden')) $('.borderBox').addClass('hidden');
}
else
{
if(!$('.borderBox').hasClass('hidden')) $('.borderBox').addClass('hidden');
if(!$('.datePlanBox').hasClass('hidden')) $('.datePlanBox').addClass('hidden');
}
}
}
/**
* Hidden require field.
*
* @access public
* @return void
*/
function hiddenRequireFields()
{
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
{
var field = ',' + $(this).val() + ',';
var required = ',' + requiredFields + ',';
if(required.indexOf(field) >= 0) $(this).closest('div').addClass('hidden');
});
}
+27
View File
@@ -1,3 +1,30 @@
$(function()
{
$('#customField').click(function()
{
hiddenRequireFields();
});
/* Implement a custom form without feeling refresh. */
$('#formSettingForm .btn-primary').click(function()
{
var fields = '';
$('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function()
{
fields += ',' + $(this).val();
});
var link = createLink('custom', 'ajaxSaveCustomFields', 'module=task&section=custom&key=createFields');
$.post(link, {'fields' : fields}, function()
{
checkedShowFields(fields);
$('#formSetting').parent().removeClass('open');
});
return false;
});
})
/**
* Load module, stories and members.
*
+9 -1
View File
@@ -8,5 +8,13 @@ $(function()
totalConsumed = Math.round(totalConsumed * 1000) / 1000;
$('#totalConsumed').html(totalConsumed);
$('#consumed').val(totalConsumed);
})
})
$('#submit').click(function()
{
if(task.consumed != 0 && $('#currentConsumed').val() == 0)
{
return confirm(consumedEmpty);
}
})
})
+2 -1
View File
@@ -252,7 +252,8 @@ $lang->task->error->skipClose = 'Aufgabe: %s ist nicht “Erledigt” od
$lang->task->error->closeParent = 'Task: %s is the Parent Task, which is automatically closed after all subtasks under the Parent Task are closed and cannot be closed manually.';
$lang->task->error->consumed = 'Aufgabe: %s Hour must be more than 0. Ignore changes to this Task.';
$lang->task->error->assignedTo = 'Mehere Tasks können nicht zugewisen werden, da die Benutzer nicht teil des Teams sind.';
$lang->task->error->consumedEmpty = '"Current Cost" should not be 0.';
$lang->task->error->consumedEmpty = 'Cannot finish the task with 0 "Total Cost", please enter "Current Cost".';
$lang->task->error->consumedEmptyAB = '"Current Cost" is 0, please confirm whether you submit.';
$lang->task->error->deadlineSmall = '"Deadline" must be greater than "StartDate".';
$lang->task->error->alreadyStarted = 'You cannot start this task, because it is started.';
$lang->task->error->realStartedEmpty = '"Real Started" should not be empty.';
+2 -1
View File
@@ -252,7 +252,8 @@ $lang->task->error->skipClose = 'Task: %s is not “Finished” or “Ca
$lang->task->error->closeParent = 'Task: %s is the Parent Task, which is automatically closed after all subtasks under the Parent Task are closed and cannot be closed manually.';
$lang->task->error->consumed = 'Task: %s hour must be < 0. Ignore changes to this task.';
$lang->task->error->assignedTo = 'Multi-user task in the current status cannot be assigned to a member who is not in the task team.';
$lang->task->error->consumedEmpty = '"Current Cost" should not be 0.';
$lang->task->error->consumedEmpty = 'Cannot finish the task with 0 "Total Cost", please enter "Current Cost".';
$lang->task->error->consumedEmptyAB = '"Current Cost" is 0, please confirm whether you submit.';
$lang->task->error->deadlineSmall = '"Deadline" must be greater than "StartDate".';
$lang->task->error->alreadyStarted = 'You cannot start this task, because it is started.';
$lang->task->error->realStartedEmpty = '"Real Started" should not be empty.';
+2 -1
View File
@@ -252,7 +252,8 @@ $lang->task->error->skipClose = 'Tâche: %s non “Finie” ou “Annul
$lang->task->error->closeParent = 'Task: %s is the Parent Task, which is automatically closed after all subtasks under the Parent Task are closed and cannot be closed manually.';
$lang->task->error->consumed = 'Tâche: %s heures doivent être < 0. Ignorer changements de cette tâche.';
$lang->task->error->assignedTo = "Tâche Multi-user dans le statut courant ne peut pas être assignée à un membre qui ne fait pas partie de l'équipe.";
$lang->task->error->consumedEmpty = '"Coût Actuel" ne devrait pas être 0.';
$lang->task->error->consumedEmpty = 'Lorsque la "Coût Total" est de 0, la tâche ne peut pas être terminée. Veuillez d\'abord remplir "Coût Actuel".';
$lang->task->error->consumedEmptyAB = '"Coût Actuel" est de 0, veuillez confirmer si vous souhaitez continuer à soumettre.';
$lang->task->error->deadlineSmall = '"Date Limite" doit être supérieur à la "Date de Départ".';
$lang->task->error->alreadyStarted = 'You cannot start this task, because it is started.';
$lang->task->error->realStartedEmpty = '"Real Started" should not be empty.';
+2 -1
View File
@@ -252,7 +252,8 @@ $lang->task->error->skipClose = '任务:%s 不是“已完成”或“
$lang->task->error->closeParent = '任务:%s 是父任务,父任务在所有子任务关闭后会自动关闭,无法手动关闭。';
$lang->task->error->consumed = '任务:%s工时不能小于0,忽略该任务工时的改动';
$lang->task->error->assignedTo = '当前状态的多人任务不能指派给任务团队外的成员。';
$lang->task->error->consumedEmpty = '"本次消耗"不能为0';
$lang->task->error->consumedEmpty = '总计消耗为0时不能完成任务,请填写本次消耗工时';
$lang->task->error->consumedEmptyAB = '"本次消耗"为0,请确认是否提交。';
$lang->task->error->deadlineSmall = '"截止日期"必须大于"预计开始"';
$lang->task->error->alreadyStarted = '此任务已被启动,不能重复启动!';
$lang->task->error->realStartedEmpty = '实际开始不能为空';
+5 -2
View File
@@ -1879,7 +1879,7 @@ class taskModel extends model
return false;
}
if(empty($currentConsumed))
if(empty($currentConsumed) and $oldTask->consumed == '0')
{
dao::$errors[] = $this->lang->task->error->consumedEmpty;
return false;
@@ -3408,7 +3408,7 @@ class taskModel extends model
if($id == 'status') $class .= ' task-' . $task->status;
if($id == 'id') $class .= ' cell-id';
if($id == 'name') $class .= ' text-left';
if($id == 'deadline') $class .= ' text-center';
if($id == 'deadline') $class .= ' text-left';
if($id == 'deadline' and isset($task->delay)) $class .= ' delayed';
if($id == 'assignedTo') $class .= ' has-btn text-left';
if($id == 'lane') $class .= ' text-left';
@@ -3427,6 +3427,9 @@ class taskModel extends model
$title = " title='{$value} {$this->lang->execution->workHour}'";
}
if($id == 'lane') $title = " title='{$task->lane}'";
if($id == 'finishedBy') $title = " title='" . zget($users, $task->finishedBy) . "'";
if($id == 'openedBy') $title = " title='" . zget($users, $task->openedBy) . "'";
if($id == 'lastEditedBy') $title = " title='" . zget($users, $task->lastEditedBy) . "'";
echo "<td class='" . $class . "'" . $title . ">";
if($this->config->edition != 'open') $this->loadModel('flow')->printFlowCell('task', $task, $id);
+45 -42
View File
@@ -15,6 +15,26 @@
<?php js::set('taskConsumed', $taskConsumed);?>
<?php js::set('addChildTask', $lang->task->addChildTask);?>
<?php js::set('isonlybody', isonlybody())?>
<?php js::set('requiredFields', $config->task->create->requiredFields);?>
<?php
$visibleFields = array();
$requiredFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field) $visibleFields[$field] = '';
}
foreach(explode(',', $config->task->create->requiredFields) as $field)
{
if($field)
{
$requiredFields[$field] = '';
if(strpos(",{$config->task->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
}
}
$colspan = count($visibleFields) + 3;
?>
<?php js::set('showFields', $showFields);?>
<div id="mainContent" class="main-content fade">
<div class="main-header clearfix">
<h2 class="pull-left">
@@ -40,32 +60,15 @@
<?php endif;?>
</div>
</div>
<?php
$visibleFields = array();
$requiredFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field)$visibleFields[$field] = '';
}
foreach(explode(',', $config->task->create->requiredFields) as $field)
{
if($field)
{
$requiredFields[$field] = '';
if(strpos(",{$config->task->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
}
}
$colspan = count($visibleFields) + 3;
?>
<form method='post' class='batch-actions-form' target='hiddenwin' enctype='multipart/form-data' id="batchCreateForm">
<div class="table-responsive">
<table class="table table-form" id="tableBody">
<thead>
<tr>
<th class='c-id'><?php echo $lang->idAB;?></th>
<th class='c-module<?php echo zget($visibleFields, 'module', ' hidden') . zget($requiredFields, 'module', '', ' required');?>'><?php echo $lang->task->module?></th>
<th class='c-module<?php echo zget($visibleFields, 'module', ' hidden') . zget($requiredFields, 'module', '', ' required');?> moduleBox'><?php echo $lang->task->module?></th>
<?php if($execution->type != 'ops'):?>
<th class='c-story<?php echo zget($visibleFields, 'story', ' hidden') . zget($requiredFields, 'story', '', ' required');?>'><?php echo $lang->task->story;?></th>
<th class='c-story<?php echo zget($visibleFields, 'story', ' hidden') . zget($requiredFields, 'story', '', ' required');?> storyBox'><?php echo $lang->task->story;?></th>
<?php endif;?>
<th class='c-name required has-btn'><?php echo $lang->task->name;?></span></th>
<?php if($execution->type == 'kanban'):?>
@@ -73,12 +76,12 @@
<th class='c-module'><?php echo $lang->kanbancard->lane;?></th>
<?php endif;?>
<th class='c-type required'><?php echo $lang->typeAB;?></span></th>
<th class='c-assigned<?php echo zget($visibleFields, 'assignedTo', ' hidden') . zget($requiredFields, 'assignedTo', '', ' required');?>'><?php echo $lang->task->assignedTo;?></th>
<th class='c-estimate<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', '', ' required');?>'><?php echo $lang->task->estimateAB;?></th>
<th class='c-date<?php echo zget($visibleFields, 'estStarted', ' hidden') . zget($requiredFields, 'estStarted', '', ' required');?>'><?php echo $lang->task->estStarted;?></th>
<th class='c-date<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?>'><?php echo $lang->task->deadline;?></th>
<th class='c-desc<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?>'><?php echo $lang->task->desc;?></th>
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?>'><?php echo $lang->task->pri;?></th>
<th class='c-assigned<?php echo zget($visibleFields, 'assignedTo', ' hidden') . zget($requiredFields, 'assignedTo', '', ' required');?> assignedToBox'><?php echo $lang->task->assignedTo;?></th>
<th class='c-estimate<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', '', ' required');?> estimateBox'><?php echo $lang->task->estimateAB;?></th>
<th class='c-date<?php echo zget($visibleFields, 'estStarted', ' hidden') . zget($requiredFields, 'estStarted', '', ' required');?> estStartedBox'><?php echo $lang->task->estStarted;?></th>
<th class='c-date<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?> deadlineBox'><?php echo $lang->task->deadline;?></th>
<th class='c-desc<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?> descBox'><?php echo $lang->task->desc;?></th>
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?> priBox'><?php echo $lang->task->pri;?></th>
<?php
$extendFields = $this->task->getFlowExtendFields();
foreach($extendFields as $extendField)
@@ -112,13 +115,13 @@
?>
<?php $pri = 3;?>
<tr>
<td class='text-center'><?php echo $i;?></td>
<td <?php echo zget($visibleFields, 'module', "class='hidden'")?> style='overflow:visible'>
<td class='text-left'><?php echo $i;?></td>
<td class="<?php echo zget($visibleFields, 'module', 'hidden')?> moduleBox" style='overflow:visible'>
<?php echo html::select("module[$i]", $modules, $moduleID, "class='form-control chosen'")?>
<?php echo html::hidden("parent[$i]", $parent);?>
</td>
<?php if($execution->type != 'ops'):?>
<td <?php echo zget($visibleFields, 'story', "class='hidden'");?> style='overflow: visible'>
<td class="<?php echo zget($visibleFields, 'story', 'hidden');?> storyBox" 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'>
@@ -146,9 +149,9 @@
<td><?php echo html::select("lanes[$i]", $lanePairs, $laneID, "class='form-control chosen'");?></td>
<?php endif;?>
<td><?php echo html::select("type[$i]", $lang->task->typeList, $type, 'class=form-control');?></td>
<td <?php echo zget($visibleFields, 'assignedTo', "class='hidden'")?> style='overflow:visible'><?php echo html::select("assignedTo[$i]", $members, $member, "class='form-control chosen'");?></td>
<td <?php echo zget($visibleFields, 'estimate', "class='hidden'")?>><?php echo html::input("estimate[$i]", '', "class='form-control text-center'");?></td>
<td <?php echo zget($visibleFields, 'estStarted', "class='hidden'")?>>
<td class="<?php echo zget($visibleFields, 'assignedTo', 'hidden')?> assignedToBox" style='overflow:visible'><?php echo html::select("assignedTo[$i]", $members, $member, "class='form-control chosen'");?></td>
<td class="<?php echo zget($visibleFields, 'estimate', 'hidden')?> estimateBox"><?php echo html::input("estimate[$i]", '', "class='form-control text-center'");?></td>
<td class="<?php echo zget($visibleFields, 'estStarted', 'hidden')?> estStartedBox">
<div class='input-group'>
<?php
echo html::input("estStarted[$i]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
@@ -156,7 +159,7 @@
?>
</div>
</td>
<td <?php echo zget($visibleFields, 'deadline', "class='hidden'")?>>
<td class="<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox">
<div class='input-group'>
<?php
echo html::input("deadline[$i]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
@@ -164,8 +167,8 @@
?>
</div>
</td>
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("desc[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pri[$i]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
<td class="<?php echo zget($visibleFields, 'desc', 'hidden')?> descBox"><?php echo html::textarea("desc[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td class="<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox"><?php echo html::select("pri[$i]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . "</td>";
@@ -189,11 +192,11 @@
<tbody>
<tr>
<td class='text-center'>%s</td>
<td <?php echo zget($visibleFields, 'module', "class='hidden'")?> style='overflow:visible'>
<td class="<?php echo zget($visibleFields, 'module', 'hidden')?> moduleBox" style='overflow:visible'>
<?php echo html::select("module[%s]", $modules, $moduleID, "class='form-control chosen' onchange='setStories(this.value, $execution->id, \"%s\")'")?>
<?php echo html::hidden("parent[%s]", $parent);?>
</td>
<td <?php echo zget($visibleFields, 'story', "class='hidden'");?> style='overflow: visible'>
<td class="<?php echo zget($visibleFields, 'story', 'hidden');?> storyBox" style='overflow: visible'>
<div class='input-group'>
<?php echo html::select("story[%s]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated(\"%s\")'");?>
<span class='input-group-btn'>
@@ -216,9 +219,9 @@
</div>
</td>
<td><?php echo html::select("type[%s]", $lang->task->typeList, $type, 'class="form-control"');?></td>
<td <?php echo zget($visibleFields, 'assignedTo', "class='hidden'")?> style='overflow:visible'><?php echo html::select("assignedTo[%s]", $members, $member, "class='form-control chosen'");?></td>
<td <?php echo zget($visibleFields, 'estimate', "class='hidden'")?>><?php echo html::input("estimate[%s]", '', "class='form-control text-center'");?></td>
<td <?php echo zget($visibleFields, 'estStarted', "class='hidden'")?>>
<td class="<?php echo zget($visibleFields, 'assignedTo', 'hidden')?> assignedToBox" style='overflow:visible'><?php echo html::select("assignedTo[%s]", $members, $member, "class='form-control chosen'");?></td>
<td class="<?php echo zget($visibleFields, 'estimate', 'hidden')?> estimateBox"><?php echo html::input("estimate[%s]", '', "class='form-control text-center'");?></td>
<td class="<?php echo zget($visibleFields, 'estStarted', 'hidden')?> estStartedBox">
<div class='input-group'>
<?php
echo html::input("estStarted[%s]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
@@ -226,15 +229,15 @@
?>
</div>
</td>
<td <?php echo zget($visibleFields, 'deadline', "class='hidden'")?>>
<td class="<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox">
<div class='input-group'>
<?php
echo html::input("deadline[%s]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
echo "<span class='input-group-addon deadlineBox'><input type='checkbox' name='deadlineDitto[%s]' id='deadlineDitto%s' checked/>{$lang->task->ditto}</span>";
?>
</div>
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("desc[%s]", '', "rows='1' class='form-control autosize'");?></td>
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pri[%s]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
<td class="<?php echo zget($visibleFields, 'desc', 'hidden')?> descBox"><?php echo html::textarea("desc[%s]", '', "rows='1' class='form-control autosize'");?></td>
<td class="<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox"><?php echo html::select("pri[%s]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[%s]") . "</td>";
+26 -34
View File
@@ -17,9 +17,17 @@
<?php js::set('blockID', $blockID);?>
<?php js::set('teamMemberError', $lang->task->error->teamMember);?>
<?php js::set('vision', $config->vision);?>
<?php js::set('requiredFields', $config->task->create->requiredFields);?>
<?php if(!empty($storyID)):?>
<style> .title-group.required > .required:after {right: 110px;}</style>
<?php endif;?>
<?php
foreach(explode(',', $config->task->create->requiredFields) as $field)
{
if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field;
}
?>
<?php js::set('showFields', $showFields);?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
@@ -29,12 +37,6 @@
<?php include '../../common/view/customfield.html.php';?>
</div>
</div>
<?php
foreach(explode(',', $config->task->create->requiredFields) as $field)
{
if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field;
}
?>
<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'):?>
@@ -97,8 +99,8 @@
<td><?php echo html::hidden('status', 'wait');?></td>
</tr>
<?php $this->printExtendFields('', 'table', 'columns=3');?>
<?php if(strpos(",$showFields,", ',story,') !== false and $execution->lifetime != 'ops'):?>
<tr>
<?php $hiddenStory = (strpos(",$showFields,", ',story,') !== false and $execution->lifetime != 'ops') ? '' : 'hidden'?>
<tr class="<?php echo $hiddenStory?> storyBox">
<th><?php echo $lang->task->story;?></th>
<td colspan='3'>
<span id='storyBox' class="<?php if(!empty($stories)) echo 'hidden';?> "><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('execution', 'linkStory', "executionID=$execution->id"), $lang->execution->linkStory, '', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?></span>
@@ -110,7 +112,6 @@
</div>
</td>
</tr>
<?php endif;?>
<?php if($execution->type != 'ops'):?>
<tr id='testStoryBox' class='hidden'>
<th><?php echo $lang->task->selectTestStory;?></th>
@@ -174,8 +175,8 @@
<a href='javascript:copyStoryTitle();' id='copyButton' class='input-control-icon-right'><?php echo $lang->task->copyStoryTitle;?></a>
<?php echo html::hidden("storyEstimate") . html::hidden("storyDesc") . html::hidden("storyPri");?>
</div>
<?php if(strpos(",$showFields,", ',pri,') !== false): // begin print pri selector?>
<span class="input-group-addon fix-border br-0"><?php echo $lang->task->pri;?></span>
<?php $hiddenPri = strpos(",$showFields,", ',pri,') !== false ? '' : 'hidden'; // begin print pri selector?>
<span class="input-group-addon fix-border br-0 <?php echo $hiddenPri;?> priBox"><?php echo $lang->task->pri;?></span>
<?php
$hasCustomPri = false;
foreach($lang->task->priList as $priKey => $priValue)
@@ -195,9 +196,9 @@
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control'");?>
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control $hiddenPri'");?>
<?php else: ?>
<div class="input-group-btn pri-selector" data-type="pri">
<div class="input-group-btn pri-selector <?php echo $hiddenPri;?> priBox" data-type="pri">
<button type="button" class="btn dropdown-toggle br-0" data-toggle="dropdown">
<span class="pri-text"><span class="label-pri label-pri-<?php echo empty($task->pri) ? '0' : $task->pri?>" title="<?php echo $task->pri?>"><?php echo $task->pri?></span></span> &nbsp;<span class="caret"></span>
</button>
@@ -206,15 +207,13 @@
</div>
</div>
<?php endif; ?>
<?php endif; // end print pri selector ?>
<?php if(strpos(",$showFields,", ',estimate,') !== false):?>
<div class='table-col w-120px'>
<?php $hiddenEstimate = strpos(",$showFields,", ',estimate,') !== false ? '' : 'hidden';?>
<div class="table-col w-120px <?php echo $hiddenEstimate;?> estimateBox">
<div class="input-group">
<span class="input-group-addon fix-border br-0"><?php echo $lang->task->estimateAB;?></span>
<input type="text" name="estimate" id="estimate" value="<?php echo $task->estimate;?>" class="form-control" autocomplete="off">
</div>
</div>
<?php endif;?>
</div>
</div>
</td>
@@ -231,29 +230,23 @@
<td colspan='3'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<?php
$hiddenEstStarted = strpos(",$showFields,", ',estStarted,') === false;
$hiddenDeadline = strpos(",$showFields,", ',deadline,') === false;
$hiddenEstStarted = strpos(",$showFields,", ',estStarted,') === false ? 'hidden' : '';
$hiddenDeadline = strpos(",$showFields,", ',deadline,') === false ? 'hidden' : '';
$hiddenDatePlan = (!$hiddenEstStarted or !$hiddenDeadline) ? '' : 'hidden';
?>
<?php if(!$hiddenEstStarted or !$hiddenDeadline):?>
<tr>
<tr class="<?php echo $hiddenDatePlan?> datePlanBox">
<th><?php echo $lang->task->datePlan;?></th>
<td colspan='2'>
<div class='input-group'>
<?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;?>
<?php echo html::input('estStarted', $task->estStarted, "class='form-control form-date $hiddenEstStarted estStartedBox' placeholder='{$lang->task->estStarted}'");?>
<?php $hiddenborder = (!$hiddenEstStarted and !$hiddenDeadline) ? '' : 'hidden';?>
<span class="input-group-addon fix-border <?php echo $hiddenborder?> borderBox">~</span>
<?php echo html::input('deadline', $task->deadline, "class='form-control form-date $hiddenDeadline deadlineBox' placeholder='{$lang->task->deadline}'");?>
</div>
</td>
</tr>
<?php endif;?>
<?php if(strpos(",$showFields,", ',mailto,') !== false):?>
<tr>
<?php $hiddenMailto = strpos(",$showFields,", ',mailto,') !== false ? '' : 'hidden';?>
<tr class="<?php echo $hiddenMailto?> mailtoBox">
<th><?php echo $lang->story->mailto;?></th>
<td colspan='3'>
<div class="input-group">
@@ -262,7 +255,6 @@
</div>
</td>
</tr>
<?php endif;?>
<?php if(!isonlybody()):?>
<tr id='after-tr'>
<th><?php echo $lang->task->afterSubmit;?></th>
+3 -1
View File
@@ -13,6 +13,8 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::set('task', $task);?>
<?php js::set('consumedEmpty', $lang->task->error->consumedEmptyAB);?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<?php if(!empty($task->team) and (!isset($task->team[$app->user->account]) or ($task->assignedTo != $app->user->account and $task->mode == 'linear'))):?>
@@ -59,7 +61,7 @@
<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
<?php
echo "<span id='totalConsumed'>" . (float)$consumed . "</span> " . $lang->workingHour . html::hidden('consumed', $consumed);
js::set('consumed', $consumed);
?>
+8
View File
@@ -0,0 +1,8 @@
$(function()
{
$('#submit').click(function()
{
$(this).addClass('disabled');
$('#upgradingTips').removeClass('hidden');
});
});
+1
View File
@@ -48,6 +48,7 @@ $lang->upgrade->fromVersion = 'Von Version';
$lang->upgrade->toVersion = 'Upgrade nach Version';
$lang->upgrade->confirm = 'SQL Bestätigen';
$lang->upgrade->sureExecute = 'Ausführen';
$lang->upgrade->upgradingTips = 'The upgrade is in progress, please be patient. Do not refresh the page, blackout, or turn off your computer!';
$lang->upgrade->forbiddenExt = 'Die Erweiterung ist nicht kompatibel mit der Upgradeversion. Sie wurde deaktiviert:';
$lang->upgrade->updateFile = 'Updateinformation wurden hinzugefügt.';
$lang->upgrade->noticeSQL = 'Your database is inconsistent with the standard and it failed to fix it. Please run the following SQL and refresh.';
+1
View File
@@ -48,6 +48,7 @@ $lang->upgrade->fromVersion = 'From';
$lang->upgrade->toVersion = 'To';
$lang->upgrade->confirm = 'Confirm SQL';
$lang->upgrade->sureExecute = 'Execute';
$lang->upgrade->upgradingTips = 'The upgrade is in progress, please be patient. Do not refresh the page, blackout, or turn off your computer!';
$lang->upgrade->forbiddenExt = 'The extension is incompatible with the version. It has been deactivated:';
$lang->upgrade->updateFile = 'File information has to be updated.';
$lang->upgrade->noticeSQL = 'Your database is inconsistent with the standard and it failed to fix it. Please run the following SQL and refresh.';
+1
View File
@@ -48,6 +48,7 @@ $lang->upgrade->fromVersion = 'De';
$lang->upgrade->toVersion = 'à';
$lang->upgrade->confirm = 'Confirmez SQL';
$lang->upgrade->sureExecute = 'Executez';
$lang->upgrade->upgradingTips = 'La mise à jour est en cours, veuillez être patient. Ne pas actualiser la page ou éteindre votre ordinateur!';
$lang->upgrade->forbiddenExt = 'Cette extension est incompatible avec la version. Elle a été désactivée :';
$lang->upgrade->updateFile = "Le fichier information a besoin d'une mise à jour.";
$lang->upgrade->noticeSQL = 'Votre base de donnée est inconsistente avec le standard et il y a eu un échec pour la corriger. Exécutez la commande SQL suivante et rafraichissez.';
+1
View File
@@ -48,6 +48,7 @@ $lang->upgrade->fromVersion = '原来的版本';
$lang->upgrade->toVersion = '升级到';
$lang->upgrade->confirm = '确认要执行的SQL语句';
$lang->upgrade->sureExecute = '确认执行';
$lang->upgrade->upgradingTips = '正在升级中,请耐心等待,切勿刷新页面、断电、关机!';
$lang->upgrade->forbiddenExt = '以下插件与新版本不兼容,已经自动禁用:';
$lang->upgrade->updateFile = '需要更新附件信息。';
$lang->upgrade->noticeSQL = '检查到你的数据库跟标准不一致,尝试修复失败。请执行以下SQL语句,再刷新页面检查。';
+4 -1
View File
@@ -19,7 +19,10 @@
<div class='modal-body'>
<textarea rows='20' class='form-control' readonly='readonly'><?php echo $confirm;?></textarea>
</div>
<div class='modal-footer'><?php echo html::submitButton($lang->upgrade->sureExecute) . html::hidden('fromVersion', $fromVersion);?></div>
<div class='modal-footer'>
<?php echo html::submitButton($lang->upgrade->sureExecute) . html::hidden('fromVersion', $fromVersion);?>
<p style='margin-top:10px;' class='text-danger hidden' id='upgradingTips'><?php echo $lang->upgrade->upgradingTips;?></p>
</div>
</div>
</form>
</div>
+1 -1
View File
@@ -969,7 +969,7 @@ class user extends control
}
else
{
$loginExpired = !(preg_match("/(m=|\/)(index)(&f=|-)(index)(&|-|\.)?/", strtolower($this->referer), $output) or $this->referer == '/' or $this->referer == '/zentao/' or empty($this->referer));
$loginExpired = !(preg_match("/(m=|\/)(index)(&f=|-)(index)(&|-|\.)?/", strtolower($this->referer), $output) or $this->referer == $this->config->webRoot or empty($this->referer));
$this->loadModel('misc');
$this->loadModel('extension');