Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
Yii Bootstrap 3
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Common
Yii Bootstrap 3
Commits
f9d87e82
Commit
f9d87e82
authored
Dec 24, 2011
by
Crisu83
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for displaying and hiding BootMenu dropdowns.
parent
ab68bfb3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
BootInput.php
widgets/BootInput.php
+1
-1
BootMenu.php
widgets/BootMenu.php
+15
-0
No files found.
widgets/BootInput.php
View file @
f9d87e82
...
...
@@ -186,7 +186,7 @@ class BootInput extends CInputWidget
protected
function
captcha
()
{
echo
$this
->
getLabel
()
.
'<div class="input"><div class="captcha">'
;
echo
'<div class="widget">'
.
$this
->
widget
(
'CCaptcha'
,
array
(),
true
)
.
'</div>'
;
echo
'<div class="widget">'
.
$this
->
widget
(
'CCaptcha'
,
array
(
'showRefreshButton'
=>
false
),
true
)
.
'</div>'
;
echo
$this
->
form
->
textField
(
$this
->
model
,
$this
->
attribute
,
$this
->
htmlOptions
);
echo
$this
->
getError
()
.
$this
->
getHint
();
echo
'</div></div>'
;
...
...
widgets/BootMenu.php
View file @
f9d87e82
...
...
@@ -33,6 +33,21 @@ class BootMenu extends CMenu
parent
::
init
();
}
/**
* Runs the menu widget.
*/
public
function
run
()
{
parent
::
run
();
$id
=
$this
->
getId
();
Yii
::
app
()
->
clientScript
->
registerScript
(
__CLASS__
.
'#'
.
$id
,
"
jQuery('#
{
$id
}
.dropdown-toggle').bind('click', function() {
$(this).parent().toggleClass('open');
});
"
);
}
/**
* Normalizes the items so that the 'active' state is properly identified for every menu item.
* @param array $items the items to be normalized.
...
...
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