* Fix code style.

This commit is contained in:
Yagami
2019-04-23 14:49:53 +08:00
parent 098b1e5868
commit 31f688c2c7
5 changed files with 23 additions and 23 deletions
+4 -10
View File
@@ -1500,8 +1500,8 @@ class bug extends control
}
/* Get related objects title or names. */
$relatedModules = array();
$productsType = $this->dao->select('id, type')->from(TABLE_PRODUCT)->where('id')->in($relatedProductIdList)->fetchPairs();
$relatedModules = $this->dao->select('id, name')->from(TABLE_MODULE)->where('deleted')->eq(0)->fetchPairs();
$relatedStories = $this->dao->select('id,title')->from(TABLE_STORY) ->where('id')->in($relatedStoryIdList)->fetchPairs();
$relatedTasks = $this->dao->select('id, name')->from(TABLE_TASK)->where('id')->in($relatedTaskIdList)->fetchPairs();
$relatedBugs = $this->dao->select('id, title')->from(TABLE_BUG)->where('id')->in($relatedBugIdList)->fetchPairs();
@@ -1509,6 +1509,7 @@ class bug extends control
$relatedBranch = array('0' => $this->lang->branch->all) + $this->dao->select('id, name')->from(TABLE_BRANCH)->where('id')->in($relatedBranchIdList)->fetchPairs();
$relatedBuilds = array('trunk' => $this->lang->trunk) + $this->dao->select('id, name')->from(TABLE_BUILD)->where('id')->in($relatedBuildIdList)->fetchPairs();
$relatedFiles = $this->dao->select('id, objectID, pathname, title')->from(TABLE_FILE)->where('objectType')->eq('bug')->andWhere('objectID')->in(@array_keys($bugs))->andWhere('extra')->ne('editor')->fetchGroup('objectID');
foreach($relatedProductIdList as $relatedProductId) $relatedModules += $this->loadModel('tree')->getOptionMenu($relatedProductId, 'bug');
foreach($bugs as $bug)
{
@@ -1614,16 +1615,9 @@ class bug extends control
$this->fetch('file', 'export2' . $this->post->fileType, $_POST);
}
$fileName = $this->lang->bug->common;
$fileName = $this->lang->bug->common;
$productName = $this->dao->findById($productID)->from(TABLE_PRODUCT)->fetch('name');
if(isset($this->lang->bug->featureBar['browse'][$browseType]))
{
$browseType = $this->lang->bug->featureBar['browse'][$browseType];
}
else
{
$browseType = isset($this->lang->bug->moreSelects[$browseType]) ? $this->lang->bug->moreSelects[$browseType] : null;
}
$browseType = isset($this->lang->bug->featureBar['browse'][$browseType]) ? $this->lang->bug->featureBar['browse'][$browseType] : zget($this->lang->bug->moreSelects, $browseType, '');
$this->view->fileName = $productName . $this->lang->dash . $browseType . $fileName;
$this->view->allExportFields = $this->config->bug->list->exportFields;
+7 -3
View File
@@ -88,10 +88,14 @@ if(empty($type)) $type = 'product';
?>
<?php if($customLibCount > 0):?>
<li <?php echo $activeClass;?>>
<?php echo html::a($subLibLink, "<i class='icon {$icon}'></i> " . $subLibName, '', "class='text-ellipsis' title='{$subLibName}'");?>
<?php echo html::a($subLibLink, "<i class='icon {$icon}'></i> " . $subLibName, '', "class='text-ellipsis' title='{$subLibName}'");?>
<?php endif;?>
<?php if(isset($allModules[$subLibID])):?> <?php if($customLibCount > 0):?> <ul> <?php endif;?> <?php foreach($allModules[$subLibID] as $module):?>
<?php if($module->parent != 0) continue;?>
<?php if(isset($allModules[$subLibID])):?>
<?php if($customLibCount > 0):?>
<ul>
<?php endif;?>
<?php foreach($allModules[$subLibID] as $module):?>
<?php if($module->parent != 0) continue;?>
<li <?php if($this->methodName == 'browse' && $browseType == 'bymodule' && $moduleID == $module->id) echo "class='active'";?>>
<?php echo html::a($this->createLink('doc', 'browse', "libID=$subLibID&browseType=byModule&param={$module->id}"), "<i class='icon icon-folder-outline'></i> " . $module->name, '', "class='text-ellipsis' title='{$module->name}'");?>
<?php $this->doc->printChildModule($module, $subLibID, $this->methodName, $browseType, $moduleID);?>
-2
View File
@@ -173,5 +173,3 @@ $lang->misc->feature->all['7.1.stable'][] = array('title'=>'提供rpm和deb包',
$lang->misc->feature->all['6.3.stable'][] = array('title'=>'增加数据表格功能', 'desc' => '<p>可配置数据表格中可显示的字段,按照配置字段显示想看的数据</p>');
$lang->misc->feature->all['6.3.stable'][] = array('title'=>'继续完善细节', 'desc' => '');
$lang->misc->error = '此功能正在努力开发中...';
+3 -2
View File
@@ -42,7 +42,7 @@ class taskModel extends model
->setDefault('openedDate', helper::now())
->stripTags($this->config->task->editor->create['id'], $this->config->allowedTags)
->join('mailto', ',')
->remove('after,files,labels,assignedTo,uid,storyEstimate,storyDesc,storyPri,team,teamEstimate,teamMember,multiple,teams,contactListMenu,selectTestStory,testStory,testPri,testEstStarted,testDeadline,testAssignedTo,testEstimate,feedback')
->remove('after,files,labels,assignedTo,uid,storyEstimate,storyDesc,storyPri,team,teamEstimate,teamMember,multiple,teams,contactListMenu,selectTestStory,testStory,testPri,testEstStarted,testDeadline,testAssignedTo,testEstimate')
->get();
if($task->type != 'test') $this->post->set('selectTestStory', 0);
@@ -1275,11 +1275,12 @@ class taskModel extends model
->setDefault('account', $this->app->user->account)
->setDefault('task', $taskID)
->setDefault('date', date(DT_DATE1))
->setIF($this->post->finishedDate, 'date', $this->post->finishedDate)
->setDefault('left', 0)
->remove('finishedDate,comment,assignedTo,files,labels,consumed')
->get();
$estimate->consumed = $consumed;
$estimate->date = $this->post->finishedDate;/*#task 7849*/
if($estimate->consumed) $this->addTaskEstimate($estimate);
if(!empty($oldTask->team))
+9 -6
View File
@@ -1,19 +1,22 @@
$(document).on('change', '.moduleChange',function(){
$(document).on('change', '.moduleChange', function()
{
var moduleID = $(this).val();
if(typeof(moduleID) == 'undefined') moduleID = 0;
var id = $(this).attr('id');
var id = $(this).attr('id');
var index = id.substring(6);
link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID='+ '' + '&onlyOption=true&status=noclosed');
$('#story' + index).load(link, function(){$(this).trigger("chosen:updated");});
})
$(document).on('change', '.storyChange',function(){
$(document).on('change', '.storyChange', function()
{
var storyID = $(this).val();
if(typeof(storyID) == 'undefined') storyID = 0;
link = createLink('testcase', 'ajaxGetStoryMoule', 'storyID=' + storyID);
var id = $(this).attr('id');
var link = createLink('testcase', 'ajaxGetStoryMoule', 'storyID=' + storyID);
var id = $(this).attr('id');
var index = id.substring(5);
$.get(link,function(json){
$.get(link, function(json)
{
var obj = JSON.parse(json);
$("#module" + index).val(obj.moduleID);
$('#module' + index).trigger("chosen:updated");