Commits

Christoffer Niska  committed 9e6d72a

fixed BootMenu to display the correct divider when type is set to 'list'

  • Participants
  • Parent commits 46f7bb1

Comments (0)

Files changed (2)

File widgets/BootBaseMenu.php

 	public $htmlOptions = array();
 
 	/**
+	 * Initializes the widget.
+	 */
+	public function init()
+	{
+		$this->htmlOptions['id'] = $this->getId();
+	}
+
+	/**
 	 * Runs the widget.
 	 */
 	public function run()

File widgets/BootMenu.php

 		foreach ($items as $item)
 		{
 			if (!is_array($item))
-				echo '<li class="divider-vertical"></li>';
+			{
+				$class = $this->type !== self::TYPE_LIST ? 'divider-vertical' : 'divider';
+				echo '<li class="'.$class.'"></li>';
+			}
 			else
 			{
 				if (!isset($item['itemOptions']))