Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yii2bootstrap
Project
Project
Details
Activity
Releases
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
yii2bootstrap
Commits
5cc2dc8d
Commit
5cc2dc8d
authored
Mar 16, 2014
by
SonicGD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reformat code te be PSR-2 compatible
parent
99928844
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1347 additions
and
1343 deletions
+1347
-1343
Alert.php
Alert.php
+90
-90
BootstrapAsset.php
BootstrapAsset.php
+4
-4
BootstrapPluginAsset.php
BootstrapPluginAsset.php
+8
-8
BootstrapThemeAsset.php
BootstrapThemeAsset.php
+7
-7
Button.php
Button.php
+30
-31
ButtonDropdown.php
ButtonDropdown.php
+84
-83
ButtonGroup.php
ButtonGroup.php
+52
-52
Carousel.php
Carousel.php
+120
-119
Collapse.php
Collapse.php
+80
-81
Dropdown.php
Dropdown.php
+70
-70
Modal.php
Modal.php
+198
-197
Nav.php
Nav.php
+165
-164
NavBar.php
NavBar.php
+114
-113
Progress.php
Progress.php
+96
-95
Tabs.php
Tabs.php
+176
-175
Widget.php
Widget.php
+53
-54
No files found.
Alert.php
View file @
5cc2dc8d
...
@@ -68,7 +68,6 @@ class Alert extends Widget
...
@@ -68,7 +68,6 @@ class Alert extends Widget
*/
*/
public
$closeButton
=
[];
public
$closeButton
=
[];
/**
/**
* Initializes the widget.
* Initializes the widget.
*/
*/
...
@@ -123,6 +122,7 @@ class Alert extends Widget
...
@@ -123,6 +122,7 @@ class Alert extends Widget
if
(
$tag
===
'button'
&&
!
isset
(
$this
->
closeButton
[
'type'
]))
{
if
(
$tag
===
'button'
&&
!
isset
(
$this
->
closeButton
[
'type'
]))
{
$this
->
closeButton
[
'type'
]
=
'button'
;
$this
->
closeButton
[
'type'
]
=
'button'
;
}
}
return
Html
::
tag
(
$tag
,
$label
,
$this
->
closeButton
);
return
Html
::
tag
(
$tag
,
$label
,
$this
->
closeButton
);
}
else
{
}
else
{
return
null
;
return
null
;
...
...
BootstrapAsset.php
View file @
5cc2dc8d
BootstrapPluginAsset.php
View file @
5cc2dc8d
BootstrapThemeAsset.php
View file @
5cc2dc8d
Button.php
View file @
5cc2dc8d
...
@@ -39,7 +39,6 @@ class Button extends Widget
...
@@ -39,7 +39,6 @@ class Button extends Widget
*/
*/
public
$encodeLabel
=
true
;
public
$encodeLabel
=
true
;
/**
/**
* Initializes the widget.
* Initializes the widget.
* If you override this method, make sure you call the parent implementation first.
* If you override this method, make sure you call the parent implementation first.
...
...
ButtonDropdown.php
View file @
5cc2dc8d
...
@@ -59,7 +59,6 @@ class ButtonDropdown extends Widget
...
@@ -59,7 +59,6 @@ class ButtonDropdown extends Widget
*/
*/
public
$encodeLabel
=
true
;
public
$encodeLabel
=
true
;
/**
/**
* Renders the widget.
* Renders the widget.
*/
*/
...
@@ -100,6 +99,7 @@ class ButtonDropdown extends Widget
...
@@ -100,6 +99,7 @@ class ButtonDropdown extends Widget
$options
[
'data-toggle'
]
=
'dropdown'
;
$options
[
'data-toggle'
]
=
'dropdown'
;
$splitButton
=
''
;
$splitButton
=
''
;
}
}
return
Button
::
widget
([
return
Button
::
widget
([
'tagName'
=>
$this
->
tagName
,
'tagName'
=>
$this
->
tagName
,
'label'
=>
$label
,
'label'
=>
$label
,
...
@@ -118,6 +118,7 @@ class ButtonDropdown extends Widget
...
@@ -118,6 +118,7 @@ class ButtonDropdown extends Widget
$config
=
$this
->
dropdown
;
$config
=
$this
->
dropdown
;
$config
[
'clientOptions'
]
=
false
;
$config
[
'clientOptions'
]
=
false
;
$config
[
'view'
]
=
$this
->
getView
();
$config
[
'view'
]
=
$this
->
getView
();
return
Dropdown
::
widget
(
$config
);
return
Dropdown
::
widget
(
$config
);
}
}
}
}
ButtonGroup.php
View file @
5cc2dc8d
...
@@ -52,7 +52,6 @@ class ButtonGroup extends Widget
...
@@ -52,7 +52,6 @@ class ButtonGroup extends Widget
*/
*/
public
$encodeLabels
=
true
;
public
$encodeLabels
=
true
;
/**
/**
* Initializes the widget.
* Initializes the widget.
* If you override this method, make sure you call the parent implementation first.
* If you override this method, make sure you call the parent implementation first.
...
@@ -93,6 +92,7 @@ class ButtonGroup extends Widget
...
@@ -93,6 +92,7 @@ class ButtonGroup extends Widget
$buttons
[]
=
$button
;
$buttons
[]
=
$button
;
}
}
}
}
return
implode
(
"
\n
"
,
$buttons
);
return
implode
(
"
\n
"
,
$buttons
);
}
}
}
}
Carousel.php
View file @
5cc2dc8d
...
@@ -61,7 +61,6 @@ class Carousel extends Widget
...
@@ -61,7 +61,6 @@ class Carousel extends Widget
*/
*/
public
$items
=
[];
public
$items
=
[];
/**
/**
* Initializes the widget.
* Initializes the widget.
*/
*/
...
@@ -98,6 +97,7 @@ class Carousel extends Widget
...
@@ -98,6 +97,7 @@ class Carousel extends Widget
}
}
$indicators
[]
=
Html
::
tag
(
'li'
,
''
,
$options
);
$indicators
[]
=
Html
::
tag
(
'li'
,
''
,
$options
);
}
}
return
Html
::
tag
(
'ol'
,
implode
(
"
\n
"
,
$indicators
),
[
'class'
=>
'carousel-indicators'
]);
return
Html
::
tag
(
'ol'
,
implode
(
"
\n
"
,
$indicators
),
[
'class'
=>
'carousel-indicators'
]);
}
}
...
@@ -111,6 +111,7 @@ class Carousel extends Widget
...
@@ -111,6 +111,7 @@ class Carousel extends Widget
for
(
$i
=
0
,
$count
=
count
(
$this
->
items
);
$i
<
$count
;
$i
++
)
{
for
(
$i
=
0
,
$count
=
count
(
$this
->
items
);
$i
<
$count
;
$i
++
)
{
$items
[]
=
$this
->
renderItem
(
$this
->
items
[
$i
],
$i
);
$items
[]
=
$this
->
renderItem
(
$this
->
items
[
$i
],
$i
);
}
}
return
Html
::
tag
(
'div'
,
implode
(
"
\n
"
,
$items
),
[
'class'
=>
'carousel-inner'
]);
return
Html
::
tag
(
'div'
,
implode
(
"
\n
"
,
$items
),
[
'class'
=>
'carousel-inner'
]);
}
}
...
...
Collapse.php
View file @
5cc2dc8d
...
@@ -59,7 +59,6 @@ class Collapse extends Widget
...
@@ -59,7 +59,6 @@ class Collapse extends Widget
*/
*/
public
$items
=
[];
public
$items
=
[];
/**
/**
* Initializes the widget.
* Initializes the widget.
*/
*/
...
...
Dropdown.php
View file @
5cc2dc8d
Modal.php
View file @
5cc2dc8d
...
@@ -82,7 +82,6 @@ class Modal extends Widget
...
@@ -82,7 +82,6 @@ class Modal extends Widget
*/
*/
public
$toggleButton
;
public
$toggleButton
;
/**
/**
* Initializes the widget.
* Initializes the widget.
*/
*/
...
@@ -174,6 +173,7 @@ class Modal extends Widget
...
@@ -174,6 +173,7 @@ class Modal extends Widget
if
(
$tag
===
'button'
&&
!
isset
(
$this
->
toggleButton
[
'type'
]))
{
if
(
$tag
===
'button'
&&
!
isset
(
$this
->
toggleButton
[
'type'
]))
{
$this
->
toggleButton
[
'type'
]
=
'button'
;
$this
->
toggleButton
[
'type'
]
=
'button'
;
}
}
return
Html
::
tag
(
$tag
,
$label
,
$this
->
toggleButton
);
return
Html
::
tag
(
$tag
,
$label
,
$this
->
toggleButton
);
}
else
{
}
else
{
return
null
;
return
null
;
...
@@ -192,6 +192,7 @@ class Modal extends Widget
...
@@ -192,6 +192,7 @@ class Modal extends Widget
if
(
$tag
===
'button'
&&
!
isset
(
$this
->
closeButton
[
'type'
]))
{
if
(
$tag
===
'button'
&&
!
isset
(
$this
->
closeButton
[
'type'
]))
{
$this
->
closeButton
[
'type'
]
=
'button'
;
$this
->
closeButton
[
'type'
]
=
'button'
;
}
}
return
Html
::
tag
(
$tag
,
$label
,
$this
->
closeButton
);
return
Html
::
tag
(
$tag
,
$label
,
$this
->
closeButton
);
}
else
{
}
else
{
return
null
;
return
null
;
...
...
Nav.php
View file @
5cc2dc8d
...
@@ -89,7 +89,6 @@ class Nav extends Widget
...
@@ -89,7 +89,6 @@ class Nav extends Widget
*/
*/
public
$params
;
public
$params
;
/**
/**
* Initializes the widget.
* Initializes the widget.
*/
*/
...
@@ -208,8 +207,10 @@ class Nav extends Widget
...
@@ -208,8 +207,10 @@ class Nav extends Widget
}
}
}
}
}
}
return
true
;
return
true
;
}
}
return
false
;
return
false
;
}
}
}
}
NavBar.php
View file @
5cc2dc8d
...
@@ -149,6 +149,7 @@ class NavBar extends Widget
...
@@ -149,6 +149,7 @@ class NavBar extends Widget
{
{
$bar
=
Html
::
tag
(
'span'
,
''
,
[
'class'
=>
'icon-bar'
]);
$bar
=
Html
::
tag
(
'span'
,
''
,
[
'class'
=>
'icon-bar'
]);
$screenReader
=
"<span class=
\"
sr-only
\"
>
{
$this
->
screenReaderToggleText
}
</span>"
;
$screenReader
=
"<span class=
\"
sr-only
\"
>
{
$this
->
screenReaderToggleText
}
</span>"
;
return
Html
::
button
(
"
{
$screenReader
}
\n
{
$bar
}
\n
{
$bar
}
\n
{
$bar
}
"
,
[
return
Html
::
button
(
"
{
$screenReader
}
\n
{
$bar
}
\n
{
$bar
}
\n
{
$bar
}
"
,
[
'class'
=>
'navbar-toggle'
,
'class'
=>
'navbar-toggle'
,
'data-toggle'
=>
'collapse'
,
'data-toggle'
=>
'collapse'
,
...
...
Progress.php
View file @
5cc2dc8d
...
@@ -89,7 +89,6 @@ class Progress extends Widget
...
@@ -89,7 +89,6 @@ class Progress extends Widget
*/
*/
public
$bars
;
public
$bars
;
/**
/**
* Initializes the widget.
* Initializes the widget.
* If you override this method, make sure you call the parent implementation first.
* If you override this method, make sure you call the parent implementation first.
...
@@ -130,6 +129,7 @@ class Progress extends Widget
...
@@ -130,6 +129,7 @@ class Progress extends Widget
$options
=
ArrayHelper
::
getValue
(
$bar
,
'options'
,
[]);
$options
=
ArrayHelper
::
getValue
(
$bar
,
'options'
,
[]);
$bars
[]
=
$this
->
renderBar
(
$bar
[
'percent'
],
$label
,
$options
);
$bars
[]
=
$this
->
renderBar
(
$bar
[
'percent'
],
$label
,
$options
);
}
}
return
implode
(
"
\n
"
,
$bars
);
return
implode
(
"
\n
"
,
$bars
);
}
}
...
@@ -158,6 +158,7 @@ class Progress extends Widget
...
@@ -158,6 +158,7 @@ class Progress extends Widget
'class'
=>
'sr-only'
'class'
=>
'sr-only'
]);
]);
$out
.=
Html
::
endTag
(
'div'
);
$out
.=
Html
::
endTag
(
'div'
);
return
$out
;
return
$out
;
}
}
}
}
Tabs.php
View file @
5cc2dc8d
...
@@ -100,7 +100,6 @@ class Tabs extends Widget
...
@@ -100,7 +100,6 @@ class Tabs extends Widget
*/
*/
public
$navType
=
'nav-tabs'
;
public
$navType
=
'nav-tabs'
;
/**
/**
* Initializes the widget.
* Initializes the widget.
*/
*/
...
@@ -186,6 +185,7 @@ class Tabs extends Widget
...
@@ -186,6 +185,7 @@ class Tabs extends Widget
return
true
;
return
true
;
}
}
}
}
return
false
;
return
false
;
}
}
...
@@ -226,6 +226,7 @@ class Tabs extends Widget
...
@@ -226,6 +226,7 @@ class Tabs extends Widget
unset
(
$item
);
unset
(
$item
);
}
}
return
$itemActive
;
return
$itemActive
;
}
}
}
}
Widget.php
View file @
5cc2dc8d
...
@@ -39,7 +39,6 @@ class Widget extends \yii\base\Widget
...
@@ -39,7 +39,6 @@ class Widget extends \yii\base\Widget
*/
*/
public
$clientEvents
=
[];
public
$clientEvents
=
[];
/**
/**
* Initializes the widget.
* Initializes the widget.
* This method will register the bootstrap asset bundle. If you override this method,
* This method will register the bootstrap asset bundle. If you override this method,
...
...
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