Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -192,7 +192,7 @@ class build extends control
|
||||
$stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in($build->stories)->andWhere('branch')->eq($build->branch)->fetchPairs('story', 'stage');
|
||||
foreach($stages as $storyID => $stage)$stories[$storyID]->stage = $stage;
|
||||
|
||||
$this->loadModel('project')->setMenu($this->projec->getExecutionPairs($this->session->PRJ), $build->project, $buildID);
|
||||
$this->loadModel('project')->setMenu($this->project->getExecutionPairs($this->session->PRJ), $build->project, $buildID);
|
||||
$projects = $this->project->getExecutionPairs($this->session->PRJ, 'all', 'empty');
|
||||
|
||||
$this->view->title = "BUILD #$build->id $build->name - " . $projects[$build->project];
|
||||
|
||||
@@ -144,7 +144,7 @@ class docModel extends model
|
||||
{
|
||||
$idList = array();
|
||||
if($type == 'product') $idList = $this->loadModel('product')->getProductIDByProject($projectID, false);
|
||||
if($type == 'project') $idList = $this->loadModel('project')->getProjectIDByProgram($projectID);
|
||||
if($type == 'project') $idList = $this->loadModel('project')->getExecutionsByProject($projectID);
|
||||
|
||||
$table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT;
|
||||
$stmt = $this->dao->select('t1.*')->from(TABLE_DOCLIB)->alias('t1')
|
||||
|
||||
@@ -4,10 +4,10 @@ $(function()
|
||||
$('#source .cell').height($('#source').height());
|
||||
$('#programBox .cell').height($('#programBox').height() - 20);
|
||||
|
||||
pgmBegin = $('.pgmParams #begin').val();
|
||||
pgmEnd = $('.pgmParams #end').val();
|
||||
setPgmBegin(pgmBegin);
|
||||
setPgmEnd(pgmEnd);
|
||||
PGMBegin = $('.programParams #begin').val();
|
||||
PGMEnd = $('.programParams #end').val();
|
||||
setPGMBegin(PGMBegin);
|
||||
setPGMEnd(PGMEnd);
|
||||
|
||||
$('[name^=lines]').change(function()
|
||||
{
|
||||
@@ -20,22 +20,22 @@ $(function()
|
||||
{
|
||||
$('[data-line=' + value + ']').prop('checked', false)
|
||||
}
|
||||
setPgmBegin(pgmBegin);
|
||||
setPgmEnd(pgmEnd);
|
||||
setPGMBegin(PGMBegin);
|
||||
setPGMEnd(PGMEnd);
|
||||
})
|
||||
|
||||
var pgmOriginEnd = $('#end').val();
|
||||
var PGMOriginEnd = $('#end').val();
|
||||
$('#longTime').change(function()
|
||||
{
|
||||
if($(this).prop('checked'))
|
||||
{
|
||||
pgmOriginEnd = $('#end').val();
|
||||
PGMOriginEnd = $('#end').val();
|
||||
$('#end').val('').attr('disabled', 'disabled');
|
||||
$('#days').val('');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#end').val(pgmOriginEnd).removeAttr('disabled');
|
||||
$('#end').val(PGMOriginEnd).removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -69,8 +69,8 @@ $(function()
|
||||
$('#PRJName').val(data);
|
||||
})
|
||||
|
||||
setPgmBegin(pgmBegin);
|
||||
setPgmEnd(pgmEnd);
|
||||
setPGMBegin(PGMBegin);
|
||||
setPGMEnd(PGMEnd);
|
||||
})
|
||||
|
||||
$('[name^=products]').change(function()
|
||||
@@ -87,8 +87,8 @@ $(function()
|
||||
{
|
||||
$('[data-product=' + value + ']').prop('checked', false)
|
||||
}
|
||||
setPgmBegin(pgmBegin);
|
||||
setPgmEnd(pgmEnd);
|
||||
setPGMBegin(PGMBegin);
|
||||
setPGMEnd(PGMEnd);
|
||||
})
|
||||
|
||||
$('[name^=sprints]').change(function()
|
||||
@@ -101,8 +101,8 @@ $(function()
|
||||
var productID = $(this).attr('data-product');
|
||||
if(productID && $('[data-productid=' + productID + ']').length > 0 && !$('[data-productid=' + productID + ']').prop('checked')) $('[data-productid=' + productID + ']').prop('checked', true);
|
||||
}
|
||||
setPgmBegin(pgmBegin);
|
||||
setPgmEnd(pgmEnd);
|
||||
setPGMBegin(PGMBegin);
|
||||
setPGMEnd(PGMEnd);
|
||||
})
|
||||
|
||||
toggleProgram($('form #newProgram0'));
|
||||
@@ -129,7 +129,7 @@ function toggleProgram(obj)
|
||||
if($obj.length == 0) return false;
|
||||
|
||||
var $programs = $obj.closest('table').find('#programs');
|
||||
var $pgmParams = $obj.closest('table').find('.pgmParams');
|
||||
var $programParams = $obj.closest('table').find('.programParams');
|
||||
if($obj.prop('checked'))
|
||||
{
|
||||
$('form #newProject0').prop('checked', true);
|
||||
@@ -137,13 +137,13 @@ function toggleProgram(obj)
|
||||
|
||||
$('#PGMName').closest('tr').show();
|
||||
$programs.attr('disabled', 'disabled');
|
||||
$pgmParams.removeClass('hidden');
|
||||
$programParams.removeClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#PGMName').closest('tr').hide();
|
||||
$programs.removeAttr('disabled');
|
||||
$pgmParams.addClass('hidden');
|
||||
$programParams.addClass('hidden');
|
||||
|
||||
toggleProject($('form #newProject0'));
|
||||
}
|
||||
@@ -155,49 +155,49 @@ function toggleProject(obj)
|
||||
if($obj.length == 0) return false;
|
||||
|
||||
var $projects = $obj.closest('table').find('#projects');
|
||||
var $pgmParams = $obj.closest('table').find('.pgmParams');
|
||||
var $programParams = $obj.closest('table').find('.programParams');
|
||||
if($obj.prop('checked'))
|
||||
{
|
||||
$projects.attr('disabled', 'disabled');
|
||||
$pgmParams.removeClass('hidden');
|
||||
$programParams.removeClass('hidden');
|
||||
if(!$('form #newProgram0').prop('checked')) $('#PGMName').closest('tr').hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
$projects.removeAttr('disabled');
|
||||
$pgmParams.addClass('hidden');
|
||||
$programParams.addClass('hidden');
|
||||
|
||||
$('form #newProgram0').prop('checked', false);
|
||||
$('#programs').removeAttr('disabled');
|
||||
}
|
||||
}
|
||||
|
||||
function setPgmBegin(pgmBegin)
|
||||
function setPGMBegin(PGMBegin)
|
||||
{
|
||||
$(':checkbox:checked[data-begin]').each(function()
|
||||
{
|
||||
begin = $(this).attr('data-begin').substr(0, 10);
|
||||
if(begin == '0000-00-00') return true;
|
||||
|
||||
if(begin < pgmBegin)
|
||||
if(begin < PGMBegin)
|
||||
{
|
||||
pgmBegin = begin;
|
||||
$('.pgmParams #begin').val(pgmBegin);
|
||||
PGMBegin = begin;
|
||||
$('.programParams #begin').val(PGMBegin);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function setPgmEnd(pgmEnd)
|
||||
function setPGMEnd(PGMEnd)
|
||||
{
|
||||
$(':checkbox:checked[data-end]').each(function()
|
||||
{
|
||||
end = $(this).attr('data-end').substr(0, 10);
|
||||
if(end == '0000-00-00') return true;
|
||||
|
||||
if(end > pgmEnd)
|
||||
if(end > PGMEnd)
|
||||
{
|
||||
pgmEnd = end;
|
||||
$('.pgmParams #end').val(pgmEnd);
|
||||
PGMEnd = end;
|
||||
$('.programParams #end').val(PGMEnd);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -32,23 +32,23 @@
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr class='pgmParams'>
|
||||
<tr class='programParams'>
|
||||
<th class='w-90px'><?php echo $lang->program->PGMName;?></th>
|
||||
<td class='required'><?php echo html::input("PGMName", isset($programName) ? $programName : '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr class='pgmParams'>
|
||||
<tr class='programParams'>
|
||||
<th><?php echo $lang->program->PRJName;?></th>
|
||||
<td class='required'><?php echo html::input("PRJName", isset($sprintName) ? $sprintName : '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr class='pgmParams'>
|
||||
<tr class='programParams'>
|
||||
<th><?php echo $lang->program->PRJCode;?></th>
|
||||
<td><?php echo html::input("code", '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr class='pgmParams'>
|
||||
<tr class='programParams'>
|
||||
<th><?php echo $lang->program->PRJPM;?></th>
|
||||
<td><?php echo html::select('PM', array('' => '') + $users, '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr class='pgmParams'>
|
||||
<tr class='programParams'>
|
||||
<th><?php echo $lang->program->dateRange;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
@@ -64,7 +64,7 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='pgmParams'>
|
||||
<tr class='programParams'>
|
||||
<th><?php echo $lang->project->acl;?></th>
|
||||
<td><?php echo nl2br(html::radio('acl', $lang->program->PGMPRJAclList, 'open', "onclick='setWhite(this.value);'", 'block'));?></td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user