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
12484837
Commit
12484837
authored
Jul 24, 2016
by
PowerGamer1
Committed by
Alexander Makarov
Jul 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #143: Fixed `yii\bootstrap\Nav` to use tags according to bootstrap docs
parent
c8969668
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
CHANGELOG.md
CHANGELOG.md
+1
-0
Nav.php
Nav.php
+2
-2
NavTest.php
tests/NavTest.php
+3
-3
No files found.
CHANGELOG.md
View file @
12484837
...
@@ -9,6 +9,7 @@ Yii Framework 2 bootstrap extension Change Log
...
@@ -9,6 +9,7 @@ Yii Framework 2 bootstrap extension Change Log
-
Bug #130: Fixed
`yii\bootstrap\Collapse`
to use pure numerical value on
`content`
property (meysampg)
-
Bug #130: Fixed
`yii\bootstrap\Collapse`
to use pure numerical value on
`content`
property (meysampg)
-
Bug #137: Remove
`role="navbar"`
from
`yii\bootstrap\NavBar`
according to new aria specification (tino415)
-
Bug #137: Remove
`role="navbar"`
from
`yii\bootstrap\NavBar`
according to new aria specification (tino415)
-
Enh #113: Allow URLs instead of content for Tab Widget Dropdown items (Okeanos)
-
Enh #113: Allow URLs instead of content for Tab Widget Dropdown items (Okeanos)
-
Bug #143: Fixed
`yii\bootstrap\Nav`
to use tags according to bootstrap docs (PowerGamer1)
2.
0.6 March 17, 2016
2.
0.6 March 17, 2016
--------------------
--------------------
...
...
Nav.php
View file @
12484837
...
@@ -102,7 +102,7 @@ class Nav extends Widget
...
@@ -102,7 +102,7 @@ class Nav extends Widget
/**
/**
* @var string this property allows you to customize the HTML which is used to generate the drop down caret symbol,
* @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.
* 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.
* Defaults to `null` which means `<
span class="caret"></span
>` will be used. To disable the caret, set this property to be an empty string.
*/
*/
public
$dropDownCaret
;
public
$dropDownCaret
;
/**
/**
...
@@ -125,7 +125,7 @@ class Nav extends Widget
...
@@ -125,7 +125,7 @@ class Nav extends Widget
$this
->
params
=
Yii
::
$app
->
request
->
getQueryParams
();
$this
->
params
=
Yii
::
$app
->
request
->
getQueryParams
();
}
}
if
(
$this
->
dropDownCaret
===
null
)
{
if
(
$this
->
dropDownCaret
===
null
)
{
$this
->
dropDownCaret
=
Html
::
tag
(
'b'
,
''
,
[
'class'
=>
'caret'
])
;
$this
->
dropDownCaret
=
'<span class="caret"></span>'
;
}
}
Html
::
addCssClass
(
$this
->
options
,
[
'widget'
=>
'nav'
]);
Html
::
addCssClass
(
$this
->
options
,
[
'widget'
=>
'nav'
]);
}
}
...
...
tests/NavTest.php
View file @
12484837
...
@@ -41,7 +41,7 @@ class NavTest extends TestCase
...
@@ -41,7 +41,7 @@ class NavTest extends TestCase
$expected
=
<<<EXPECTED
$expected
=
<<<EXPECTED
<ul id="w0" class="nav"><li><a href="#">Page1</a></li>
<ul id="w0" class="nav"><li><a href="#">Page1</a></li>
<li class="dropdown"><a class="dropdown-toggle" href="#" data-toggle="dropdown">Dropdown1 <
b class="caret"></b
></a><ul id="w1" class="dropdown-menu"><li class="dropdown-header">Page2</li>
<li class="dropdown"><a class="dropdown-toggle" href="#" data-toggle="dropdown">Dropdown1 <
span class="caret"></span
></a><ul id="w1" class="dropdown-menu"><li class="dropdown-header">Page2</li>
<li class="dropdown-header">Page3</li></ul></li></ul>
<li class="dropdown-header">Page3</li></ul></li></ul>
EXPECTED;
EXPECTED;
...
@@ -80,7 +80,7 @@ EXPECTED;
...
@@ -80,7 +80,7 @@ EXPECTED;
$expected
=
<<<EXPECTED
$expected
=
<<<EXPECTED
<ul id="w0" class="nav"><li><a href="#">Page1</a></li>
<ul id="w0" class="nav"><li><a href="#">Page1</a></li>
<li class="dropdown"><a class="dropdown-toggle" href="#" data-toggle="dropdown">Dropdown1 <
b class="caret"></b
></a><ul id="test1" class="test dropdown-menu" data-id="t1"><li class="dropdown-header">Page2</li>
<li class="dropdown"><a class="dropdown-toggle" href="#" data-toggle="dropdown">Dropdown1 <
span class="caret"></span
></a><ul id="test1" class="test dropdown-menu" data-id="t1"><li class="dropdown-header">Page2</li>
<li class="dropdown-header">Page3</li></ul></li></ul>
<li class="dropdown-header">Page3</li></ul></li></ul>
EXPECTED;
EXPECTED;
...
@@ -112,7 +112,7 @@ EXPECTED;
...
@@ -112,7 +112,7 @@ EXPECTED;
$expected
=
<<<EXPECTED
$expected
=
<<<EXPECTED
<ul id="w0" class="nav"><li><a href="#">Page1</a></li>
<ul id="w0" class="nav"><li><a href="#">Page1</a></li>
<li class="dropdown"><a class="dropdown-toggle" href="#" data-toggle="dropdown">Dropdown1 <
b class="caret"></b
></a><ul id="w1" class="dropdown-menu"><li class="dropdown-header">Page2</li>
<li class="dropdown"><a class="dropdown-toggle" href="#" data-toggle="dropdown">Dropdown1 <
span class="caret"></span
></a><ul id="w1" class="dropdown-menu"><li class="dropdown-header">Page2</li>
<li class="dropdown-header">Page3</li></ul></li>
<li class="dropdown-header">Page3</li></ul></li>
<li><a href="#">Page4</a></li></ul>
<li><a href="#">Page4</a></li></ul>
EXPECTED;
EXPECTED;
...
...
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