* ajusted style of tree.
This commit is contained in:
@@ -30,12 +30,11 @@ class docModel extends model
|
||||
$selectHtml .= "<div class='dropdown'>" . html::a('javascript:;', $libs[$libID] . " <span class='caret'></span>", '', "data-toggle='dropdown'") . "<ul class='dropdown-menu'>";
|
||||
foreach ($libs as $key => $value)
|
||||
{
|
||||
$selectHtml .= "<li>" . html::a('javascript:;', $value) . '</li>';
|
||||
$class = $libID == $key ? 'active' : '';
|
||||
$selectHtml .= "<li class='$class'>" . html::a("javascript:switchDocLib(\"$key\", \"$currentModule\", \"$currentMethod\", \"$extra\");", $value) . '</li>';
|
||||
}
|
||||
$selectHtml .= '</ul></div>';
|
||||
|
||||
|
||||
html::select('libID', $libs, $libID, "onchange=\"switchDocLib(this.value, '$currentModule', '$currentMethod', '$extra');\" class='form-control input-sm'");
|
||||
common::setMenuVars($this->lang->doc->menu, 'list', $selectHtml);
|
||||
foreach($this->lang->doc->menu as $key => $menu)
|
||||
{
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#extendTree li {list-style-type:none;}
|
||||
#extendTree .active {color:blue; font-weight:bold}
|
||||
.expandable > ul {display: none!important}
|
||||
.collapsable > ul {display: block!important}
|
||||
|
||||
@@ -197,7 +197,7 @@ class editorModel extends model
|
||||
public function printTree($files, $isRoot = true)
|
||||
{
|
||||
if(empty($files) or !is_array($files)) return false;
|
||||
$tree = $isRoot ? "<ul id='extendTree'>\n" : "<ul>\n";
|
||||
$tree = $isRoot ? "<ul id='extendTree' class='tree treeview'>\n" : "<ul>\n";
|
||||
if($isRoot)
|
||||
{
|
||||
$module = basename(dirname(key($files)));
|
||||
|
||||
@@ -18,10 +18,25 @@
|
||||
<?php echo $tree?>
|
||||
</div>
|
||||
</div>
|
||||
<script type='text/javascript'>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$("#extendTree").treeview();
|
||||
$('.hitarea').click(function()
|
||||
{
|
||||
var $this = $(this);
|
||||
var parent = $this.parent();
|
||||
if(parent.hasClass('expandable'))
|
||||
{
|
||||
parent.removeClass('expandable').addClass('collapsable');
|
||||
$this.removeClass('expandable-hitarea').addClass('collapsable-hitarea');
|
||||
}
|
||||
else
|
||||
{
|
||||
parent.addClass('expandable').removeClass('collapsable');
|
||||
$this.addClass('expandable-hitarea').removeClass('collapsable-hitarea');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' scrolling='no' class='hidden'></iframe>
|
||||
|
||||
@@ -41,3 +41,9 @@ function syncProductOrProject(obj, type)
|
||||
$('#copyModule').attr('onclick', null);
|
||||
$('#copyModule').bind('click', function(){syncModule(obj.value, viewType)});
|
||||
}
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#submenucreate").modalTrigger({type: 'iframe', width: 500});
|
||||
$("#submenuedit").modalTrigger({type: 'iframe', width: 500});
|
||||
});
|
||||
|
||||
@@ -585,7 +585,7 @@ class treeModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
if(common::hasPriv('tree', 'edit')) $linkHtml .= ' ' . html::a(helper::createLink('tree', 'edit', "module={$module->id}&type=$type"), $this->lang->tree->edit, '', 'class="iframe"');
|
||||
if(common::hasPriv('tree', 'edit')) $linkHtml .= ' ' . html::a(helper::createLink('tree', 'edit', "module={$module->id}&type=$type"), $this->lang->tree->edit, '', 'class="iframe" data-width="400"');
|
||||
if(common::hasPriv('tree', 'browse') and strpos('productdoc,projectdoc', $module->type) === false and $module->type != 'webapp') $linkHtml .= ' ' . html::a(helper::createLink('tree', 'browse', "root={$module->root}&type=$type&module={$module->id}"), $this->lang->tree->child);
|
||||
if(common::hasPriv('tree', 'delete')) $linkHtml .= ' ' . html::a(helper::createLink('tree', 'delete', "root={$module->root}&module={$module->id}"), $this->lang->delete, 'hiddenwin');
|
||||
if(common::hasPriv('tree', 'updateorder')) $linkHtml .= ' ' . html::input("orders[$module->id]", $module->order, 'class="text-center w-30px form-control inline input-sm"');
|
||||
|
||||
Reference in New Issue
Block a user