This commit is contained in:
tianshujie
2021-09-13 09:52:24 +08:00
parent 62bcf528b2
commit 8219bc43d3
2 changed files with 17 additions and 15 deletions
+13 -2
View File
@@ -47,12 +47,23 @@ $(function()
$('#teams_chosen').click(function()
{
if(systemMode == 'new')
{
$('#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');
$(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('&nbsp;&nbsp;&nbsp;', ''));
$(this).prepend('&nbsp;&nbsp;&nbsp;');
}
})
}
})
+2 -11
View File
@@ -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') ? '&nbsp;&nbsp;&nbsp;' : '';
$teamPairs[$id] = $prefix . $object->name;
}
->fetchPairs();
return $teamPairs;
}