* Fix bug #14966.
This commit is contained in:
@@ -48,11 +48,22 @@ $(function()
|
||||
{
|
||||
if(systemMode == 'new')
|
||||
{
|
||||
var maxWidth = $('.chosen-container .chosen-drop.chosen-auto-max-width.in').width() - 70;
|
||||
$('#teams_chosen ul li').each(function(index)
|
||||
{
|
||||
if(index == 0)
|
||||
{
|
||||
var maxWidth = $('.chosen-container .chosen-drop.chosen-auto-max-width.in').width() - 70;
|
||||
|
||||
$('#teams_chosen ul .label').remove();
|
||||
$('#teams_chosen ul li:first').after(' <label class="label">' + projectCommon + '</label>');
|
||||
$('#teams_chosen ul > li:first').attr('style', 'display: inline-block; vertical-align: middle; max-width: ' + maxWidth + 'px');
|
||||
$('#teams_chosen ul .label').remove();
|
||||
$(this).after(' <label class="label">' + projectCommon + '</label>');
|
||||
$(this).attr('style', 'display: inline-block; vertical-align: middle; max-width: ' + maxWidth + 'px');
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).html($(this).html().replace(' ', ''));
|
||||
$(this).prepend(' ');
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -2478,22 +2478,13 @@ class executionModel extends model
|
||||
{
|
||||
if(empty($projectID) and $this->config->systemMode == 'new') return array();
|
||||
|
||||
$objects = $this->dao->select('id,name,type')->from(TABLE_PROJECT)
|
||||
$teamPairs = $this->dao->select('id,name')->from(TABLE_PROJECT)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('(project')->eq($projectID)
|
||||
->orWhere('id')->eq($projectID)
|
||||
->markRight(1)
|
||||
->orderBy('project_asc')
|
||||
->fetchAll('id');
|
||||
|
||||
if(empty($objects)) return array();
|
||||
|
||||
$teamPairs = array();
|
||||
foreach($objects as $id => $object)
|
||||
{
|
||||
$prefix = ($object->type != 'project' and $this->config->systemMode == 'new') ? ' ' : '';
|
||||
$teamPairs[$id] = $prefix . $object->name;
|
||||
}
|
||||
->fetchPairs();
|
||||
|
||||
return $teamPairs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user