* Fix bug.

This commit is contained in:
leiyong
2021-02-01 14:34:06 +08:00
parent 98b22fb7f2
commit 73e95c0459
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -231,6 +231,7 @@ class tree extends control
$this->view->currentModuleID = $currentModuleID;
$this->view->parentModules = $parentModules;
$this->view->branch = $branch;
$this->view->from = $from;
$this->view->tree = $this->tree->getProductStructure($rootID, $viewType);
$this->view->canBeChanged = isset($canBeChanged) ? $canBeChanged : true;
$this->display();
+3 -3
View File
@@ -93,10 +93,10 @@ li.tree-item-story > .tree-actions .tree-action[data-type=delete]{display:none;}
<?php if($viewType != 'line' && $viewType != 'trainskill' && $viewType != 'trainpost'):?>
<td class="text-middle text-right with-padding">
<?php
echo "<span>" . html::a($this->createLink('tree', 'browse', "root=$rootID&viewType=$viewType"), empty($root->name) ? '' : $root->name) . "<i class='icon icon-angle-right muted'></i></span>";
echo "<span>" . html::a($this->createLink('tree', 'browse', "root=$rootID&viewType=$viewType&currentModuleID=0&branch=0&from=$from"), empty($root->name) ? '' : $root->name) . "<i class='icon icon-angle-right muted'></i></span>";
foreach($parentModules as $module)
{
echo "<span>" . html::a($this->createLink('tree', 'browse', "root=$rootID&viewType=$viewType&moduleID=$module->id"), $module->name) . " <i class='icon icon-angle-right muted'></i></span>";
echo "<span>" . html::a($this->createLink('tree', 'browse', "root=$rootID&viewType=$viewType&currentModuleID=$module->id&branch=0&from=$from"), $module->name) . " <i class='icon icon-angle-right muted'></i></span>";
}
?>
</td>
@@ -194,7 +194,7 @@ $(function()
},
itemCreator: function($li, item)
{
var link = (item.id !== undefined && item.type != 'line') ? ('<a href="' + createLink('tree', 'browse', 'rootID=<?php echo $rootID ?>&viewType=<?php echo $viewType ?>&moduleID={0}&branch={1}'.format(item.id, item.branch)) + '">' + item.name + '</a>') : ('<span class="tree-toggle">' + item.name + '</span>');
var link = (item.id !== undefined && item.type != 'line') ? ('<a href="' + createLink('tree', 'browse', 'rootID=<?php echo $rootID ?>&viewType=<?php echo $viewType ?>&moduleID={0}&branch={1}&from=<?php echo $from;?>'.format(item.id, item.branch)) + '">' + item.name + '</a>') : ('<span class="tree-toggle">' + item.name + '</span>');
var $toggle = $('<span class="module-name" data-id="' + item.id + '">' + link + '</span>');
if(item.type === 'bug') $toggle.append('&nbsp; <span class="text-muted">[B]</span>');
if(item.type === 'case') $toggle.append('&nbsp; <span class="text-muted">[C]</span>');