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
5dfc3ac6
Commit
5dfc3ac6
authored
Mar 28, 2015
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow customization of the dropdown caret
This can be useful when another iconset is used for example.
parent
90e3df6d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
CHANGELOG.md
CHANGELOG.md
+1
-0
Nav.php
Nav.php
+12
-1
No files found.
CHANGELOG.md
View file @
5dfc3ac6
...
@@ -6,6 +6,7 @@ Yii Framework 2 bootstrap extension Change Log
...
@@ -6,6 +6,7 @@ Yii Framework 2 bootstrap extension Change Log
-
Bug #5984:
`yii\bootstrap\Activefield::checkbox()`
caused browser to link label to the wrong input (cebe)
-
Bug #5984:
`yii\bootstrap\Activefield::checkbox()`
caused browser to link label to the wrong input (cebe)
-
Enh #7633: Added
`ActionColumn::$buttonOptions`
for defining HTML options to be added to the default buttons (cebe)
-
Enh #7633: Added
`ActionColumn::$buttonOptions`
for defining HTML options to be added to the default buttons (cebe)
-
Enh: Added
`Nav::$dropDownCaret`
to allow customization of the dropdown caret symbol (cebe)
2.0.3 March 01, 2015
2.0.3 March 01, 2015
...
...
Nav.php
View file @
5dfc3ac6
...
@@ -93,6 +93,12 @@ class Nav extends Widget
...
@@ -93,6 +93,12 @@ class Nav extends Widget
* @see isItemActive
* @see isItemActive
*/
*/
public
$params
;
public
$params
;
/**
* @var string this property allows you to customize the HTML which is used to generate the drop down caret symbol,
* which is displayed next to the button text to indicate the drop down functionality.
* Defaults to `null` which means `<b class="caret"></b>` will be used. To disable the caret, set this property to be an empty string.
*/
public
$dropDownCaret
;
/**
/**
...
@@ -107,6 +113,9 @@ class Nav extends Widget
...
@@ -107,6 +113,9 @@ class Nav extends Widget
if
(
$this
->
params
===
null
)
{
if
(
$this
->
params
===
null
)
{
$this
->
params
=
Yii
::
$app
->
request
->
getQueryParams
();
$this
->
params
=
Yii
::
$app
->
request
->
getQueryParams
();
}
}
if
(
$this
->
dropDownCaret
===
null
)
{
$this
->
dropDownCaret
=
Html
::
tag
(
'b'
,
''
,
[
'class'
=>
'caret'
]);
}
Html
::
addCssClass
(
$this
->
options
,
'nav'
);
Html
::
addCssClass
(
$this
->
options
,
'nav'
);
}
}
...
@@ -166,7 +175,9 @@ class Nav extends Widget
...
@@ -166,7 +175,9 @@ class Nav extends Widget
$linkOptions
[
'data-toggle'
]
=
'dropdown'
;
$linkOptions
[
'data-toggle'
]
=
'dropdown'
;
Html
::
addCssClass
(
$options
,
'dropdown'
);
Html
::
addCssClass
(
$options
,
'dropdown'
);
Html
::
addCssClass
(
$linkOptions
,
'dropdown-toggle'
);
Html
::
addCssClass
(
$linkOptions
,
'dropdown-toggle'
);
$label
.=
' '
.
Html
::
tag
(
'b'
,
''
,
[
'class'
=>
'caret'
]);
if
(
$this
->
dropDownCaret
!==
''
)
{
$label
.=
' '
.
$this
->
dropDownCaret
;
}
if
(
is_array
(
$items
))
{
if
(
is_array
(
$items
))
{
if
(
$this
->
activateItems
)
{
if
(
$this
->
activateItems
)
{
$items
=
$this
->
isChildActive
(
$items
,
$active
);
$items
=
$this
->
isChildActive
(
$items
,
$active
);
...
...
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