Index: modules/system/system.css =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.css,v retrieving revision 1.44 diff -u -r1.44 system.css --- modules/system/system.css 4 Dec 2007 10:52:16 -0000 1.44 +++ modules/system/system.css 13 Dec 2007 02:46:11 -0000 @@ -20,6 +20,16 @@ tr.drag-previous { background-color: #ffd; } +tr.no-child.no-parent +{ + background-color: #9b9 !important; +} +tr.no-child { + background-color: #dfd !important; +} +tr.no-parent { + background-color: #bbb !important; +} td.active { background-color: #ddd; } Index: modules/menu/menu.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/menu/menu.admin.inc,v retrieving revision 1.20 diff -u -r1.20 menu.admin.inc --- modules/menu/menu.admin.inc 11 Dec 2007 12:17:58 -0000 1.20 +++ modules/menu/menu.admin.inc 13 Dec 2007 02:46:11 -0000 @@ -91,6 +91,17 @@ '#default_value' => isset($form_state[$mlid]['plid']) ? $form_state[$mlid]['plid'] : $item['plid'], '#size' => 6, ); + + if ($item['plid'] == '0' && rand(0,2) > 1) { + $form[$mlid]['#no_parent'] = TRUE; + } + if (rand(0,3) > 2) { + $form[$mlid]['#no_child'] = TRUE; + } + if ($item['plid']) { + unset($form['mlid:'. $item['plid']]['#no_child']); + } + // Build a list of operations. $operations = array(); $operations['edit'] = l(t('edit'), 'admin/build/menu/item/'. $item['mlid'] .'/edit'); @@ -208,6 +219,10 @@ $row = array_merge(array('data' => $row), $element['#attributes']); $row['class'] = !empty($row['class']) ? $row['class'] .' draggable' : 'draggable'; + + $row['class'] .= isset($element['#no_parent']) ? ' no-parent' : ''; + $row['class'] .= isset($element['#no_child']) ? ' no-child' : ''; + $rows[] = $row; } } @@ -366,12 +381,12 @@ */ function menu_edit_item_submit($form, &$form_state) { $item = $form_state['values']['menu']; - + // The value of "hidden" is the opposite of the value - // supplied by the "enabled" checkbox. + // supplied by the "enabled" checkbox. $item['hidden'] = (int) !$item['enabled']; unset($item['enabled']); - + $item['options']['attributes']['title'] = $item['description']; list($item['menu_name'], $item['plid']) = explode(':', $item['parent']); if (!menu_link_save($item)) {