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
4207021e
Commit
4207021e
authored
Nov 26, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #6150: `yii\bootstrap\Tabs` dropdown IDs were generated incorrectly
parent
87b63743
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
CHANGELOG.md
CHANGELOG.md
+1
-0
Tabs.php
Tabs.php
+4
-3
No files found.
CHANGELOG.md
View file @
4207021e
...
@@ -5,6 +5,7 @@ Yii Framework 2 bootstrap extension Change Log
...
@@ -5,6 +5,7 @@ Yii Framework 2 bootstrap extension Change Log
-----------------------
-----------------------
-
Bug #5570:
`yii\bootstrap\Tabs`
would throw an exception if
`content`
is not set for one of its
`items`
(RomeroMsk)
-
Bug #5570:
`yii\bootstrap\Tabs`
would throw an exception if
`content`
is not set for one of its
`items`
(RomeroMsk)
-
Bug #6150:
`yii\bootstrap\Tabs`
dropdown IDs were generated incorrectly (samdark)
-
Enh #4181: Added
`yii\bootstrap\Modal::$headerOptions`
and
`yii\bootstrap\Modal::$footerOptions`
(tuxoff, samdark)
-
Enh #4181: Added
`yii\bootstrap\Modal::$headerOptions`
and
`yii\bootstrap\Modal::$footerOptions`
(tuxoff, samdark)
-
Enh #4450: Added
`yii\bootstrap\Nav::renderDropdown()`
(qiangxue)
-
Enh #4450: Added
`yii\bootstrap\Nav::renderDropdown()`
(qiangxue)
-
Enh #5735: Added
`yii\bootstrap\Tabs::renderTabContent`
to support manually rendering tab contents (RomeroMsk)
-
Enh #5735: Added
`yii\bootstrap\Tabs::renderTabContent`
to support manually rendering tab contents (RomeroMsk)
...
...
Tabs.php
View file @
4207021e
...
@@ -154,7 +154,7 @@ class Tabs extends Widget
...
@@ -154,7 +154,7 @@ class Tabs extends Widget
$label
.=
' <b class="caret"></b>'
;
$label
.=
' <b class="caret"></b>'
;
Html
::
addCssClass
(
$headerOptions
,
'dropdown'
);
Html
::
addCssClass
(
$headerOptions
,
'dropdown'
);
if
(
$this
->
renderDropdown
(
$item
[
'items'
],
$panes
))
{
if
(
$this
->
renderDropdown
(
$
n
,
$
item
[
'items'
],
$panes
))
{
Html
::
addCssClass
(
$headerOptions
,
'active'
);
Html
::
addCssClass
(
$headerOptions
,
'active'
);
}
}
...
@@ -202,12 +202,13 @@ class Tabs extends Widget
...
@@ -202,12 +202,13 @@ class Tabs extends Widget
/**
/**
* Normalizes dropdown item options by removing tab specific keys `content` and `contentOptions`, and also
* Normalizes dropdown item options by removing tab specific keys `content` and `contentOptions`, and also
* configure `panes` accordingly.
* configure `panes` accordingly.
* @param string $itemNumber number of the item
* @param array $items the dropdown items configuration.
* @param array $items the dropdown items configuration.
* @param array $panes the panes reference array.
* @param array $panes the panes reference array.
* @return boolean whether any of the dropdown items is `active` or not.
* @return boolean whether any of the dropdown items is `active` or not.
* @throws InvalidConfigException
* @throws InvalidConfigException
*/
*/
protected
function
renderDropdown
(
&
$items
,
&
$panes
)
protected
function
renderDropdown
(
$itemNumber
,
&
$items
,
&
$panes
)
{
{
$itemActive
=
false
;
$itemActive
=
false
;
...
@@ -228,7 +229,7 @@ class Tabs extends Widget
...
@@ -228,7 +229,7 @@ class Tabs extends Widget
$itemActive
=
true
;
$itemActive
=
true
;
}
}
$options
[
'id'
]
=
ArrayHelper
::
getValue
(
$options
,
'id'
,
$this
->
options
[
'id'
]
.
'-dd-tab'
.
$n
);
$options
[
'id'
]
=
ArrayHelper
::
getValue
(
$options
,
'id'
,
$this
->
options
[
'id'
]
.
'-dd
'
.
$itemNumber
.
'
-tab'
.
$n
);
$item
[
'url'
]
=
'#'
.
$options
[
'id'
];
$item
[
'url'
]
=
'#'
.
$options
[
'id'
];
$item
[
'linkOptions'
][
'data-toggle'
]
=
'tab'
;
$item
[
'linkOptions'
][
'data-toggle'
]
=
'tab'
;
...
...
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