* improve UI of tree/browse view.

This commit is contained in:
Catouse
2018-05-16 11:01:29 +08:00
parent af0750f920
commit 18223853aa
3 changed files with 13 additions and 8 deletions
+2
View File
@@ -12,3 +12,5 @@
.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;}
#modulesTree li {padding-left: 20px;}
+8 -5
View File
@@ -33,7 +33,7 @@
<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>
<ul id='modulesTree' data-name='tree-<?php echo $viewType;?>'></ul>
</div>
</div>
</div>
@@ -50,10 +50,10 @@
</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'>
<table class='table table-form table-auto'>
<tr>
<?php if($viewType != 'line'):?>
<td class="text-middle text-nowrap text-right with-padding">
<td class="text-middle text-right with-padding">
<?php
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)
@@ -143,10 +143,12 @@
$(function()
{
var data = $.parseJSON('<?php echo helper::jsonEncode4Parse($tree);?>');
var options = {
var options =
{
initialState: 'preserve',
data: data,
sortable: {
sortable:
{
lazy: true,
nested: true,
canMoveHere: function($ele, $target)
@@ -234,6 +236,7 @@ $(function()
var $tree = $('#modulesTree').tree(options);
var tree = $tree.data('zui.tree');
console.log('tree', tree, options);
if(<?php echo $currentModuleID ?>)
if(0)
{
+3 -3
View File
@@ -29,7 +29,7 @@
<div class='panel-title'><?php echo $title;?></div>
</div>
<div class='panel-body'>
<ul class='tree-lines' id='modulesTree' data-name='tree-task'></ul>
<ul id='modulesTree' data-name='tree-task'></ul>
</div>
</div>
</div>
@@ -40,9 +40,9 @@
<div class='panel-title'><?php echo $lang->tree->manageTaskChild;?></div>
</div>
<div class='panel-body'>
<table class='table table-form'>
<table class='table table-form table-auto'>
<tr>
<td class="text-middle text-nowrap text-right with-padding">
<td class="text-middle text-right with-padding">
<?php
echo html::a($this->createLink('tree', 'browsetask', "root={$root->id}&productID=$productID&viewType=task"), $root->name) . "<i class='icon icon-angle-right muted'></i>";
foreach($parentModules as $module)