Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
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
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
PSDI Army
yii2
Commits
e1b145a7
Commit
e1b145a7
authored
May 28, 2013
by
Antonio Ramirez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enhance Dropdown to use items as strings. Remove string=divider rule
parent
af5dbba6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
Dropdown.php
framework/yii/bootstrap/Dropdown.php
+2
-6
No files found.
framework/yii/bootstrap/Dropdown.php
View file @
e1b145a7
...
@@ -40,11 +40,7 @@ class Dropdown extends Widget
...
@@ -40,11 +40,7 @@ class Dropdown extends Widget
* 'items'=> array(...)
* 'items'=> array(...)
* )
* )
* ```
* ```
* If you wish to display a `divider`, use any string. The widget will render a bootstrap dropdown divider:
* Additionally, you can also configure a dropdown item as string.
*
* ```html
* <li class="divider"></li>
* ```
*/
*/
public
$items
=
array
();
public
$items
=
array
();
...
@@ -80,7 +76,7 @@ class Dropdown extends Widget
...
@@ -80,7 +76,7 @@ class Dropdown extends Widget
$contents
=
array
();
$contents
=
array
();
foreach
(
$this
->
items
as
$item
)
{
foreach
(
$this
->
items
as
$item
)
{
if
(
is_string
(
$item
))
{
if
(
is_string
(
$item
))
{
$contents
[]
=
Html
::
tag
(
'li'
,
''
,
array
(
'class'
=>
'divider'
))
;
$contents
[]
=
$item
;
continue
;
continue
;
}
}
if
(
!
isset
(
$item
[
'label'
]))
{
if
(
!
isset
(
$item
[
'label'
]))
{
...
...
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