<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title><!--{$UUDEV_PAGE_TITLE}--></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="css/admin.css" rel="stylesheet" type="text/css"/>
<link href="css/simpletree.css" rel="stylesheet" type="text/css"/>
<script src="js/jquery/jquery.min.js" charset="utf-8"></script>
<script src="js/jquery/jquery.contextmenu.js" charset="utf-8"></script>
<script src="js/layout.left.js" charset="utf-8">
</script>
<script type="text/javascript" src="js/jquery/jquery.simple.tree.js"></script>
<script type="text/javascript">

var simpleTreeCollection;
$(document).ready(function(){
	simpleTreeCollection = $('.simpleTree').simpleTree({
		autoclose: true,
		drag:false,
		afterClick:function(node){
			//alert("text-"+$('span:first',node).text());
			var url = $('a:first',node).attr("href");
			if(url != ""){
				window.parent.frames['cpanelLayout'].location.href=url;
			}
		},
		afterDblClick:function(node){
			//alert("text-"+$('span:first',node).text());
		},
		afterMove:function(destination, source, pos){
			//alert("destination-"+destination.attr('id')+" source-"+source.attr('id')+" pos-"+pos);
		},
		afterAjax:function()
		{
			bind();
			resizew();
			//alert('Loaded');
		},
		afterToggle:function(){
			resizew();
		},
		animate:true
		//,docToFolderConvert:true
	});
	
	//parent.$("div#leftBox").unblock();
	
});

function root(dom)
{
	/*
	parent.$("div#cpanelBox").block({
		message:"<img src='images/loading.gif'/>加载中...",
		css: { 
            border: 'none', 
            padding: '15px',
			width:'50%' ,
            backgroundColor: 'none', 
            '-webkit-border-radius': '10px', 
            '-moz-border-radius': '10px', 
            color: '#fff' 
        }
	}); */
	window.parent.frames['cpanelLayout'].location.href = './index.php?r=layout.cpanel&channel_id=1';
}
</script>
</head>

<body onLoad="resizew();">
<div class="UBBbuju_title">
	网站目录
</div>
<ul class="simpleTree">
	<li class="root" id='1'>
		<div>
			<a class="menuItem active" onClick="root(this);" value="1"  style="color:#333333; border:none; background:none; text-decoration:none; cursor:pointer; margin-left:-16px; padding-left:20px;background:url(images/icon22.gif) -2px -1079px no-repeat;">首页</a>
		<div>
		<!--{if !empty($channel)}-->	
		<ul>
			<!--{foreach from=$channel item=channel}-->
				<li id='<!--{$channel.id}-->'><span><a class="menuItem" module="<!--{$channel.channel_module_id}-->" value="<!--{$channel.id}-->" href="./index.php?r=layout.cpanel&channel_id=<!--{$channel.id}-->" style="color:#333333; text-decoration:none;"><!--{$channel.channel_text}-->[ID:<!--{$channel.id}-->]</a></span>
					<!--{if $channel.children==1}-->
						<ul class="ajax">
							<li id='list-<!--{$channel.id}-->'>{url:./index.php?r=layout.getTree&parent_id=<!--{$channel.id}-->}</li>
						</ul>
					<!--{/if}-->
				</li>
			<!--{/foreach}-->
		</ul>
		<!--{/if}-->
	</li>
</ul>

<div class="contextMenu" style="display:none;" id="myMenu" value="">
            <ul>
            	<li style=" width:90px;padding:3px"  id="myMenu_add">添加内容</li>
                <li style=" width:90px;padding:3px"  id="myMenu_clear">清空内容</li>
                <li style=" width:90px;padding:3px"  id="myMenu_delete">删除频道</li>
				<li style=" width:90px;padding:3px"  id="myMenu_copy">复制链接</li>
            </ul>
</div>
<script>
			$(document).ready(function(){
				resizew();
			});
			
function resizew()
{
	var bodyHeght;
	if(document.all){
		//ie
		bodyHeght = document.body.scrollHeight;//ie
	}else{
		bodyHeght = document.body.offsetHeight;//ff
	}
	window.parent.document.getElementById("leftLayout").style.height = bodyHeght+20+'px';
}

</script>
</body>
</html>