PDA

View Full Version : MENU TREE....



genius551v
10 Oct 2006, 6:04 AM
Hi jack,

Could you be implementated a TREE MENU in the NavBar ? ? ? ?

I have this,

<html>
<head>
<link href="web/css/Jack/reset-min.css" rel="stylesheet" type="text/css">
<link href="web/css/Jack/style.css" rel="stylesheet" type="text/css">
<link href="web/css/Jack/container.css" rel="stylesheet" type="text/css">

<link href="web/css/folders/tree.css" rel="stylesheet" type="text/css">
<link href="web/css/folders/screen.css" rel="stylesheet" type="text/css">
<script language='JavaScript' src='web/js/treeview/yahoo.js'></script>
<script language='JavaScript' src='web/js/treeview/event.js'></script>
<script language='JavaScript' src='web/js/treeview/dom.js'></script>
<script language='JavaScript' src='web/js/treeview/logger.js'></script>
<script language='JavaScript' src='web/js/treeview/treeview-debug.js'></script>

<script language="JavaScript" src="web/js/Jack/yui.js"></script>
<script language="JavaScript" src="web/js/Jack/yui-ext_32_1.js"></script>
<script language="JavaScript" src="web/js/Jack/navbar.js"></script>
<script language="JavaScript" src="web/js/Jack/blog.js"></script>

<script language="JavaScript" src="web/js/Util.js"></script>
</head>
<body class="body">

....



<DIV id="navbar">
<A id="nav-dock" title="Abrir el Men˙" href="">
web/images/Jack/mm-expand.gif
</A>
<A id="nav-expand" title="Navegar por el Men˙" href="">
web/images/Jack/nav.gif
</A>
</DIV>

<DIV id="sidebar">
<DIV id="sidebar-inner">
<DIV class="sidebar-block">
<H2 class="sidebar-title">
<SPAN style="FLOAT: left">Men˙</SPAN>
<A id="nav-collapse" title="Cerrar el Men˙" href="">
web/images/Jack/mm-collapse.gif
</A>
</H2>

<div class="newsItem">
<div id="expandcontractdiv">MENU</div>
<div id="treeDiv1"></div>
</div>
{menu_arbol} // THIS IS SMARTY
</DIV>
</DIV>
</DIV>

<DIV id="splitter"></DIV>



.....
</body>
</html>

SMARTY

<script type='text/javascript'>
var tree;
var nodes = new Array();
var nodeIndex;

tree = new YAHOO.widget.TreeView('treeDiv1');

tmpNode1 = new YAHOO.widget.TextNode('Empleado', tree.getRoot(), false);
tmpNode11 = new YAHOO.widget.TextNode('Admon empleados', tmpNode1, false);

tmpNode1 = new YAHOO.widget.TextNode('Ficha tÚcnica', tree.getRoot(), false);
tmpNode12 = new YAHOO.widget.TextNode('Admon ficha tecnica', tmpNode1, false);
tmpNode121 = new YAHOO.widget.TextNode('ficha tecnica hilaje', tmpNode12, false);
tmpNode122 = new YAHOO.widget.TextNode('Admon ficha tecnica marquillaje', tmpNode12, false);

tmpNode1 = new YAHOO.widget.TextNode('Empleado2', tree.getRoot(), false);
tmpNode2 = new YAHOO.widget.TextNode('Admon empleados2', tmpNode1, false);

tmpNode1 = new YAHOO.widget.TextNode('Empleado3', tree.getRoot(), false);
tmpNode2 = new YAHOO.widget.TextNode('Admon empleados3', tmpNode1, false);

tree.draw();
var callback = null;
</script>

but dont works :-(

if i put separated but example in a iframe menu /iframe this works

some idea?

Tnks

techno_adi
10 Oct 2006, 6:22 AM
Just mail me i'll give you a example
aditya66_99@yahoo.com
subject line: yui:...

jack.slocum
10 Oct 2006, 7:18 AM
Thanks adi.

techno_adi
10 Oct 2006, 9:54 PM
Thanks adi.
:D