Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
Yii Bootstrap 3
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Common
Yii Bootstrap 3
Commits
2ff0a575
Commit
2ff0a575
authored
Dec 21, 2011
by
niskac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made bootstrap directory independent and fixed a few comments.
parent
d3237b51
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
53 additions
and
51 deletions
+53
-51
Bootstrap.php
components/Bootstrap.php
+10
-2
BootActiveForm.php
widgets/BootActiveForm.php
+2
-2
BootAlert.php
widgets/BootAlert.php
+4
-4
BootCrumb.php
widgets/BootCrumb.php
+2
-2
BootDataColumn.php
widgets/BootDataColumn.php
+1
-1
BootDetailView.php
widgets/BootDetailView.php
+2
-3
BootGridView.php
widgets/BootGridView.php
+5
-8
BootInput.php
widgets/BootInput.php
+4
-4
BootListView.php
widgets/BootListView.php
+3
-4
BootMediaGrid.php
widgets/BootMediaGrid.php
+3
-3
BootMenu.php
widgets/BootMenu.php
+1
-1
BootModal.php
widgets/BootModal.php
+2
-2
BootPager.php
widgets/BootPager.php
+1
-1
BootPopover.php
widgets/BootPopover.php
+2
-2
BootTabs.php
widgets/BootTabs.php
+7
-8
BootTwipsy.php
widgets/BootTwipsy.php
+2
-2
BootWidget.php
widgets/BootWidget.php
+2
-2
No files found.
components/Bootstrap.php
View file @
2ff0a575
...
...
@@ -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
);
...
...
widgets/BootActiveForm.php
View file @
2ff0a575
...
...
@@ -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
;
...
...
widgets/BootAlert.php
View file @
2ff0a575
...
...
@@ -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'
);
...
...
widgets/BootCrumb.php
View file @
2ff0a575
...
...
@@ -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
=
'/'
;
...
...
widgets/BootDataColumn.php
View file @
2ff0a575
...
...
@@ -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
*/
...
...
widgets/BootDetailView.php
View file @
2ff0a575
...
...
@@ -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
;
...
...
widgets/BootGridView.php
View file @
2ff0a575
...
...
@@ -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.
...
...
widgets/BootInput.php
View file @
2ff0a575
...
...
@@ -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
();
...
...
widgets/BootListView.php
View file @
2ff0a575
...
...
@@ -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'
);
}
widgets/BootMediaGrid.php
View file @
2ff0a575
...
...
@@ -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
();
...
...
widgets/BootMenu.php
View file @
2ff0a575
...
...
@@ -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'
;
...
...
widgets/BootModal.php
View file @
2ff0a575
...
...
@@ -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'
;
...
...
widgets/BootPager.php
View file @
2ff0a575
...
...
@@ -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
;
...
...
widgets/BootPopover.php
View file @
2ff0a575
...
...
@@ -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'
;
...
...
widgets/BootTabs.php
View file @
2ff0a575
...
...
@@ -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'
;
...
...
widgets/BootTwipsy.php
View file @
2ff0a575
...
...
@@ -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]'
;
...
...
widgets/BootWidget.php
View file @
2ff0a575
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment