* Fix code style.

This commit is contained in:
xiawenlong
2021-11-17 15:40:11 +08:00
parent 8c1f8ea70c
commit ccfb8c4831
2 changed files with 11 additions and 4 deletions

View File

@@ -303,11 +303,17 @@ class gitlabModel extends model
$refList = array();
$branches = $this->apiGetBranches($gitlabID, $projectID);
if(is_array($branches)) foreach($branches as $branch) $refList[$branch->name] = "Branch::" . $branch->name;
if(is_array($branches))
{
foreach($branches as $branch) $refList[$branch->name] = "Branch::" . $branch->name;
}
$tags = $this->apiGetTags($gitlabID, $projectID);
if(is_array($tags)) foreach($tags as $tag) $refList[$tag->name] = "Tag::" . $tag->name;
if(is_array($tags))
{
foreach($tags as $tag) $refList[$tag->name] = "Tag::" . $tag->name;
}
return $refList;
}

View File

@@ -2,7 +2,6 @@ $(document).ready(function()
{
$(document).on('change', '#repo', function()
{
var _this = this;
var repoID = $(this).val();
if(repoID <= 0) return;
@@ -80,7 +79,8 @@ $(document).ready(function()
{
html = '';
length = $('#svnDirBox .input-group [name^=svnDir]').length;
length += 1;
length++;
if(tags.length != 0)
{
html = "<select id='svnDir" + length + "' name='svnDir[]' class='form-control'>";
@@ -94,6 +94,7 @@ $(document).ready(function()
}
html += '</select>';
}
$('#svnDirBox .loading').remove();
$('#svnDirBox .input-group').append(html);
$('#svnDirBox #svnDir' + length).chosen();