Commit fc2d9ee0 by niskac

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

parent 92df68fc
...@@ -61,7 +61,7 @@ class FacebookConnect extends CApplicationComponent ...@@ -61,7 +61,7 @@ class FacebookConnect extends CApplicationComponent
/** /**
* Calls the Facebook API. * Calls the Facebook API.
* @param string $query the query to send. * @param string $query the query to send.
* @param array $params the query paramters. * @param array $params the query parameters.
* @return array the response. * @return array the response.
*/ */
public function api($query, $params=array()) public function api($query, $params=array())
...@@ -102,7 +102,7 @@ class FacebookConnect extends CApplicationComponent ...@@ -102,7 +102,7 @@ class FacebookConnect extends CApplicationComponent
/** /**
* Returns the Facebook application instance. * Returns the Facebook application instance.
* @return Facebook the instance * @return Facebook the instance.
*/ */
public function getFacebook() public function getFacebook()
{ {
......
...@@ -37,7 +37,9 @@ class BootNavbar extends CWidget ...@@ -37,7 +37,9 @@ class BootNavbar extends CWidget
*/ */
public $items = array(); 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 * @since 0.9.8
*/ */
public $fixed = self::FIXED_TOP; public $fixed = self::FIXED_TOP;
...@@ -77,10 +79,12 @@ class BootNavbar extends CWidget ...@@ -77,10 +79,12 @@ class BootNavbar extends CWidget
{ {
$classes = array('navbar'); $classes = array('navbar');
$validFixes = array(self::FIXED_TOP, self::FIXED_BOTTOM); if ($this->fixed !== false)
{
if (in_array($this->fixed, $validFixes)) $validFixes = array(self::FIXED_TOP, self::FIXED_BOTTOM);
$classes[] = 'navbar-fixed-'.$this->fixed; if (in_array($this->fixed, $validFixes))
$classes[] = 'navbar-fixed-'.$this->fixed;
}
$classes = implode(' ', $classes); $classes = implode(' ', $classes);
if (isset($this->htmlOptions['class'])) 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