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
5e10e283
Commit
5e10e283
authored
Jul 19, 2014
by
Serge Postrash
Committed by
Alexander Makarov
Jul 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #4362: Made carousel indicators optional
parent
1b86f9f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
CHANGELOG.md
CHANGELOG.md
+1
-0
Carousel.php
Carousel.php
+8
-0
No files found.
CHANGELOG.md
View file @
5e10e283
...
...
@@ -10,6 +10,7 @@ Yii Framework 2 bootstrap extension Change Log
-
Enh #4024: Added ability to
`yii\bootstrap\Tabs`
to encode each
`Tabs::items['label']`
separately (creocoder, umneeq)
-
Chg #3036: Upgraded Twitter Bootstrap to 3.1.x (qiangxue)
-
Enh #4120: Added ability for each item to choose it's encoding option in
`Dropdown`
and
`Nav`
(Alex-Code)
-
Enh #4363: Added
`showIndicators`
property to make Carousel indicators optional (sdkiller)
2.
0.0-beta April 13, 2014
-------------------------
...
...
Carousel.php
View file @
5e10e283
...
...
@@ -44,6 +44,11 @@ class Carousel extends Widget
* If false, it means the previous and the next control buttons should not be displayed.
*/
public
$controls
=
[
'‹'
,
'›'
];
/**
* @var boolean
* If false carousel indicators (<ol> tag with anchors to items) should not be displayed.
*/
public
$showIndicators
=
true
;
/**
* @var array list of slides in the carousel. Each array element represents a single
* slide with the following structure:
...
...
@@ -89,6 +94,9 @@ class Carousel extends Widget
*/
public
function
renderIndicators
()
{
if
(
$this
->
showIndicators
===
false
)
{
return
''
;
}
$indicators
=
[];
for
(
$i
=
0
,
$count
=
count
(
$this
->
items
);
$i
<
$count
;
$i
++
)
{
$options
=
[
'data-target'
=>
'#'
.
$this
->
options
[
'id'
],
'data-slide-to'
=>
$i
];
...
...
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