From 1ca668c4937be08c43bd0ab2d9270c5c4ac68130 Mon Sep 17 00:00:00 2001 From: Silvio Date: Tue, 29 Sep 2009 16:49:36 -0300 Subject: Initial working version --- finder_menu.css | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ finder_menu.module | 36 +++++++++++++++++++++++--------- 2 files changed, 86 insertions(+), 10 deletions(-) create mode 100644 finder_menu.css diff --git a/finder_menu.css b/finder_menu.css new file mode 100644 index 0000000..83386b1 --- /dev/null +++ b/finder_menu.css @@ -0,0 +1,60 @@ +body +{ + margin:0; + padding:0; + font-family:arial,sans-serif; +} +.domenabled #finderparent +{ + border:1px solid #000; + position:relative; + height:150px; +} +.domenabled #finder +{ + position:absolute; + top:1em; + left:1em; +} +.domenabled ul#finder, +.domenabled ul#finder li, +.domenabled ul#finder ul +{ + width:200px; + list-style-type:none; + margin:0; + padding:0; +} +.domenabled ul#finder ul.hidden +{ + top:0px; + left:-2000px; + position:absolute; +} +.domenabled ul#finder ul.shown +{ + top:0px; + left:200px; + position:absolute; +} +.domenabled #finder a.open +{ + background:url(arrowon.gif) no-repeat 90% 50% #eee; + padding-right:16px; + padding-left:0px; + display:block; +} +.domenabled #finder a.parent +{ + background:url(arrow.gif) no-repeat #fff 100% 50%; + padding-right:16px; + padding-left:0px; +} +.domenabled ul#finder li a +{ + color:#000; + background:url(normal.gif) no-repeat #fff 0 50% ; + padding-left:16px; + text-decoration:none; +} + diff --git a/finder_menu.module b/finder_menu.module index 02b1edb..91a749d 100644 --- a/finder_menu.module +++ b/finder_menu.module @@ -1,6 +1,14 @@ '; - $output = finder_menu_build($menu); - $output .= ''; + $output = '
'; + $output .= finder_menu_build($menu, TRUE); + $output .= '
'; drupal_add_js(drupal_get_path('module', 'finder_menu') .'/finder_menu.js'); return $output; @@ -115,17 +123,25 @@ function theme_finder_menu($menu_name, $mlid) { * * @ingroup themeable */ -function finder_menu_build($menu) { +function finder_menu_build($menu, $first = FALSE) { - $output = '