Commit 5c53a30b by Crisu83

update documentation and demo

parent eaf3781f
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
.input-block-level { .input-block-level {
display:block; display:block;
width:100%; width:100%;
min-height:28px; min-height:30px;
-webkit-box-sizing:border-box; -webkit-box-sizing:border-box;
-moz-box-sizing:border-box; -moz-box-sizing:border-box;
box-sizing:border-box; box-sizing:border-box;
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
display:block; display:block;
} }
.grid-view table.items tr.selected td { background:#eeeeee; } .grid-view table.items tr.selected td { background:#eeeeee; }
.grid-view .filters .filter-container { padding:0 10px 0 0; } .grid-view .filters .filter-container { padding:0 15px 0 0; }
.grid-view .filters input, .grid-view .filters select { .grid-view .filters input, .grid-view .filters select {
margin-bottom:0; margin-bottom:0;
width:100%; width:100%;
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
.filters { .filters {
.filter-container { .filter-container {
padding: 0 10px 0 0; padding: 0 15px 0 0;
} }
input, input,
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
.input-block-level { .input-block-level {
display:block; display:block;
width:100%; width:100%;
min-height:28px; min-height:30px;
-webkit-box-sizing:border-box; -webkit-box-sizing:border-box;
-moz-box-sizing:border-box; -moz-box-sizing:border-box;
box-sizing:border-box; box-sizing:border-box;
......
...@@ -35,7 +35,7 @@ class TbActiveForm extends CActiveForm ...@@ -35,7 +35,7 @@ class TbActiveForm extends CActiveForm
*/ */
public $input; public $input;
/** /**
* @var boolean flag that indicates if the errors should be displayed as blocks. * @var boolean indicates whether to display errors as blocks.
*/ */
public $inlineErrors; public $inlineErrors;
......
...@@ -25,7 +25,7 @@ class TbAlert extends CWidget ...@@ -25,7 +25,7 @@ class TbAlert extends CWidget
*/ */
public $alerts; public $alerts;
/** /**
* @var string the string to use for the close link. If this is set false, no close link will be displayed. * @var string|boolean the close link text. If this is set false, no close link will be displayed.
*/ */
public $closeText = '×'; public $closeText = '×';
/** /**
...@@ -33,7 +33,7 @@ class TbAlert extends CWidget ...@@ -33,7 +33,7 @@ class TbAlert extends CWidget
*/ */
public $block = true; public $block = true;
/** /**
* @var boolean indicates whether the modal should use transitions. Defaults to 'true'. * @var boolean indicates whether alerts should use transitions. Defaults to 'true'.
*/ */
public $fade = true; public $fade = true;
/** /**
...@@ -45,8 +45,6 @@ class TbAlert extends CWidget ...@@ -45,8 +45,6 @@ class TbAlert extends CWidget
*/ */
public $htmlOptions = array(); public $htmlOptions = array();
private static $_containerId = 0;
/** /**
* Initializes the widget. * Initializes the widget.
*/ */
...@@ -130,7 +128,6 @@ class TbAlert extends CWidget ...@@ -130,7 +128,6 @@ class TbAlert extends CWidget
echo '</div>'; echo '</div>';
$selector = "#{$id} .alert"; $selector = "#{$id} .alert";
$id .= '_'.self::$_containerId++;
/** @var CClientScript $cs */ /** @var CClientScript $cs */
$cs = Yii::app()->getClientScript(); $cs = Yii::app()->getClientScript();
......
...@@ -69,6 +69,9 @@ abstract class TbBaseMenu extends CMenu ...@@ -69,6 +69,9 @@ abstract class TbBaseMenu extends CMenu
if (isset($item['items'])) if (isset($item['items']))
$classes[] = $this->getDropdownCssClass(); $classes[] = $this->getDropdownCssClass();
if (isset($item['disabled']))
$classes[] = 'disabled';
if (!empty($classes)) if (!empty($classes))
{ {
$classes = implode(' ', $classes); $classes = implode(' ', $classes);
......
...@@ -25,13 +25,13 @@ class TbButton extends CWidget ...@@ -25,13 +25,13 @@ class TbButton extends CWidget
const BUTTON_AJAXSUBMIT = 'ajaxSubmit'; const BUTTON_AJAXSUBMIT = 'ajaxSubmit';
// Button types. // Button types.
const TYPE_LINK = 'link';
const TYPE_PRIMARY = 'primary'; const TYPE_PRIMARY = 'primary';
const TYPE_INFO = 'info'; const TYPE_INFO = 'info';
const TYPE_SUCCESS = 'success'; const TYPE_SUCCESS = 'success';
const TYPE_WARNING = 'warning'; const TYPE_WARNING = 'warning';
const TYPE_DANGER = 'danger'; const TYPE_DANGER = 'danger';
const TYPE_INVERSE = 'inverse'; const TYPE_INVERSE = 'inverse';
const TYPE_LINK = 'link';
// Button sizes. // Button sizes.
const SIZE_MINI = 'mini'; const SIZE_MINI = 'mini';
...@@ -50,7 +50,7 @@ class TbButton extends CWidget ...@@ -50,7 +50,7 @@ class TbButton extends CWidget
public $type; public $type;
/** /**
* @var string the button size. * @var string the button size.
* Valid values are 'small' and 'large'. * Valid values are 'large', 'small' and 'mini'.
*/ */
public $size; public $size;
/** /**
...@@ -66,13 +66,21 @@ class TbButton extends CWidget ...@@ -66,13 +66,21 @@ class TbButton extends CWidget
*/ */
public $url; public $url;
/** /**
* @var boolean indicates whether the button should span the full width of the a parent.
*/
public $block = false;
/**
* @var boolean indicates whether the button is active. * @var boolean indicates whether the button is active.
*/ */
public $active = false; public $active = false;
/** /**
* @var array the dropdown button items. * @var boolean indicates whether the button is disabled.
*/ */
public $items; public $disabled = false;
/**
* @var boolean indicates whether to encode the label.
*/
public $encodeLabel = true;
/** /**
* @var boolean indicates whether to enable toggle. * @var boolean indicates whether to enable toggle.
*/ */
...@@ -86,9 +94,9 @@ class TbButton extends CWidget ...@@ -86,9 +94,9 @@ class TbButton extends CWidget
*/ */
public $completeText; public $completeText;
/** /**
* @var boolean indicates whether to encode the label. * @var array the dropdown button items.
*/ */
public $encodeLabel = true; public $items;
/** /**
* @var array the HTML attributes for the widget container. * @var array the HTML attributes for the widget container.
*/ */
...@@ -98,7 +106,7 @@ class TbButton extends CWidget ...@@ -98,7 +106,7 @@ class TbButton extends CWidget
*/ */
public $ajaxOptions = array(); public $ajaxOptions = array();
/** /**
* @var array the HTML options for the dropdown menu. * @var array the HTML attributes for the dropdown menu.
* @since 0.9.11 * @since 0.9.11
*/ */
public $dropdownOptions = array(); public $dropdownOptions = array();
...@@ -121,9 +129,15 @@ class TbButton extends CWidget ...@@ -121,9 +129,15 @@ class TbButton extends CWidget
if (isset($this->size) && in_array($this->size, $validSizes)) if (isset($this->size) && in_array($this->size, $validSizes))
$classes[] = 'btn-'.$this->size; $classes[] = 'btn-'.$this->size;
if ($this->block)
$classes[] = 'btn-block';
if ($this->active) if ($this->active)
$classes[] = 'active'; $classes[] = 'active';
if ($this->disabled)
$classes[] = 'disabled';
if ($this->encodeLabel) if ($this->encodeLabel)
$this->label = CHtml::encode($this->label); $this->label = CHtml::encode($this->label);
......
...@@ -24,14 +24,14 @@ class TbHeroUnit extends CWidget ...@@ -24,14 +24,14 @@ class TbHeroUnit extends CWidget
*/ */
public $encodeHeading = true; public $encodeHeading = true;
/** /**
* @var array the HTML attributes for the widget container.
*/
public $htmlOptions = array();
/**
* @var array the HTML attributes for the heading element. * @var array the HTML attributes for the heading element.
* @since 1.0.0 * @since 1.0.0
*/ */
public $headingOptions = array(); public $headingOptions = array();
/**
* @var array the HTML attributes for the widget container.
*/
public $htmlOptions = array();
/** /**
* Initializes the widget. * Initializes the widget.
......
...@@ -26,13 +26,13 @@ class TbMenu extends TbBaseMenu ...@@ -26,13 +26,13 @@ class TbMenu extends TbBaseMenu
*/ */
public $type; public $type;
/** /**
* @var boolean indicates whether to stack navigation items. * @var string|array the scrollspy target or configuration.
*/ */
public $stacked = false; public $scrollspy;
/** /**
* @var string|array the scrollspy configuration. * @var boolean indicates whether the menu should appear vertically stacked.
*/ */
public $scrollspy; public $stacked = false;
/** /**
* @var boolean indicates whether dropdowns should be dropups instead. * @var boolean indicates whether dropdowns should be dropups instead.
*/ */
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
class TbModal extends CWidget class TbModal extends CWidget
{ {
/** /**
* @var boolean indicates whether to automatically open the modal when initialized. Defaults to 'false'. * @var boolean indicates whether to automatically open the modal. Defaults to 'false'.
*/ */
public $autoOpen = false; public $autoOpen = false;
/** /**
......
...@@ -40,11 +40,6 @@ class TbNavbar extends CWidget ...@@ -40,11 +40,6 @@ class TbNavbar extends CWidget
*/ */
public $brandOptions = array(); public $brandOptions = array();
/** /**
* @var array navigation items.
* @since 0.9.8
*/
public $items = array();
/**
* @var mixed fix location of the navbar if applicable. * @var mixed fix location of the navbar if applicable.
* Valid values are 'top' and 'bottom'. Defaults to 'top'. * Valid values are 'top' and 'bottom'. Defaults to 'top'.
* Setting the value to false will make the navbar static. * Setting the value to false will make the navbar static.
...@@ -61,6 +56,11 @@ class TbNavbar extends CWidget ...@@ -61,6 +56,11 @@ class TbNavbar extends CWidget
*/ */
public $collapse = false; public $collapse = false;
/** /**
* @var array navigation items.
* @since 0.9.8
*/
public $items = array();
/**
* @var array the HTML attributes for the widget container. * @var array the HTML attributes for the widget container.
*/ */
public $htmlOptions = array(); public $htmlOptions = array();
......
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