Merge branch 'sprint202_leiyong_task_56926' into 'master'
Sprint202 leiyong task 56926 See merge request easycorp/zentaopms!3942
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
<style>
|
||||
.histories-list > li {word-break: break-word; word-wrap: break-word;}
|
||||
.history-changes del {padding-left: 3px;}
|
||||
#actionbox > .detail-content {width:100%; max-height: 800px; overflow: scroll;}
|
||||
</style>
|
||||
<script>
|
||||
$(function()
|
||||
|
||||
@@ -1733,6 +1733,7 @@ class execution extends control
|
||||
public function batchEdit($executionID = 0)
|
||||
{
|
||||
$this->app->loadLang('stage');
|
||||
$this->app->loadLang('programplan');
|
||||
|
||||
if($this->post->names)
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
$status = $from == 'execution' ? 'execStatus' : 'status';
|
||||
|
||||
?>
|
||||
<form class='main-form' method='post' target='hiddenwin' action='<?php echo inLink('batchEdit');?>'>
|
||||
<form class='main-form' method='post' target='hiddenwin' id='executionForm' action='<?php echo inLink('batchEdit');?>'>
|
||||
<div class="table-responsive">
|
||||
<table class='table table-form'>
|
||||
<thead>
|
||||
@@ -85,7 +85,7 @@
|
||||
<?php if($config->systemMode == 'new' and isset($project) and $project->model == 'scrum'):?>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("projects[$executionID]", $allProjects, $executions[$executionID]->project, "class='form-control picker-select' data-lastselected='{$executions[$executionID]->project}' onchange='changeProject(this, $executionID, {$executions[$executionID]->project})'");?></td>
|
||||
<?php endif;?>
|
||||
<td title='<?php echo $executions[$executionID]->name?>'><?php echo html::input("names[$executionID]", $executions[$executionID]->name, "class='form-control'");?></td>
|
||||
<td title='<?php echo $executions[$executionID]->name?>'><?php echo html::input("names[$executionID]", $executions[$executionID]->name, "id='names{$executionID}' class='form-control'");?></td>
|
||||
<td><?php echo html::input("codes[$executionID]", $executions[$executionID]->code, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'PM', ' hidden')?>' style='overflow:visible'><?php echo html::select("PMs[$executionID]", $pmUsers, $executions[$executionID]->PM, "class='form-control picker-select'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'PO', ' hidden')?>' style='overflow:visible'><?php echo html::select("POs[$executionID]", $poUsers, $executions[$executionID]->PO, "class='form-control picker-select'");?></td>
|
||||
@@ -104,8 +104,8 @@
|
||||
?>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'status', 'hidden')?>'><?php echo html::select("statuses[$executionID]", $lang->execution->statusList, $executions[$executionID]->status, 'class=form-control');?></td>
|
||||
<td><?php echo html::input("begins[$executionID]", $executions[$executionID]->begin, "class='form-control form-date' onchange='computeWorkDays(this.id)'");?></td>
|
||||
<td><?php echo html::input("ends[$executionID]", $executions[$executionID]->end, "class='form-control form-date' onchange='computeWorkDays(this.id)'");?></td>
|
||||
<td><?php echo html::input("begins[$executionID]", $executions[$executionID]->begin, "id='begins{$executionID}' class='form-control form-date' onchange='computeWorkDays(this.id)'");?></td>
|
||||
<td><?php echo html::input("ends[$executionID]", $executions[$executionID]->end, "id='ends{$executionID}' class='form-control form-date' onchange='computeWorkDays(this.id)'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'desc', 'hidden')?>'> <?php echo html::textarea("descs[$executionID]", $executions[$executionID]->desc, "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'teamname', 'hidden')?>'><?php echo html::input("teams[$executionID]", $executions[$executionID]->team, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'days', 'hidden')?>'>
|
||||
@@ -136,6 +136,63 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php js::set('weekend', $config->execution->weekend);?>
|
||||
<?php js::set('confirmSync', $lang->execution->confirmSync);?>
|
||||
<?php
|
||||
js::set('weekend', $config->execution->weekend);
|
||||
js::set('confirmSync', $lang->execution->confirmSync);
|
||||
js::set('emptyBegin', $lang->programplan->emptyBegin);
|
||||
js::set('emptyEnd', $lang->programplan->emptyEnd);
|
||||
js::set('planFinishSmall', $lang->programplan->error->planFinishSmall);
|
||||
?>
|
||||
|
||||
<script>
|
||||
$('#executionForm').submit(function()
|
||||
{
|
||||
var submitForm = true;
|
||||
$('input[name^=begins]').each(function()
|
||||
{
|
||||
var beginDate = $(this).val();
|
||||
var beginDateID = $(this).attr('id');
|
||||
|
||||
var nameID = beginDateID.replace('begins', 'names');
|
||||
var endDateID = beginDateID.replace('begins', 'ends');
|
||||
$('#help' + beginDateID).remove();
|
||||
$('#help' + endDateID).remove();
|
||||
|
||||
// Invalid data is skipped.
|
||||
var nameVal = $('#' + nameID).val()
|
||||
if(!nameVal) return;
|
||||
|
||||
// Check if the begin date is empty.
|
||||
if(!beginDate)
|
||||
{
|
||||
submitForm = false;
|
||||
var emptyBeginHtml = '<div id="help' + beginDateID + '" class="text-danger help-text">' + emptyBegin + '</div>';
|
||||
$(this).after(emptyBeginHtml);
|
||||
alert(emptyBegin);
|
||||
return false;
|
||||
}
|
||||
|
||||
var endDate = $('#' + endDateID).val();
|
||||
if(!endDate)
|
||||
{
|
||||
submitForm = false;
|
||||
var emptyEndHtml = '<div id="help' + endDateID + '" class="text-danger help-text">' + emptyEnd + '</div>';
|
||||
$('#' + endDateID).after(emptyEndHtml);
|
||||
alert(emptyEnd);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(endDate < beginDate)
|
||||
{
|
||||
submitForm = false;
|
||||
var emptyEndHtml = '<div id="help' + endDateID + '" class="text-danger help-text">' + planFinishSmall + '</div>';
|
||||
$('#' + endDateID).after(emptyEndHtml);
|
||||
alert(planFinishSmall);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if(!submitForm) return false;
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -14,6 +14,7 @@ function setMailto(field, value)
|
||||
$('#team').replaceWith(data);
|
||||
$('#team_chosen').remove();
|
||||
$('#team').chosen();
|
||||
$('.picker.picker-multi').remove();
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,11 @@
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<style> .c-actions {width: 240px;} </style>
|
||||
<style>
|
||||
.c-actions {width: 250px;}
|
||||
#productplanList .c-actions .btn+.btn {margin-left: -1px;}
|
||||
#productplanList .c-actions .btn {display: block; float: left;}
|
||||
</style>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php foreach(customModel::getFeatureMenu($this->moduleName, $this->methodName) as $menuItem):?>
|
||||
|
||||
@@ -205,5 +205,63 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<script>$('[data-toggle="popover"]').popover();</script>
|
||||
<?php
|
||||
js::set('emptyBegin', $lang->programplan->emptyBegin);
|
||||
js::set('emptyEnd', $lang->programplan->emptyEnd);
|
||||
js::set('planFinishSmall', $lang->programplan->error->planFinishSmall);
|
||||
?>
|
||||
<script>
|
||||
$('[data-toggle="popover"]').popover();
|
||||
|
||||
$('#planForm').submit(function()
|
||||
{
|
||||
var submitForm = true;
|
||||
$('input[name^=begin]').each(function()
|
||||
{
|
||||
var beginDate = $(this).val();
|
||||
var beginDateID = $(this).attr('id');
|
||||
if(beginDateID == 'begin%i%') return;
|
||||
|
||||
var nameID = beginDateID.replace('begin', 'names');
|
||||
var endDateID = beginDateID.replace('begin', 'end');
|
||||
$('#help' + beginDateID).remove();
|
||||
$('#help' + endDateID).remove();
|
||||
|
||||
// Invalid data is skipped.
|
||||
var nameVal = $('#' + nameID).val()
|
||||
if(!nameVal) return;
|
||||
|
||||
// Check if the begin date is empty.
|
||||
if(!beginDate)
|
||||
{
|
||||
submitForm = false;
|
||||
var emptyBeginHtml = '<div id="help' + beginDateID + '" class="text-danger help-text">' + emptyBegin + '</div>';
|
||||
$(this).after(emptyBeginHtml);
|
||||
alert(emptyBegin);
|
||||
return false;
|
||||
}
|
||||
|
||||
var endDate = $('#' + endDateID).val();
|
||||
if(!endDate)
|
||||
{
|
||||
submitForm = false;
|
||||
var emptyEndHtml = '<div id="help' + endDateID + '" class="text-danger help-text">' + emptyEnd + '</div>';
|
||||
$('#' + endDateID).after(emptyEndHtml);
|
||||
alert(emptyEnd);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(endDate < beginDate)
|
||||
{
|
||||
submitForm = false;
|
||||
var emptyEndHtml = '<div id="help' + endDateID + '" class="text-danger help-text">' + planFinishSmall + '</div>';
|
||||
$('#' + endDateID).after(emptyEndHtml);
|
||||
alert(planFinishSmall);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if(!submitForm) return false;
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1213,7 +1213,7 @@ class user extends control
|
||||
{
|
||||
$contactList = $this->user->getContactLists($this->app->user->account, 'withnote');
|
||||
if(empty($contactList)) return false;
|
||||
return print(html::select('', $contactList, '', "class='form-control' onchange=\"setMailto('$dropdownName', this.value)\""));
|
||||
return print(html::select('contactListMenu', $contactList, '', "class='form-control' onchange=\"setMailto('$dropdownName', this.value)\""));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user