Commit fc2d9ee0 by niskac

added support for static positioning of BootNavbar (fixes #60)

parent 92df68fc
......@@ -61,7 +61,7 @@ class FacebookConnect extends CApplicationComponent
/**
* Calls the Facebook API.
* @param string $query the query to send.
* @param array $params the query paramters.
* @param array $params the query parameters.
* @return array the response.
*/
public function api($query, $params=array())
......@@ -102,7 +102,7 @@ class FacebookConnect extends CApplicationComponent
/**
* Returns the Facebook application instance.
* @return Facebook the instance
* @return Facebook the instance.
*/
public function getFacebook()
{
......
......@@ -37,7 +37,9 @@ class BootNavbar extends CWidget
*/
public $items = array();
/**
* @var string fix location of the navbar if applicable. Valid values are 'top' and 'bottom'. Defaults to 'top'.
* @var mixed fix location of the navbar if applicable.
* Valid values are 'top' and 'bottom'. Defaults to 'top'.
* Setting the value to false will make the navbar static.
* @since 0.9.8
*/
public $fixed = self::FIXED_TOP;
......@@ -77,10 +79,12 @@ class BootNavbar extends CWidget
{
$classes = array('navbar');
if ($this->fixed !== false)
{
$validFixes = array(self::FIXED_TOP, self::FIXED_BOTTOM);
if (in_array($this->fixed, $validFixes))
$classes[] = 'navbar-fixed-'.$this->fixed;
}
$classes = implode(' ', $classes);
if (isset($this->htmlOptions['class']))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment