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
5c53a30b
Commit
5c53a30b
authored
Aug 23, 2012
by
Crisu83
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update documentation and demo
parent
eaf3781f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
47 additions
and
33 deletions
+47
-33
bootstrap-yii.css
assets/css/bootstrap-yii.css
+2
-2
bootstrap-yii.less
assets/less/bootstrap-yii.less
+1
-1
styles.css
demo/css/styles.css
+1
-1
index.php
demo/protected/views/site/index.php
+0
-0
TbActiveForm.php
widgets/TbActiveForm.php
+1
-1
TbAlert.php
widgets/TbAlert.php
+2
-5
TbBaseMenu.php
widgets/TbBaseMenu.php
+3
-0
TbButton.php
widgets/TbButton.php
+22
-8
TbHeroUnit.php
widgets/TbHeroUnit.php
+4
-4
TbMenu.php
widgets/TbMenu.php
+5
-5
TbModal.php
widgets/TbModal.php
+1
-1
TbNavbar.php
widgets/TbNavbar.php
+5
-5
No files found.
assets/css/bootstrap-yii.css
View file @
5c53a30b
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
.input-block-level
{
.input-block-level
{
display
:
block
;
display
:
block
;
width
:
100%
;
width
:
100%
;
min-height
:
28
px
;
min-height
:
30
px
;
-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
1
0
px
0
0
;
}
.grid-view
.filters
.filter-container
{
padding
:
0
1
5
px
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%
;
...
...
assets/less/bootstrap-yii.less
View file @
5c53a30b
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
.filters {
.filters {
.filter-container {
.filter-container {
padding: 0 1
0
px 0 0;
padding: 0 1
5
px 0 0;
}
}
input,
input,
...
...
demo/css/styles.css
View file @
5c53a30b
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
.input-block-level
{
.input-block-level
{
display
:
block
;
display
:
block
;
width
:
100%
;
width
:
100%
;
min-height
:
28
px
;
min-height
:
30
px
;
-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
;
...
...
demo/protected/views/site/index.php
View file @
5c53a30b
This diff is collapsed.
Click to expand it.
widgets/TbActiveForm.php
View file @
5c53a30b
...
@@ -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
;
...
...
widgets/TbAlert.php
View file @
5c53a30b
...
@@ -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
();
...
...
widgets/TbBaseMenu.php
View file @
5c53a30b
...
@@ -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
);
...
...
widgets/TbButton.php
View file @
5c53a30b
...
@@ -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
option
s for the dropdown menu.
* @var array the HTML
attribute
s 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
);
...
...
widgets/TbHeroUnit.php
View file @
5c53a30b
...
@@ -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.
...
...
widgets/TbMenu.php
View file @
5c53a30b
...
@@ -26,14 +26,14 @@ class TbMenu extends TbBaseMenu
...
@@ -26,14 +26,14 @@ 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
;
/**
* @var string|array the scrollspy configuration.
*/
*/
public
$scrollspy
;
public
$scrollspy
;
/**
/**
* @var boolean indicates whether the menu should appear vertically stacked.
*/
public
$stacked
=
false
;
/**
* @var boolean indicates whether dropdowns should be dropups instead.
* @var boolean indicates whether dropdowns should be dropups instead.
*/
*/
public
$dropup
=
false
;
public
$dropup
=
false
;
...
...
widgets/TbModal.php
View file @
5c53a30b
...
@@ -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
;
/**
/**
...
...
widgets/TbNavbar.php
View file @
5c53a30b
...
@@ -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
();
...
...
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