Commit 2ff0a575 by niskac

Made bootstrap directory independent and fixed a few comments.

parent d3237b51
......@@ -9,11 +9,19 @@
class Bootstrap extends CApplicationComponent
{
/**
* @property string the url to the assets for this extension.
* @var string the assets url for this extension.
*/
protected $_assetsUrl;
/**
* Initializes the component.
*/
public function init()
{
Yii::setPathOfAlias('bootstrap', realpath(dirname(__FILE__).'/..'));
}
/**
* Registers the Bootstrap CSS.
*/
public function registerBootstrap()
......@@ -41,7 +49,7 @@ class Bootstrap extends CApplicationComponent
return $this->_assetsUrl;
else
{
$assetsPath = Yii::getPathOfAlias('ext.bootstrap.assets');
$assetsPath = Yii::getPathOfAlias('bootstrap.assets');
if (YII_DEBUG)
$assetsUrl = Yii::app()->assetManager->publish($assetsPath, false, -1, true);
......
......@@ -9,11 +9,11 @@
class BootActiveForm extends CActiveForm
{
/**
* @property string the error message type. Valid types are 'inline' and 'block'.
* @var string the error message type. Valid types are 'inline' and 'block'.
*/
public $errorMessageType = 'inline';
/**
* @property boolean whether this is a stacked form.
* @var boolean whether this is a stacked form.
*/
public $stacked = false;
......
......@@ -6,19 +6,19 @@
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
Yii::import('ext.bootstrap.widgets.BootWidget');
Yii::import('bootstrap.widgets.BootWidget');
class BootAlert extends BootWidget
{
/**
* @property array the keys for which to get flash messages.
* @var array the keys for which to get flash messages.
*/
public $keys = array('success','info','warning','error');
/**
* @property string the template to use for displaying flash messages.
* @var string the template to use for displaying flash messages.
*/
public $template = '<div class="alert-message {key}"><p>{message}</p></div>';
/**
* @property array the html options.
* @var array the html options.
*/
public $htmlOptions = array('class'=>'alert');
......
......@@ -10,11 +10,11 @@ Yii::import('zii.widgets.CBreadcrumbs');
class BootCrumb extends CBreadcrumbs
{
/**
* @property array the HTML attributes for the breadcrumbs container tag.
* @var array the HTML attributes for the breadcrumbs container tag.
*/
public $htmlOptions=array('class'=>'breadcrumb');
/**
* @property string the separator between links in the breadcrumbs. Defaults to ' / '.
* @var string the separator between links in the breadcrumbs. Defaults to ' / '.
*/
public $separator = '/';
......
......@@ -14,7 +14,7 @@ Yii::import('zii.widgets.grid.CDataColumn');
class BootDataColumn extends CDataColumn
{
/**
* @properties string the header color for sortable columns.
* @var string the header color for sortable columns.
* Valid values are: 'blue', 'green', 'red', 'yellow', 'orange' and 'purple'.
* @since 0.9.6
*/
......
......@@ -10,12 +10,11 @@ Yii::import('zii.widgets.CDetailView');
class BootDetailView extends CDetailView
{
/**
* @property array the HTML options used for {@link tagName}
* @var array the HTML options used for {@link tagName}
*/
public $htmlOptions=array('class'=>'detail-view');
/**
* @property string the URL of the CSS file used by this detail view.
* @var string the URL of the CSS file used by this detail view.
* Defaults to false, meaning that no CSS will be included.
*/
public $cssFile=false;
......
......@@ -7,27 +7,24 @@
*/
Yii::import('zii.widgets.grid.CGridView');
Yii::import('ext.bootstrap.widgets.BootDataColumn');
Yii::import('bootstrap.widgets.BootDataColumn');
class BootGridView extends CGridView
{
/**
* @property string the CSS class name for the container table.
* @var string the CSS class name for the container table.
* Defaults to 'zebra-striped'.
*/
public $itemsCssClass = 'zebra-striped';
/**
* @property string the CSS class name for the pager container.
* @var string the CSS class name for the pager container.
* Defaults to 'pagination'.
*/
public $pagerCssClass = 'pagination';
/**
* @property array the configuration for the pager.
* @var array the configuration for the pager.
* Defaults to <code>array('class'=>'ext.bootstrap.widgets.BootPager')</code>.
*/
public $pager = array('class'=>'ext.bootstrap.widgets.BootPager');
public $pager = array('class'=>'bootstrap.widgets.BootPager');
/**
* Creates column objects and initializes them.
......
......@@ -9,21 +9,21 @@
class BootInput extends CInputWidget
{
/**
* @property BootActiveForm the associated form widget.
* @var BootActiveForm the associated form widget.
*/
public $form;
/**
* @property string the input label text.
* @var string the input label text.
*/
public $label;
/**
* @property string the input type.
* @var string the input type.
* Following types are supported: checkbox, checkboxlist, dropdownlist, filefield, password,
* radiobutton, radiobuttonlist, textarea, textfield, captcha and uneditable.
*/
public $type;
/**
* @property array the data for list inputs.
* @var array the data for list inputs.
*/
public $data = array();
......
......@@ -10,13 +10,12 @@ Yii::import('zii.widgets.CListView');
class BootListView extends CListView
{
/**
* @property string the CSS class name for the pager container. Defaults to 'pagination'.
* @var string the CSS class name for the pager container. Defaults to 'pagination'.
*/
public $pagerCssClass = 'pagination';
/**
* @property array the configuration for the pager. Defaults to <code>array('class'=>'BootPager')</code>.
* @var array the configuration for the pager. Defaults to <code>array('class'=>'BootPager')</code>.
* @see enablePagination
*/
public $pager = array('class'=>'ext.bootstrap.widgets.BootPager');
public $pager = array('class'=>'bootstrap.widgets.BootPager');
}
......@@ -6,16 +6,16 @@
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
Yii::import('ext.bootstrap.widgets.BootListView');
Yii::import('bootstrap.widgets.BootListView');
class BootMediaGrid extends BootListView
{
/**
* @property string the tag name for the view container. Defaults to 'div'.
* @var string the tag name for the view container. Defaults to 'div'.
*/
public $tagName = 'div';
/**
* @property array the images to display in the media grid.
* @var array the images to display in the media grid.
*/
public $images = array();
......
......@@ -11,7 +11,7 @@ Yii::import('zii.widgets.CMenu');
class BootMenu extends CMenu
{
/**
* @property string the type of menu to display.
* @var string the type of menu to display.
* Following types are supported: 'tabs' and 'pills'.
*/
public $type = 'tabs';
......
......@@ -7,11 +7,11 @@
* @since 0.9.3
*/
Yii::import('ext.bootstrap.widgets.BootWidget');
Yii::import('bootstrap.widgets.BootWidget');
class BootModal extends BootWidget
{
/**
* @property string the name of the container element. Defaults to 'div'.
* @var string the name of the container element. Defaults to 'div'.
*/
public $tagName = 'div';
......
......@@ -9,7 +9,7 @@
class BootPager extends CLinkPager
{
/**
* @property boolean whether to display the first and last items.
* @var boolean whether to display the first and last items.
*/
public $displayFirstAndLast = false;
......
......@@ -7,11 +7,11 @@
* @since 0.9.2
*/
Yii::import('ext.bootstrap.widgets.BootWidget');
Yii::import('bootstrap.widgets.BootWidget');
class BootPopover extends BootWidget
{
/**
* @property string the CSS selector to use for selecting the pop-over elements.
* @var string the CSS selector to use for selecting the pop-over elements.
*/
public $selector = '.pop';
......
......@@ -7,33 +7,32 @@
* @since 0.9.6
*/
Yii::import('ext.bootstrap.widgets.BootWidget');
Yii::import('bootstrap.widgets.BootWidget');
class BootTabs extends BootWidget
{
/**
* @property string the type of tabs to display. Defaults to 'tabs'.
* @var string the type of tabs to display. Defaults to 'tabs'.
* Valid values are 'tabs' and 'pills'.
*/
public $type = 'tabs';
/**
* @property array the tab configuration.
* @var array the tab configuration.
*/
public $tabs = array();
/**
* @property string the name of the container element that contains all panels. Defaults to 'div'.
* @var string the name of the container element that contains all panels. Defaults to 'div'.
*/
public $tagName = 'div';
/**
* @property string the template to use for displaying the header.
* @var string the template to use for displaying the header.
*/
public $headerTemplate = '<li class="{class}"><a href="{url}">{title}</a></li>';
/**
* @property string the template to use for displaying the content.
* @var string the template to use for displaying the content.
*/
public $contentTemplate = '<div class="tab-pane {class}" id="{id}">{content}</div>';
/**
* @property string the CSS selector to use for selecting the tabs elements.
* @var string the CSS selector to use for selecting the tabs elements.
*/
public $selector = '.tabs li > a, .pills > li > a';
......
......@@ -6,11 +6,11 @@
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
Yii::import('ext.bootstrap.widgets.BootWidget');
Yii::import('bootstrap.widgets.BootWidget');
class BootTwipsy extends BootWidget
{
/**
* @property string the CSS selector to use for selecting the twipsy elements.
* @var string the CSS selector to use for selecting the twipsy elements.
*/
public $selector = 'a[title]';
......
......@@ -9,11 +9,11 @@
class BootWidget extends CWidget
{
/**
* @property array the initial JavaScript options that should be passed to the Bootstrap plugin.
* @var array the initial JavaScript options that should be passed to the Bootstrap plugin.
*/
public $options = array();
/**
* @property array the HTML attributes that should be rendered in the HTML tag representing the Bootstrap widget.
* @var array the HTML attributes that should be rendered in the HTML tag representing the Bootstrap widget.
*/
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