? .menu_site_map.css.swp
? .menu_site_map.module.swp
? menu_site_map-605744.patch
Index: menu_site_map.css
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/menu_site_map/menu_site_map.css,v
retrieving revision 1.1
diff -u -p -r1.1 menu_site_map.css
--- menu_site_map.css	15 Oct 2009 18:10:43 -0000	1.1
+++ menu_site_map.css	25 Nov 2009 18:14:40 -0000
@@ -10,7 +10,7 @@
   margin-bottom: 10px;
 }
 
-.menu-site-map li.item {
+.menu-site-map.menu-site-map-default li.item {
   width: 100%;
 
   margin-left: 0;
@@ -27,7 +27,7 @@
   background: none;
 }
 
-.menu-site-map .item.level-1 {
+.menu-site-map.menu-site-map-default .item.level-1 {
   font-weight: bold;
 }
 
Index: menu_site_map.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/menu_site_map/menu_site_map.module,v
retrieving revision 1.1
diff -u -p -r1.1 menu_site_map.module
--- menu_site_map.module	15 Oct 2009 18:10:43 -0000	1.1
+++ menu_site_map.module	25 Nov 2009 18:14:41 -0000
@@ -96,12 +96,12 @@ function menu_site_map_theme() {
  *
  * This is just a wrapper for the internal theme functions.
  */
-function theme_menu_site_map_item_container_open($depth, $is_first = FALSE) { 
+function theme_menu_site_map_item_container_open($depth, $is_first = FALSE, $leaf = FALSE) { 
   $output = '';
   $display_style = variable_get('menu_site_map_display_style', 'default');
   if ($display_style == 'lists') {
     // Theme in a way that wraps menu items in nested lists
-    $output .= _theme_menu_site_map_item_container_open_lists($depth, $is_first);
+    $output .= _theme_menu_site_map_item_container_open_lists($depth, $is_first, $leaf);
   }
   else if ($display_style == 'theme') {
     // If this setting was selected, you should never get here
@@ -111,7 +111,7 @@ function theme_menu_site_map_item_contai
   }
   else {
     // Default
-    $output .= _theme_menu_site_map_item_container_open_default($depth, $is_first);
+    $output .= _theme_menu_site_map_item_container_open_default($depth, $is_first, $leaf);
   }
   return $output;
 }
@@ -120,7 +120,7 @@ function theme_menu_site_map_item_contai
  * Theme the opening markeup a menu item's container in such a way that the 
  * first and second levels are wrapped in divs.
  */
-function _theme_menu_site_map_item_container_open_default($depth, $is_first = FALSE) { 
+function _theme_menu_site_map_item_container_open_default($depth, $is_first = FALSE, $leaf = FALSE) { 
   $output = '';
   if ($depth == 0) {
     $output .= sprintf("<div class=\"container level-%s%s\">\n", 
@@ -140,12 +140,14 @@ function _theme_menu_site_map_item_conta
   return $output;
 }
 
-function _theme_menu_site_map_item_container_open_lists($depth, $is_first = FALSE) { 
+function _theme_menu_site_map_item_container_open_lists($depth, $is_first = FALSE, $leaf = FALSE) { 
   $output = '';
-  
-  $output .= sprintf("<li class=\"level-%s%s\">\n", 
-                     $depth,
-                     $is_first ? ' first' : ''); 
+ 
+  if (!$leaf) {
+    $output .= sprintf("<li class=\"level-%s%s\">\n", 
+                       $depth,
+                       $is_first ? ' first' : ''); 
+  }
 
   return $output;
 }
@@ -155,12 +157,12 @@ function _theme_menu_site_map_item_conta
  *
  * This is just a wrapper for the internal theme functions.
  */
-function theme_menu_site_map_item_container_close($depth) {
+function theme_menu_site_map_item_container_close($depth, $leaf = FALSE) {
   $output = '';
   $display_style = variable_get('menu_site_map_display_style', 'default');
   if ($display_style == 'lists') {
     // Theme in a way that wraps menu items in nested lists
-    $output .= _theme_menu_site_map_item_container_close_lists($depth);
+    $output .= _theme_menu_site_map_item_container_close_lists($depth, $leaf);
   }
   else if ($display_style == 'theme') {
     // If this setting was selected, you should never get here
@@ -179,7 +181,7 @@ function theme_menu_site_map_item_contai
  * Theme the closing markeup a menu item's container in such a way that the 
  * first and second levels are wrapped in divs.
  */
-function _theme_menu_site_map_item_container_close_default($depth) {
+function _theme_menu_site_map_item_container_close_default($depth, $leaf = FALSE) {
   $output = '';
 
   if ($depth == 0) {
@@ -198,10 +200,12 @@ function _theme_menu_site_map_item_conta
   return $output;
 }
 
-function _theme_menu_site_map_item_container_close_lists($depth) {
+function _theme_menu_site_map_item_container_close_lists($depth, $leaf = FALSE) {
   $output = '';
 
-  $output .= "</li>\n";
+  if (!$leaf) {
+    $output .= "</li>\n";
+  }
 
   return $output;
 }
@@ -403,6 +407,10 @@ function _theme_menu_site_map_item_lists
   $class = sprintf("item level-%s%s",
                    $depth,
                    $leaf ? " leaf" : "");
+  if ($leaf) {
+    $output .= "<li class=\"$class\">";
+  }
+
   if ($depth == 0) {
     $output .= $link; 
   }
@@ -413,6 +421,10 @@ function _theme_menu_site_map_item_lists
     $output .= $link; 
   }
 
+  if ($leaf) {
+    $output .= "</li>";
+  }
+
   return $output;
 }
 
@@ -493,12 +505,13 @@ function theme_menu_site_map_menu_tree($
       if (!$smm_item || $smm_item['included']) {
         // We haven't excluded this menu item from our site map.
 
-        $output .= theme('menu_site_map_item_container_open', $current_depth, $is_first);
-
         // Is this menu item as deep as we're going to go down our menu tree?
         // This would be either because the item has no children or descending
         // further down the tree would result in exceeding the max depth.
         $leaf = !$menu['link']['has_children'] || $current_depth + 1 > $max_depth;
+
+        $output .= theme('menu_site_map_item_container_open', $current_depth, $is_first, $leaf);
+
         $link = theme('menu_site_map_item_link', $menu['link']);
         $item_output = theme('menu_site_map_item', 
                              $link, 
@@ -519,7 +532,7 @@ function theme_menu_site_map_menu_tree($
           $output .= theme('menu_site_map_children_container_close', $current_depth + 1);
         }
 
-        $output .= theme('menu_site_map_item_container_close', $current_depth);
+        $output .= theme('menu_site_map_item_container_close', $current_depth, $leaf);
 
         if ($is_first) {
           $is_first = FALSE;
