Commits

Christoffer Niska  committed 586942f

minor addition to #140

  • Participants
  • Parent commits 30bbfba
  • Branches bootstrap-2.0.2

Comments (0)

Files changed (3)

File widgets/BootBaseMenu.php

 			$item['label'] = '<i class="'.$item['icon'].'"></i> '.$item['label'];
 		}
 
+		if (!isset($item['header']) && !isset($item['url']))
+			$item['url'] = '#';
+
 		if (isset($item['url']))
 			return CHtml::link($item['label'], $item['url'], $item['linkOptions']);
 		else

File widgets/BootDropdown.php

 
 				$class = array();
 				if (!isset($item['url']))
+				{
+					$item['header'] = true;
 					$class[] = 'nav-header';
+				}
 
 				if ($item['active'])
 					$class[] = 'active';

File widgets/BootMenu.php

 				if ($item['active'] || (isset($item['items']) && $this->isChildActive($item['items'])))
 					$class[] = 'active';
 
+				if ($this->type === self::TYPE_LIST && !isset($item['url']))
+				{
+					$item['header'] = true;
+					$class[] = 'nav-header';
+				}
+
 				if (isset($item['items']))
 					$class[] = 'dropdown';