* Rewrite browse page of tree.

This commit is contained in:
daitingting
2018-04-20 14:44:23 +08:00
parent b7b73fea14
commit 1c3382ed13
6 changed files with 166 additions and 154 deletions
+6 -6
View File
@@ -72,7 +72,7 @@ class tree extends control
$this->view->currentProduct = $currentProduct;
$this->view->productModules = $this->tree->getOptionMenu($currentProduct, 'story');
$title = $product->name . $this->lang->colon . $this->lang->tree->manageProduct;
$title = $this->lang->tree->manageProduct;
$position[] = html::a($this->createLink('product', 'browse', "product=$rootID"), $product->name);
$position[] = $this->lang->tree->manageProduct;
}
@@ -84,7 +84,7 @@ class tree extends control
if($this->config->global->flow == 'onlyTest') $this->lang->set('menugroup.tree', 'bug');
if($this->config->global->flow != 'onlyTest') $this->lang->set('menugroup.tree', 'qa');
$title = $product->name . $this->lang->colon . $this->lang->tree->manageBug;
$title = $this->lang->tree->manageBug;
$position[] = html::a($this->createLink('bug', 'browse', "product=$rootID"), $product->name);
$position[] = $this->lang->tree->manageBug;
}
@@ -96,7 +96,7 @@ class tree extends control
if($this->config->global->flow == 'onlyTest') $this->lang->set('menugroup.tree', 'testcase');
if($this->config->global->flow != 'onlyTest') $this->lang->set('menugroup.tree', 'qa');
$title = $product->name . $this->lang->colon . $this->lang->tree->manageCase;
$title = $this->lang->tree->manageCase;
$position[] = html::a($this->createLink('testcase', 'browse', "product=$rootID"), $product->name);
$position[] = $this->lang->tree->manageCase;
}
@@ -107,7 +107,7 @@ class tree extends control
$this->lang->tree->menuOrder = $this->lang->testsuite->menuOrder;
$this->lang->set('menugroup.tree', 'qa');
$title = $lib->name . $this->lang->colon . $this->lang->tree->manageCaseLib;
$title = $this->lang->tree->manageCaseLib;
$position[] = html::a($this->createLink('testsuite', 'library', "libID=$rootID"), $lib->name);
$position[] = $this->lang->tree->manageCaseLib;
}
@@ -119,7 +119,7 @@ class tree extends control
$this->lang->tree->menuOrder = $this->lang->doc->menuOrder;
$this->lang->set('menugroup.tree', 'doc');
$title = $lib->name . $this->lang->colon . $this->lang->tree->manageCustomDoc;
$title = $this->lang->tree->manageCustomDoc;
$position[] = html::a($this->createLink('doc', 'browse', "libID=$rootID"), $lib->name);
$position[] = $this->lang->tree->manageCustomDoc;
}
@@ -138,7 +138,7 @@ class tree extends control
$this->view->currentProduct = $currentProduct;
$this->view->productModules = $this->tree->getOptionMenu($currentProduct, 'line');
$title = $this->lang->product->common . $this->lang->colon . $this->lang->tree->manageLine;
$title = $this->lang->tree->manageLine;
$position[] = $this->lang->tree->manageLine;
}
+13 -20
View File
@@ -1,21 +1,14 @@
.parentModule {width:10%; vertical-align:middle;}
.copy {display:block; margin-bottom:5px;}
.row-module {max-width: 500px; min-width: 400px;}
.row-module + .row-module {margin-top: 5px;}
.col-module {min-width: 200px;}
.col-module .form-control {border-radius: 2px 0 0 2px;}
.col-module select.form-control {border-radius: 0 2px 2px 0; border-left-width: 0;}
.col-module select.form-control:focus {margin-left: -1px; border-left-width: 1px;}
.col-shorts .form-control {border-radius: 0 2px 2px 0; border-left-width: 0;}
.col-shorts .form-control:focus {margin-left: -1px; border-left-width: 1px;}
.col-shorts {width: 110px;}
.col-actions {width: 80px; padding-left: 5px;}
.outer .row .col-md-8 .table-form {max-width: 600px}
#sonModule, #moduleBox > span > input, #moduleBox > table{max-width: 500px}
#sonModule .row-table .input-group input {border-right: none}
#moduleBox span > .form-control {margin-bottom: 5px;}
.w-260px {width: 260px!important}
table.copy td {padding: 0!important}
table.copy td .form-control {border-right: 0}
.tree-toggle {cursor: pointer;}
.tree-actions, .tree li.hover > .tree-actions {opacity: 1}
.tree-item-branch > .tree-actions [data-type='sort'] {display: none}
.tree-item-branch > .tree-actions [data-type='add'] > .icon-plus:before {content: '\e6c7'}
#childrenForm table .chosen-container .chosen-single {border-right-color: transparent}
#childrenForm table .chosen-container .chosen-single {border-right-color: transparent}
#childrenForm .col-table + .col-table .form-control {border-left: transparent;}
.col-module .chosen-container-single .chosen-single {border-radius: 2px 0 0 2px; border-right-width: 0; padding-right: 1px;}
.col-module .chosen-container-active .chosen-single {border-right-width: 1px; padding-right: 0;}
.col-shorts .chosen-container-single .chosen-single {border-radius: 0 2px 2px 0;}
+10 -8
View File
@@ -7,15 +7,17 @@ function syncModule(rootID, type)
$.getJSON(link, function(modules)
{
if(modules.length == 0) return false;
$('.helplink').addClass('hidden');
var $inputgroup = $('<div></div>').append($('.input-group .icon-remove:first').closest('.row-table').clone()).html();
var $inputgroup = $('<div></div>').append($('.col-actions .icon-trash:first').closest('.table-row').clone()).html();
$.each(modules, function(key, module)
{
$('.row-table').each(function()
$('#sonModule > .table-row').each(function()
{
moduleName = $(this).find('input[id^=modules]').val();
if(moduleName == module.name) modules[key] = null;
if(!moduleName) $(this).closest('.row-table').remove();
if(!moduleName) $(this).closest('#sonModule > .table-row').not('.copy').remove();
})
});
@@ -25,16 +27,16 @@ function syncModule(rootID, type)
{
/* Duplicate removal for mdoule name. */
var unique = true;
$('#sonModule > .row-table').each(function()
$('#sonModule > .table-row').not('.copy').each(function()
{
if($(this).find('.col-table:first').find(':input').val() == module.name) unique = false;
if($(this).find('.table-col:first').find(':input').val() == module.name) unique = false;
})
if(unique)
{
$('#sonModule').append($inputgroup);
$('#sonModule .row-table:last input[id^=modules]').val(module.name);
$('#sonModule .row-table:last input[id^=shorts]').val(module.short);
$('#sonModule .table-row:last input[id^=modules]').val(module.name);
$('#sonModule .table-row:last input[id^=shorts]').val(module.short);
}
}
})
@@ -63,7 +65,7 @@ function syncProductOrProject(obj, type)
function toggleCopy()
{
var $copy = $('table.copy');
var $copy = $('.table-row.copy');
if($copy.size() == 0) return false;
$copy.toggle();
}
+31 -18
View File
@@ -1,22 +1,8 @@
function addItem(obj)
{
var $inputgroup = $(obj).closest('.row-table');
$inputgroup.after($inputgroup.clone()).next('.row-table').find('input').val('');
}
function insertItem(obj)
{
var $inputgroup = $(obj).closest('.row-table');
var insertHtml = $('#insertItemBox').children('.row-table').clone();
$inputgroup.after(insertHtml).next('.row-table').find('input').val('');
updateItemOrder();
}
function updateItemOrder()
{
var order = 10;
$('#sonModule').children('.row-table').each(function(){
$('#sonModule').children('.row-table').each(function()
{
if($(this).find("input[name*='order']").length > 0)
{
console.log(order);
@@ -28,8 +14,35 @@ function updateItemOrder()
$('#maxOrder').val(order - 10);
}
function addItem(obj)
{
var $inputRow = $(obj).closest('.row-module');
var $newRow = $('#insertItemBox').children('.row-module').clone().insertAfter($inputRow).addClass('highlight');
$newRow.find('input').val('');
setTimeout(function()
{
$newRow.removeClass('highlight');
}, 1600);
updateItemOrder();
}
function insertItem(obj)
{
var $inputgroup = $(obj).closest('.row-table');
var insertHtml = $('#insertItemBox').children('.row-table').clone();
$inputgroup.after(insertHtml).next('.row-table').find('input').val('');
updateItemOrder();
}
function deleteItem(obj)
{
if($(obj).closest('.row-table').siblings('.row-table.addedItem').find('i.icon-remove').size() <= 0) return;
$(obj).closest('.row-table').remove();
var $inputRow = $(obj).closest('.row-module');
if ($inputRow.siblings('.row-module.row-module-new').find('.btn-delete').length > 0)
{
$inputRow.addClass('highlight').fadeOut(500, function()
{
$inputRow.remove();
});
}
}
+1 -1
View File
@@ -32,7 +32,7 @@ $lang->tree->manageBugChild = '维护Bug子模块';
$lang->tree->manageCaseChild = '维护用例子模块';
$lang->tree->manageCaselibChild = '维护测试库子模块';
$lang->tree->manageTaskChild = "维护{$lang->projectCommon}子模块";
$lang->tree->syncFromProduct = '复制';
$lang->tree->syncFromProduct = '复制模块';
$lang->tree->dragAndSort = "拖放排序";
$lang->tree->sort = "排序";
$lang->tree->addChild = "增加子模块";
+105 -101
View File
@@ -14,125 +14,131 @@
<?php js::set('viewType', $viewType);?>
<?php $hasBranch = (strpos('story|bug|case', $viewType) !== false and (!empty($root->type) && $root->type != 'normal')) ? true : false;?>
<?php $name = $viewType == 'line' ? $lang->tree->line : ($viewType == 'doc' ? $lang->tree->cate : $lang->tree->name);?>
<div id='featurebar'>
<div class='heading'><?php echo $viewType == 'line' ? $lang->tree->manageLine : $lang->tree->common;?></div>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php $backLink = $this->session->{$viewType . 'List'} ? $this->session->{$viewType . 'List'} : 'javascript:history.go(-1)';?>
<a href="<?php echo $backLink;?>" class="btn btn-link">
<i class="icon icon-back icon-sm"></i> <?php echo $lang->goback;?>
</a>
<div class="divider"></div>
<div class="page-title">
<span class="text"><?php echo ($viewType == 'line' ? $lang->tree->manageLine : $lang->tree->common) . ':' . $root->name;?></span>
</div>
</div>
</div>
<div class='row'>
<div class='col-sm-4'>
<div class='panel'>
<div class='panel-heading'><i class='icon-cog'></i> <strong><?php echo $title;?></strong></div>
<div class='panel-body'>
<div class='container'>
<ul class='tree-lines' id='modulesTree' data-name='tree-<?php echo $viewType?>'></ul>
</div>
<div id="mainContent" class="main-row">
<div class="side-col col-4">
<div class="panel">
<div class="panel-heading">
<div class="panel-title"><?php echo $title;?></div>
</div>
<div class="panel-body">
<ul class='tree-lines' id='modulesTree' data-name='tree-<?php echo $viewType;?>'></ul>
</div>
</div>
</div>
<div class='col-sm-8'>
<form id='childrenForm' class='form-condensed' method='post' target='hiddenwin' action='<?php echo $this->createLink('tree', 'manageChild', "root=$rootID&viewType=$viewType");?>'>
<div class='panel'>
<div class='panel-heading'>
<i class='icon-sitemap'></i>
<div class="main-col col-8">
<div class="panel">
<div class="panel-heading">
<div class="panel-title">
<?php $manageChild = 'manage' . ucfirst($viewType) . 'Child';?>
<?php echo strpos($viewType, 'doc') !== false ? $lang->doc->manageType : $lang->tree->$manageChild;?>
<?php if($viewType == 'story' and $allProduct):?>
<div class='panel-actions pull-right'><?php echo html::a('javascript:toggleCopy()', $lang->tree->syncFromProduct, '', "class='btn btn-sm'")?></div>
<?php endif;?>
</div>
<div class='panel-body'>
<?php if($viewType == 'story' and $allProduct):?>
<div class="panel-actions btn-toolbar"><?php echo html::a('javascript:toggleCopy()', $lang->tree->syncFromProduct, '', "class='btn btn-sm'")?></div>
<?php endif;?>
</div>
<div class="panel-body">
<form id='childrenForm' method='post' target='hiddenwin' action='<?php echo $this->createLink('tree', 'manageChild', "root=$rootID&viewType=$viewType");?>'>
<table class='table table-form'>
<tr>
<?php if($viewType != 'line'):?>
<td class='parentModule'>
<nobr>
<td class="text-middle text-nowrap text-right with-padding">
<?php
echo html::a($this->createLink('tree', 'browse', "root=$rootID&viewType=$viewType"), empty($root->name) ? '' : $root->name);
echo $lang->arrow;
echo html::a($this->createLink('tree', 'browse', "root=$rootID&viewType=$viewType"), empty($root->name) ? '' : $root->name) . "<i class='icon icon-angle-right muted'></i>";
foreach($parentModules as $module)
{
echo html::a($this->createLink('tree', 'browse', "root=$rootID&viewType=$viewType&moduleID=$module->id"), $module->name);
echo $lang->arrow;
echo html::a($this->createLink('tree', 'browse', "root=$rootID&viewType=$viewType&moduleID=$module->id"), $module->name) . " <i class='icon icon-angle-right muted'></i>";
}
?>
</nobr>
</td>
<?php endif;?>
<td id='moduleBox'>
<?php
if($viewType == 'story' and $allProduct)
{
echo "<table class='copy w-p100'><tr>";
echo "<td class='w-260px'>" . html::select('allProduct', $allProduct, '', "class='form-control chosen' onchange=\"syncProductOrProject(this,'product')\"") . '</td>';
echo "<td class='w-200px'>" . html::select('productModule', $productModules, '', "class='form-control chosen'") . '</td>';
echo "<td class=''>" . html::commonButton($lang->tree->syncFromProduct, "id='copyModule' onclick='syncModule($currentProduct, \"story\")'") . '</td>';
echo '</tr></table>';
}
$maxOrder = 0;
echo '<div id="sonModule">';
foreach($sons as $sonModule)
{
if($sonModule->order > $maxOrder) $maxOrder = $sonModule->order;
$disabled = $sonModule->type == $viewType ? '' : 'disabled';
echo "<div class='row-table' style='margin-bottom:5px'>";
echo "<div class='col-table'>" . html::input("modules[id$sonModule->id]", $sonModule->name, 'class="form-control" autocomplete="off"' . $disabled) . '</div>';
if($hasBranch) echo "<div class='col-table'>" . html::select("branch[id$sonModule->id]", $branches, $sonModule->branch, 'class="form-control" disabled') . '</div>';
echo "<div class='col-table' style='width:120px'><div class='input-group'>" . html::input("shorts[id$sonModule->id]", $sonModule->short, "class='form-control' placeholder='{$lang->tree->short}' $disabled autocomplete='off'") . html::hidden("order[id$sonModule->id]", $sonModule->order);
echo "<span class='input-group-btn' style='border-left:1px solid'><a href='javascript:;' onclick='insertItem(this)' class='btn btn-block'><i class='icon icon-plus'></i></a></span>";
echo '</div></div>';
echo '</div>';
}
for($i = 0; $i < TREE::NEW_CHILD_COUNT ; $i ++)
{
echo "<div class='row-table addedItem' style='margin-bottom:5px'>";
echo "<div class='col-table'>" . html::input("modules[]", '', "class='form-control' placeholder='{$name}' autocomplete='off'") . '</div>';
if($hasBranch) echo '<div class="col-table">' . html::select("branch[]", $branches, $branch, 'class="form-control"') . '</div>';
echo "<div class='col-table' style='width:120px'><div class='input-group'>" . html::input("shorts[]", '', "class='form-control' placeholder='{$lang->tree->short}' autocomplete='off'");
echo "<span class='input-group-btn'><a href='javascript:;' onclick='addItem(this)' class='btn btn-block'><i class='icon icon-plus'></i></a></span>";
echo "<span class='input-group-btn'><a href='javascript:;' onclick='deleteItem(this)' class='btn btn-block'><i class='icon icon-remove'></i></a></span>";
echo '</div></div>';
echo '</div>';
}
<td>
<div id='sonModule'>
<?php if($viewType == 'story' and $allProduct):?>
<div class='table-row row-module copy'>
<div class='table-col col-module'><?php echo html::select('allProduct', $allProduct, '', "class='form-control chosen' onchange=\"syncProductOrProject(this,'product')\"");?></div>
<div class='table-col col-shorts'><?php echo html::select('productModule', $productModules, '', "class='form-control chosen'");?></div>
<div class='table-col col-actions'>
<?php echo html::commonButton('', "id='copyModule' onclick='syncModule($currentProduct, \"story\")'", 'btn btn-link btn-icon', 'icon icon-copy');?>
</div>
</div>
<?php endif;?>
echo "<div id='insertItemBox' class='hidden'>";
echo "<div class='row-table' style='margin-bottom:5px'>";
echo "<div class='col-table'>" . html::input("modules[]", '', "class='form-control' placeholder='{$name}' autocomplete='off'") . '</div>';
if($hasBranch) echo '<div class="col-table">' . html::select("branch[]", $branches, $branch, 'class="form-control" disabled') . '</div>';
echo "<div class='col-table' style='width:120px'><div class='input-group'>" . html::input("shorts[]", '', "class='form-control' placeholder='{$lang->tree->short}' autocomplete='off'") . html::hidden("order[]");
echo "<span class='input-group-btn' style='border-left:1px solid'><a href='javascript:;' onclick='deleteItem(this)' class='btn btn-block'><i class='icon icon-remove'></i></a></span>";
echo '</div></div>';
echo '</div></div>';
<?php $maxOrder = 0;?>
<?php foreach($sons as $sonModule):?>
<?php if($sonModule->order > $maxOrder) $maxOrder = $sonModule->order;?>
<?php $disabled = $sonModule->type == $viewType ? '' : 'disabled';?>
<div class="table-row row-module">
<div class="table-col col-module"><?php echo html::input("modules[id$sonModule->id]", $sonModule->name, 'class="form-control" autocomplete="off"' . $disabled);?></div>
<?php if($hasBranch):?>
<div class="table-col col-module"><?php echo html::select("branch[id$sonModule->id]", $branches, $sonModule->branch, 'class="form-control" disabled');?></div>
<?php endif;?>
<div class="table-col col-shorts"><?php echo html::input("shorts[id$sonModule->id]", $sonModule->short, "class='form-control' placeholder='{$lang->tree->short}' $disabled autocomplete='off'") . html::hidden("order[id$sonModule->id]", $sonModule->order);?></div>
<div class="table-col col-actions">
<button type="button" class="btn btn-link btn-icon btn-add" onclick="addItem(this)"><i class="icon icon-plus"></i></button>
</div>
</div>
<?php endforeach;?>
<?php for($i = 0; $i < TREE::NEW_CHILD_COUNT ; $i ++):?>
<div class="table-row row-module row-module-new">
<div class="table-col col-module"><?php echo html::input("modules[]", '', "class='form-control' placeholder='{$name}' autocomplete='off'");?></div>
<?php if($hasBranch):?>
<div class="table-col col-module"><?php echo html::select("branch[]", $branches, $branch, 'class="form-control"');?></div>
<?php endif;?>
<div class="table-col col-shorts"><?php echo html::input("shorts[]", '', "class='form-control' placeholder='{$lang->tree->short}' autocomplete='off'");?></div>
<div class="table-col col-actions">
<button type="button" class="btn btn-link btn-icon btn-add" onclick="addItem(this)"><i class="icon icon-plus"></i></button>
<button type="button" class="btn btn-link btn-icon btn-delete" onclick="deleteItem(this)"><i class="icon icon-trash"></i></button>
</div>
</div>
<?php endfor;?>
</div>
echo '</div>';
?>
<div id="insertItemBox" class="template">
<div class="table-row row-module row-module-new">
<div class="table-col col-module"><?php echo html::input("modules[]", '', "class='form-control' placeholder='{$name}' autocomplete='off'");?></div>
<?php if($hasBranch):?>
<div class="table-col col-module"><?php echo html::select("branch[]", $branches, $branch, 'class="form-control"');?></div>
<?php endif;?>
<div class="table-col col-shorts"><?php echo html::input("shorts[]", '', "class='form-control' placeholder='{$lang->tree->short}' autocomplete='off'");?></div>
<div class="table-col col-actions">
<button type="button" class="btn btn-link btn-icon btn-add" onclick="addItem(this)"><i class="icon icon-plus"></i></button>
<button type="button" class="btn btn-link btn-icon btn-delete" onclick="deleteItem(this)"><i class="icon icon-trash"></i></button>
</div>
</div>
</div>
</td>
</tr>
<tr>
<?php if($viewType != 'line'):?>
<td></td>
<?php endif;?>
<td colspan='2'>
<?php
echo html::submitButton();
echo $this->session->{$viewType . 'List'} ? html::linkButton($this->lang->goback, $this->session->{$viewType .'List'}) : html::backButton();
echo html::hidden('parentModuleID', $currentModuleID);
echo html::hidden('maxOrder', $maxOrder);
?>
<input type='hidden' value='<?php echo $currentModuleID;?>' name='parentModuleID' />
<td colspan="2">
<?php echo html::submitButton('', '', 'btn btn-primary btn-wide');?>
<?php echo $this->session->{$viewType . 'List'} ? html::linkButton($this->lang->goback, $this->session->{$viewType .'List'}, 'btn btn-wide btn-gray') : html::backButton('', '', 'btn btn-wide btn-gray');?>
<?php echo html::hidden('parentModuleID', $currentModuleID);?>
<?php echo html::hidden('maxOrder', $maxOrder);?>
</td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
</form>
</div>
</div>
</div>
<?php if($viewType !== 'story'): ?>
<style>
<?php if($viewType != 'bug') echo ".tree-item-story > .tree-actions > .tree-action[data-type='edit'],";?>
.tree-item-story > .tree-actions > .tree-action[data-type='sort'],
.tree-item-story > .tree-actions > .tree-action[data-type='delete'] {display: none!important}
</style>
<?php endif;?>
<script>
$(function()
{
@@ -156,32 +162,33 @@ $(function()
if(item.type === 'case') $toggle.append('&nbsp; <span class="text-muted">[C]</span>');
$li.append($toggle);
if(item.nodeType || item.type) $li.addClass('tree-item-' + (item.nodeType || item.type));
$li.toggleClass('active', <?php echo $currentModuleID ?> === item.id);
return true;
},
actions:
actions:
{
sort:
{
title: '<?php echo $lang->tree->dragAndSort ?>',
template: '<a class="sort-handler"><?php echo $lang->tree->sort ?></a>'
title: '<?php echo $lang->tree->dragAndSort ?>',
template: '<a class="sort-handler"><?php echo $lang->tree->sort ?></a>'
},
edit:
{
linkTemplate: '<?php echo helper::createLink('tree', 'edit', "moduleID={0}&type=$viewType"); ?>',
title: '<?php echo $lang->tree->edit ?>',
template: '<a href="javascript:;"><?php echo $lang->edit?></a>'
template: '<a><?php echo $lang->edit?></a>'
},
"delete":
{
linkTemplate: '<?php echo helper::createLink('tree', 'delete', "rootID=$rootID&moduleID={0}"); ?>',
title: '<?php echo $lang->tree->delete ?>',
template: '<a href="javascript:;"><?php echo $lang->delete?></a>'
template: '<a><?php echo $lang->delete?></a>'
},
subModules:
{
linkTemplate: '<?php echo helper::createLink('tree', 'browse', "rootID=$rootID&viewType=$viewType&moduleID={0}&branch={1}"); ?>',
title: '<?php echo $viewType == 'line' ? '': $lang->tree->child ?>',
template: '<a href="javascript:;"><?php echo $viewType == 'line' ? '': (strpos($viewType, 'doc') !== false ? $lang->doc->childType : $lang->tree->child)?></a>'
template: '<a><?php echo $viewType == 'line' ? '': (strpos($viewType, 'doc') !== false ? $lang->doc->childType : $lang->tree->child)?></a>',
}
},
action: function(event)
@@ -189,12 +196,11 @@ $(function()
var action = event.action, $target = $(event.target), item = event.item;
if(action.type === 'edit')
{
$target.modalTrigger(
{
new $.zui.ModalTrigger({
type: 'ajax',
url: action.linkTemplate.format(item.id),
keyboard: true
}).trigger('click');
}).show();
}
else if(action.type === 'delete')
{
@@ -228,8 +234,8 @@ $(function()
var $tree = $('#modulesTree').tree(options);
var tree = $tree.data('zui.tree');
if(!tree.store.time) tree.expand($tree.find('li:not(.tree-action-item)').first());
if(<?php echo $currentModuleID ?>)
if(0)
{
var $currentLi = $tree.find('.module-name[data-id=' + <?php echo $currentModuleID ?> + ']').closest('li');
if($currentLi.length) tree.show($currentLi);
@@ -242,10 +248,8 @@ $(function()
e.stopPropagation();
});
$tree.find('[data-toggle="tooltip"]').tooltip();
$('#modulemenu > .nav > li > a[href*=tree][href*=browse]').not('[href*=<?php echo $viewType;?>]').parent().removeClass('active');
if(viewType == 'line') $('#modulemenu > .nav > li > a[href*=product][href*=all]').parent('li[data-id=all]').addClass('active');
if(window.config.viewType == 'line') $('#modulemenu > .nav > li > a[href*=product][href*=all]').parent('li[data-id=all]').addClass('active');
});
</script>
<?php