Commit 5c53a30b by Crisu83

update documentation and demo

parent eaf3781f
......@@ -15,7 +15,7 @@
.input-block-level {
display:block;
width:100%;
min-height:28px;
min-height:30px;
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
......@@ -38,7 +38,7 @@
display:block;
}
.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 {
margin-bottom:0;
width:100%;
......
......@@ -41,7 +41,7 @@
.filters {
.filter-container {
padding: 0 10px 0 0;
padding: 0 15px 0 0;
}
input,
......
......@@ -15,7 +15,7 @@
.input-block-level {
display:block;
width:100%;
min-height:28px;
min-height:30px;
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
......
......@@ -35,7 +35,7 @@ class TbActiveForm extends CActiveForm
*/
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;
......
......@@ -25,7 +25,7 @@ class TbAlert extends CWidget
*/
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 = '×';
/**
......@@ -33,7 +33,7 @@ class TbAlert extends CWidget
*/
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;
/**
......@@ -45,8 +45,6 @@ class TbAlert extends CWidget
*/
public $htmlOptions = array();
private static $_containerId = 0;
/**
* Initializes the widget.
*/
......@@ -130,7 +128,6 @@ class TbAlert extends CWidget
echo '</div>';
$selector = "#{$id} .alert";
$id .= '_'.self::$_containerId++;
/** @var CClientScript $cs */
$cs = Yii::app()->getClientScript();
......
......@@ -69,6 +69,9 @@ abstract class TbBaseMenu extends CMenu
if (isset($item['items']))
$classes[] = $this->getDropdownCssClass();
if (isset($item['disabled']))
$classes[] = 'disabled';
if (!empty($classes))
{
$classes = implode(' ', $classes);
......
......@@ -25,13 +25,13 @@ class TbButton extends CWidget
const BUTTON_AJAXSUBMIT = 'ajaxSubmit';
// Button types.
const TYPE_LINK = 'link';
const TYPE_PRIMARY = 'primary';
const TYPE_INFO = 'info';
const TYPE_SUCCESS = 'success';
const TYPE_WARNING = 'warning';
const TYPE_DANGER = 'danger';
const TYPE_INVERSE = 'inverse';
const TYPE_LINK = 'link';
// Button sizes.
const SIZE_MINI = 'mini';
......@@ -50,7 +50,7 @@ class TbButton extends CWidget
public $type;
/**
* @var string the button size.
* Valid values are 'small' and 'large'.
* Valid values are 'large', 'small' and 'mini'.
*/
public $size;
/**
......@@ -66,13 +66,21 @@ class TbButton extends CWidget
*/
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.
*/
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.
*/
......@@ -86,9 +94,9 @@ class TbButton extends CWidget
*/
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.
*/
......@@ -98,7 +106,7 @@ class TbButton extends CWidget
*/
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
*/
public $dropdownOptions = array();
......@@ -121,9 +129,15 @@ class TbButton extends CWidget
if (isset($this->size) && in_array($this->size, $validSizes))
$classes[] = 'btn-'.$this->size;
if ($this->block)
$classes[] = 'btn-block';
if ($this->active)
$classes[] = 'active';
if ($this->disabled)
$classes[] = 'disabled';
if ($this->encodeLabel)
$this->label = CHtml::encode($this->label);
......
......@@ -24,14 +24,14 @@ class TbHeroUnit extends CWidget
*/
public $encodeHeading = true;
/**
* @var array the HTML attributes for the widget container.
*/
public $htmlOptions = array();
/**
* @var array the HTML attributes for the heading element.
* @since 1.0.0
*/
public $headingOptions = array();
/**
* @var array the HTML attributes for the widget container.
*/
public $htmlOptions = array();
/**
* Initializes the widget.
......
......@@ -26,13 +26,13 @@ class TbMenu extends TbBaseMenu
*/
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.
*/
......
......@@ -15,7 +15,7 @@
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;
/**
......
......@@ -40,11 +40,6 @@ class TbNavbar extends CWidget
*/
public $brandOptions = array();
/**
* @var array navigation items.
* @since 0.9.8
*/
public $items = array();
/**
* @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.
......@@ -61,6 +56,11 @@ class TbNavbar extends CWidget
*/
public $collapse = false;
/**
* @var array navigation items.
* @since 0.9.8
*/
public $items = array();
/**
* @var array the HTML attributes for the widget container.
*/
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