Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
bootstrap
Commits
a7b49a7d
Commit
a7b49a7d
authored
May 17, 2012
by
Jacob Thornton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nearly everything working with activedescendant... then decide it's wrong.
parent
10c6db4b
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
361 additions
and
169 deletions
+361
-169
docs/assets/css/bootstrap.css
docs/assets/css/bootstrap.css
+18
-3
docs/assets/js/bootstrap-dropdown.js
docs/assets/js/bootstrap-dropdown.js
+70
-14
docs/assets/js/bootstrap.js
docs/assets/js/bootstrap.js
+70
-14
docs/assets/js/bootstrap.min.js
docs/assets/js/bootstrap.min.js
+1
-1
docs/javascript.html
docs/javascript.html
+57
-60
docs/templates/pages/javascript.mustache
docs/templates/pages/javascript.mustache
+57
-60
js/.jshintrc
js/.jshintrc
+1
-0
js/bootstrap-dropdown.js
js/bootstrap-dropdown.js
+70
-14
less/dropdowns.less
less/dropdowns.less
+13
-2
less/navbar.less
less/navbar.less
+4
-1
No files found.
docs/assets/css/bootstrap.css
View file @
a7b49a7d
...
...
@@ -2355,12 +2355,17 @@ table .span24 {
margin-left
:
2px
;
}
.dropdown
:hover
.caret
,
.dropdown
a
:focus
.caret
,
.dropdown
a
:hover
.caret
,
.open
.caret
{
opacity
:
1
;
filter
:
alpha
(
opacity
=
100
);
}
.navbar
.nav
.open
>
a
{
color
:
#ffffff
;
}
.dropdown-menu
{
position
:
absolute
;
top
:
100%
;
...
...
@@ -2415,12 +2420,19 @@ table .span24 {
.dropdown-menu
li
>
a
:hover
,
.dropdown-menu
.active
>
a
,
.dropdown-menu
.active
>
a
:hover
{
.dropdown-menu
.active
>
a
:hover
,
.dropdown-menu
:hover
#aria-active
>
a
:hover
,
.dropdown-menu
#aria-active
>
a
{
color
:
#ffffff
;
text-decoration
:
none
;
background-color
:
#0088cc
;
}
.dropdown-menu
:hover
#aria-active
>
a
{
color
:
#333333
;
background-color
:
#ffffff
;
}
.open
{
*
z-index
:
1000
;
}
...
...
@@ -3779,6 +3791,7 @@ input[type="submit"].btn.btn-mini {
margin
:
0
;
}
.navbar
.nav
>
li
>
a
:focus
,
.navbar
.nav
>
li
>
a
:hover
{
color
:
#ffffff
;
text-decoration
:
none
;
...
...
@@ -3786,7 +3799,8 @@ input[type="submit"].btn.btn-mini {
}
.navbar
.nav
.active
>
a
,
.navbar
.nav
.active
>
a
:hover
{
.navbar
.nav
.active
>
a
:hover
,
.navbar
.nav
.active
>
a
:focus
{
color
:
#ffffff
;
text-decoration
:
none
;
background-color
:
#222222
;
...
...
@@ -3916,6 +3930,7 @@ input[type="submit"].btn.btn-mini {
background-color
:
transparent
;
}
.navbar
.nav
li
.dropdown.active
>
.dropdown-toggle
:focus
,
.navbar
.nav
li
.dropdown.active
>
.dropdown-toggle
:hover
{
color
:
#ffffff
;
}
...
...
docs/assets/js/bootstrap-dropdown.js
View file @
a7b49a7d
...
...
@@ -27,6 +27,7 @@
* ========================= */
var
toggle
=
'
[data-toggle="dropdown"]
'
,
active
=
'
aria-active
'
,
Dropdown
=
function
(
element
)
{
var
$el
=
$
(
element
).
on
(
'
click.dropdown.data-api
'
,
this
.
toggle
)
$
(
'
html
'
).
on
(
'
click.dropdown.data-api
'
,
function
()
{
...
...
@@ -41,34 +42,87 @@
,
toggle
:
function
(
e
)
{
var
$this
=
$
(
this
)
,
$parent
,
selector
,
isActive
if
(
$this
.
is
(
'
.disabled, :disabled
'
))
return
selector
=
$this
.
attr
(
'
data-target
'
)
if
(
!
selector
)
{
selector
=
$this
.
attr
(
'
href
'
)
selector
=
selector
&&
selector
.
replace
(
/.*
(?=
#
[^\s]
*$
)
/
,
''
)
//strip for ie7
}
$parent
=
$
(
selector
)
$parent
.
length
||
(
$parent
=
$this
.
parent
())
$parent
=
getParent
(
$this
)
isActive
=
$parent
.
hasClass
(
'
open
'
)
clearMenus
()
if
(
!
isActive
)
$parent
.
toggleClass
(
'
open
'
)
if
(
!
isActive
)
{
$parent
.
toggleClass
(
'
open
'
)
$this
.
focus
()
}
return
false
}
,
keydown
:
function
(
e
)
{
var
$this
=
$
(
this
)
,
$items
,
$active
,
$parent
,
index
if
(
e
.
keyCode
==
27
)
return
$this
.
click
()
if
(
!
/
(
38|40|13
)
/
.
test
(
e
.
keyCode
))
return
e
.
preventDefault
()
e
.
stopPropagation
()
if
(
$this
.
is
(
'
.disabled, :disabled
'
))
return
$parent
=
getParent
(
$this
)
$parent
.
hasClass
(
'
open
'
)
||
$this
.
click
()
$items
=
$
(
'
[role=menu] li:not(.divider)
'
,
$parent
)
if
(
!
$items
.
length
)
return
index
=
$items
.
index
(
$items
.
filter
(
'
#
'
+
active
))
$items
.
eq
(
index
)
.
attr
(
'
id
'
,
''
)
if
(
e
.
keyCode
==
38
&&
index
>
0
)
index
--
// up
else
if
(
e
.
keyCode
==
40
&&
index
<
$items
.
length
-
1
)
index
++
// down
else
if
(
e
.
keyCode
==
13
&&
~
index
)
return
$items
.
eq
(
index
).
find
(
'
a
'
).
click
()
// enter
if
(
!~
index
)
index
=
0
$items
.
eq
(
index
)
.
attr
(
'
id
'
,
active
)
}
}
function
clearMenus
()
{
$
(
toggle
).
parent
().
removeClass
(
'
open
'
)
getParent
(
$
(
toggle
))
.
removeClass
(
'
open
'
)
.
find
(
'
#
'
+
active
)
.
attr
(
'
id
'
,
''
)
}
function
getParent
(
$this
)
{
var
selector
=
$this
.
attr
(
'
data-target
'
)
,
$parent
if
(
!
selector
)
{
selector
=
$this
.
attr
(
'
href
'
)
selector
=
selector
&&
selector
.
replace
(
/.*
(?=
#
[^\s]
*$
)
/
,
''
)
//strip for ie7
}
$parent
=
$
(
selector
)
$parent
.
length
||
(
$parent
=
$this
.
parent
())
return
$parent
}
...
...
@@ -91,10 +145,12 @@
* =================================== */
$
(
function
()
{
$
(
'
html
'
).
on
(
'
click.dropdown.data-api
'
,
clearMenus
)
$
(
'
html
'
)
.
on
(
'
click.dropdown.data-api
'
,
clearMenus
)
$
(
'
body
'
)
.
on
(
'
click.dropdown
'
,
'
.dropdown form
'
,
function
(
e
)
{
e
.
stopPropagation
()
})
.
on
(
'
click.dropdown.data-api
'
,
toggle
,
Dropdown
.
prototype
.
toggle
)
.
on
(
'
click.dropdown.data-api
'
,
toggle
,
Dropdown
.
prototype
.
toggle
)
.
on
(
'
keydown.dropdown.data-api
'
,
toggle
,
Dropdown
.
prototype
.
keydown
)
})
}(
window
.
jQuery
);
\ No newline at end of file
docs/assets/js/bootstrap.js
View file @
a7b49a7d
...
...
@@ -595,6 +595,7 @@
* ========================= */
var
toggle
=
'
[data-toggle="dropdown"]
'
,
active
=
'
aria-active
'
,
Dropdown
=
function
(
element
)
{
var
$el
=
$
(
element
).
on
(
'
click.dropdown.data-api
'
,
this
.
toggle
)
$
(
'
html
'
).
on
(
'
click.dropdown.data-api
'
,
function
()
{
...
...
@@ -609,34 +610,87 @@
,
toggle
:
function
(
e
)
{
var
$this
=
$
(
this
)
,
$parent
,
selector
,
isActive
if
(
$this
.
is
(
'
.disabled, :disabled
'
))
return
selector
=
$this
.
attr
(
'
data-target
'
)
if
(
!
selector
)
{
selector
=
$this
.
attr
(
'
href
'
)
selector
=
selector
&&
selector
.
replace
(
/.*
(?=
#
[^\s]
*$
)
/
,
''
)
//strip for ie7
}
$parent
=
$
(
selector
)
$parent
.
length
||
(
$parent
=
$this
.
parent
())
$parent
=
getParent
(
$this
)
isActive
=
$parent
.
hasClass
(
'
open
'
)
clearMenus
()
if
(
!
isActive
)
$parent
.
toggleClass
(
'
open
'
)
if
(
!
isActive
)
{
$parent
.
toggleClass
(
'
open
'
)
$this
.
focus
()
}
return
false
}
,
keydown
:
function
(
e
)
{
var
$this
=
$
(
this
)
,
$items
,
$active
,
$parent
,
index
if
(
e
.
keyCode
==
27
)
return
$this
.
click
()
if
(
!
/
(
38|40|13
)
/
.
test
(
e
.
keyCode
))
return
e
.
preventDefault
()
e
.
stopPropagation
()
if
(
$this
.
is
(
'
.disabled, :disabled
'
))
return
$parent
=
getParent
(
$this
)
$parent
.
hasClass
(
'
open
'
)
||
$this
.
click
()
$items
=
$
(
'
[role=menu] li:not(.divider)
'
,
$parent
)
if
(
!
$items
.
length
)
return
index
=
$items
.
index
(
$items
.
filter
(
'
#
'
+
active
))
$items
.
eq
(
index
)
.
attr
(
'
id
'
,
''
)
if
(
e
.
keyCode
==
38
&&
index
>
0
)
index
--
// up
else
if
(
e
.
keyCode
==
40
&&
index
<
$items
.
length
-
1
)
index
++
// down
else
if
(
e
.
keyCode
==
13
&&
~
index
)
return
$items
.
eq
(
index
).
find
(
'
a
'
).
click
()
// enter
if
(
!~
index
)
index
=
0
$items
.
eq
(
index
)
.
attr
(
'
id
'
,
active
)
}
}
function
clearMenus
()
{
$
(
toggle
).
parent
().
removeClass
(
'
open
'
)
getParent
(
$
(
toggle
))
.
removeClass
(
'
open
'
)
.
find
(
'
#
'
+
active
)
.
attr
(
'
id
'
,
''
)
}
function
getParent
(
$this
)
{
var
selector
=
$this
.
attr
(
'
data-target
'
)
,
$parent
if
(
!
selector
)
{
selector
=
$this
.
attr
(
'
href
'
)
selector
=
selector
&&
selector
.
replace
(
/.*
(?=
#
[^\s]
*$
)
/
,
''
)
//strip for ie7
}
$parent
=
$
(
selector
)
$parent
.
length
||
(
$parent
=
$this
.
parent
())
return
$parent
}
...
...
@@ -659,10 +713,12 @@
* =================================== */
$
(
function
()
{
$
(
'
html
'
).
on
(
'
click.dropdown.data-api
'
,
clearMenus
)
$
(
'
html
'
)
.
on
(
'
click.dropdown.data-api
'
,
clearMenus
)
$
(
'
body
'
)
.
on
(
'
click.dropdown
'
,
'
.dropdown form
'
,
function
(
e
)
{
e
.
stopPropagation
()
})
.
on
(
'
click.dropdown.data-api
'
,
toggle
,
Dropdown
.
prototype
.
toggle
)
.
on
(
'
click.dropdown.data-api
'
,
toggle
,
Dropdown
.
prototype
.
toggle
)
.
on
(
'
keydown.dropdown.data-api
'
,
toggle
,
Dropdown
.
prototype
.
keydown
)
})
}(
window
.
jQuery
);
/* =========================================================
...
...
docs/assets/js/bootstrap.min.js
View file @
a7b49a7d
This diff is collapsed.
Click to expand it.
docs/javascript.html
View file @
a7b49a7d
This diff is collapsed.
Click to expand it.
docs/templates/pages/javascript.mustache
View file @
a7b49a7d
This diff is collapsed.
Click to expand it.
js/.jshintrc
View file @
a7b49a7d
...
...
@@ -4,6 +4,7 @@
"laxbreak" : true,
"browser" : true,
"debug" : true,
"devel" : true,
"boss" : true,
"expr" : true,
"asi" : true
...
...
js/bootstrap-dropdown.js
View file @
a7b49a7d
...
...
@@ -27,6 +27,7 @@
* ========================= */
var
toggle
=
'
[data-toggle="dropdown"]
'
,
active
=
'
aria-active
'
,
Dropdown
=
function
(
element
)
{
var
$el
=
$
(
element
).
on
(
'
click.dropdown.data-api
'
,
this
.
toggle
)
$
(
'
html
'
).
on
(
'
click.dropdown.data-api
'
,
function
()
{
...
...
@@ -41,34 +42,87 @@
,
toggle
:
function
(
e
)
{
var
$this
=
$
(
this
)
,
$parent
,
selector
,
isActive
if
(
$this
.
is
(
'
.disabled, :disabled
'
))
return
selector
=
$this
.
attr
(
'
data-target
'
)
if
(
!
selector
)
{
selector
=
$this
.
attr
(
'
href
'
)
selector
=
selector
&&
selector
.
replace
(
/.*
(?=
#
[^\s]
*$
)
/
,
''
)
//strip for ie7
}
$parent
=
$
(
selector
)
$parent
.
length
||
(
$parent
=
$this
.
parent
())
$parent
=
getParent
(
$this
)
isActive
=
$parent
.
hasClass
(
'
open
'
)
clearMenus
()
if
(
!
isActive
)
$parent
.
toggleClass
(
'
open
'
)
if
(
!
isActive
)
{
$parent
.
toggleClass
(
'
open
'
)
$this
.
focus
()
}
return
false
}
,
keydown
:
function
(
e
)
{
var
$this
=
$
(
this
)
,
$items
,
$active
,
$parent
,
index
if
(
e
.
keyCode
==
27
)
return
$this
.
click
()
if
(
!
/
(
38|40|13
)
/
.
test
(
e
.
keyCode
))
return
e
.
preventDefault
()
e
.
stopPropagation
()
if
(
$this
.
is
(
'
.disabled, :disabled
'
))
return
$parent
=
getParent
(
$this
)
$parent
.
hasClass
(
'
open
'
)
||
$this
.
click
()
$items
=
$
(
'
[role=menu] li:not(.divider)
'
,
$parent
)
if
(
!
$items
.
length
)
return
index
=
$items
.
index
(
$items
.
filter
(
'
#
'
+
active
))
$items
.
eq
(
index
)
.
attr
(
'
id
'
,
''
)
if
(
e
.
keyCode
==
38
&&
index
>
0
)
index
--
// up
else
if
(
e
.
keyCode
==
40
&&
index
<
$items
.
length
-
1
)
index
++
// down
else
if
(
e
.
keyCode
==
13
&&
~
index
)
return
$items
.
eq
(
index
).
find
(
'
a
'
).
click
()
// enter
if
(
!~
index
)
index
=
0
$items
.
eq
(
index
)
.
attr
(
'
id
'
,
active
)
}
}
function
clearMenus
()
{
$
(
toggle
).
parent
().
removeClass
(
'
open
'
)
getParent
(
$
(
toggle
))
.
removeClass
(
'
open
'
)
.
find
(
'
#
'
+
active
)
.
attr
(
'
id
'
,
''
)
}
function
getParent
(
$this
)
{
var
selector
=
$this
.
attr
(
'
data-target
'
)
,
$parent
if
(
!
selector
)
{
selector
=
$this
.
attr
(
'
href
'
)
selector
=
selector
&&
selector
.
replace
(
/.*
(?=
#
[^\s]
*$
)
/
,
''
)
//strip for ie7
}
$parent
=
$
(
selector
)
$parent
.
length
||
(
$parent
=
$this
.
parent
())
return
$parent
}
...
...
@@ -91,10 +145,12 @@
* =================================== */
$
(
function
()
{
$
(
'
html
'
).
on
(
'
click.dropdown.data-api
'
,
clearMenus
)
$
(
'
html
'
)
.
on
(
'
click.dropdown.data-api
'
,
clearMenus
)
$
(
'
body
'
)
.
on
(
'
click.dropdown
'
,
'
.dropdown form
'
,
function
(
e
)
{
e
.
stopPropagation
()
})
.
on
(
'
click.dropdown.data-api
'
,
toggle
,
Dropdown
.
prototype
.
toggle
)
.
on
(
'
click.dropdown.data-api
'
,
toggle
,
Dropdown
.
prototype
.
toggle
)
.
on
(
'
keydown.dropdown.data-api
'
,
toggle
,
Dropdown
.
prototype
.
keydown
)
})
}(
window
.
jQuery
);
\ No newline at end of file
less/dropdowns.less
View file @
a7b49a7d
...
...
@@ -34,11 +34,16 @@
margin-top: 8px;
margin-left: 2px;
}
.dropdown:hover .caret,
.dropdown a:focus .caret,
.dropdown a:hover .caret,
.open .caret {
.opacity(100);
}
.navbar .nav .open > a {
color: @navbarLinkColorActive;
}
// The dropdown menu (ul)
// ----------------------
.dropdown-menu {
...
...
@@ -90,11 +95,17 @@
// -----------
.dropdown-menu li > a:hover,
.dropdown-menu .active > a,
.dropdown-menu .active > a:hover {
.dropdown-menu .active > a:hover,
.dropdown-menu:hover #aria-active > a:hover,
.dropdown-menu #aria-active > a {
color: @dropdownLinkColorHover;
text-decoration: none;
background-color: @dropdownLinkBackgroundHover;
}
.dropdown-menu:hover #aria-active > a {
color: @dropdownLinkColor;
background-color: @dropdownBackground;
}
// Open state for the dropdown
// ---------------------------
...
...
less/navbar.less
View file @
a7b49a7d
...
...
@@ -228,6 +228,7 @@
padding: ((@navbarHeight - @elementHeight) / 2 - 1) 5px ((@navbarHeight - @elementHeight) / 2);
}
// Hover
.navbar .nav > li > a:focus,
.navbar .nav > li > a:hover {
background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active
color: @navbarLinkColorHover;
...
...
@@ -236,7 +237,8 @@
// Active nav items
.navbar .nav .active > a,
.navbar .nav .active > a:hover {
.navbar .nav .active > a:hover,
.navbar .nav .active > a:focus {
color: @navbarLinkColorActive;
text-decoration: none;
background-color: @navbarLinkBackgroundActive;
...
...
@@ -343,6 +345,7 @@
}
// Dropdown link on hover
.navbar .nav li.dropdown.active > .dropdown-toggle:focus,
.navbar .nav li.dropdown.active > .dropdown-toggle:hover {
color: @white;
}
...
...
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