* Don't display parent when edit a product line.

* Don't display child page when browse a product line.
This commit is contained in:
liugang
2017-11-02 17:27:05 +08:00
parent e37e9235ef
commit 1485cad751
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ $(function()
},
itemCreator: function($li, item)
{
var link = item.id !== undefined ? ('<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}'.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>');
+2
View File
@@ -30,10 +30,12 @@ $jsRoot = $webRoot . "js/";
</tr>
<?php endif;?>
<?php $hidden = ($type != 'story' and $module->type == 'story');?>
<?php if($module->type != 'line'):?>
<tr <?php if($hidden) echo "style='display:none'";?>>
<th class='w-80px'><?php echo $lang->tree->parent;?></th>
<td><?php echo html::select('parent', $optionMenu, $module->parent, "class='form-control chosen'");?></td>
</tr>
<?php endif;?>
<tr <?php if($hidden) echo "style='display:none'";?>>
<th class='w-80px'><?php echo $lang->tree->name;?></th>
<td><?php echo html::input('name', $module->name, "class='form-control' autocomplete='off'");?></td>