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
94b544c2
Commit
94b544c2
authored
Oct 29, 2014
by
Heinrich Fenkart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grunt
parent
36e3d07c
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
104 additions
and
38 deletions
+104
-38
dist/js/bootstrap.js
dist/js/bootstrap.js
+49
-16
dist/js/bootstrap.min.js
dist/js/bootstrap.min.js
+2
-2
docs/assets/js/customize.min.js
docs/assets/js/customize.min.js
+1
-1
docs/assets/js/raw-files.min.js
docs/assets/js/raw-files.min.js
+1
-1
docs/dist/js/bootstrap.js
docs/dist/js/bootstrap.js
+49
-16
docs/dist/js/bootstrap.min.js
docs/dist/js/bootstrap.min.js
+2
-2
No files found.
dist/js/bootstrap.js
View file @
94b544c2
...
@@ -541,9 +541,15 @@ if (typeof jQuery === 'undefined') {
...
@@ -541,9 +541,15 @@ if (typeof jQuery === 'undefined') {
var
Collapse
=
function
(
element
,
options
)
{
var
Collapse
=
function
(
element
,
options
)
{
this
.
$element
=
$
(
element
)
this
.
$element
=
$
(
element
)
this
.
options
=
$
.
extend
({},
Collapse
.
DEFAULTS
,
options
)
this
.
options
=
$
.
extend
({},
Collapse
.
DEFAULTS
,
options
)
this
.
$trigger
=
$
(
this
.
options
.
trigger
).
filter
(
'
[href="#
'
+
element
.
id
+
'
"], [data-target="#
'
+
element
.
id
+
'
"]
'
)
this
.
transitioning
=
null
this
.
transitioning
=
null
if
(
this
.
options
.
parent
)
this
.
$parent
=
$
(
this
.
options
.
parent
)
if
(
this
.
options
.
parent
)
{
this
.
$parent
=
this
.
getParent
()
}
else
{
this
.
addAriaAndCollapsedClass
(
this
.
$element
,
this
.
$trigger
)
}
if
(
this
.
options
.
toggle
)
this
.
toggle
()
if
(
this
.
options
.
toggle
)
this
.
toggle
()
}
}
...
@@ -552,7 +558,8 @@ if (typeof jQuery === 'undefined') {
...
@@ -552,7 +558,8 @@ if (typeof jQuery === 'undefined') {
Collapse
.
TRANSITION_DURATION
=
350
Collapse
.
TRANSITION_DURATION
=
350
Collapse
.
DEFAULTS
=
{
Collapse
.
DEFAULTS
=
{
toggle
:
true
toggle
:
true
,
trigger
:
'
[data-toggle="collapse"]
'
}
}
Collapse
.
prototype
.
dimension
=
function
()
{
Collapse
.
prototype
.
dimension
=
function
()
{
...
@@ -587,6 +594,10 @@ if (typeof jQuery === 'undefined') {
...
@@ -587,6 +594,10 @@ if (typeof jQuery === 'undefined') {
.
addClass
(
'
collapsing
'
)[
dimension
](
0
)
.
addClass
(
'
collapsing
'
)[
dimension
](
0
)
.
attr
(
'
aria-expanded
'
,
true
)
.
attr
(
'
aria-expanded
'
,
true
)
this
.
$trigger
.
removeClass
(
'
collapsed
'
)
.
attr
(
'
aria-expanded
'
,
true
)
this
.
transitioning
=
1
this
.
transitioning
=
1
var
complete
=
function
()
{
var
complete
=
function
()
{
...
@@ -623,6 +634,10 @@ if (typeof jQuery === 'undefined') {
...
@@ -623,6 +634,10 @@ if (typeof jQuery === 'undefined') {
.
removeClass
(
'
collapse in
'
)
.
removeClass
(
'
collapse in
'
)
.
attr
(
'
aria-expanded
'
,
false
)
.
attr
(
'
aria-expanded
'
,
false
)
this
.
$trigger
.
addClass
(
'
collapsed
'
)
.
attr
(
'
aria-expanded
'
,
false
)
this
.
transitioning
=
1
this
.
transitioning
=
1
var
complete
=
function
()
{
var
complete
=
function
()
{
...
@@ -645,6 +660,33 @@ if (typeof jQuery === 'undefined') {
...
@@ -645,6 +660,33 @@ if (typeof jQuery === 'undefined') {
this
[
this
.
$element
.
hasClass
(
'
in
'
)
?
'
hide
'
:
'
show
'
]()
this
[
this
.
$element
.
hasClass
(
'
in
'
)
?
'
hide
'
:
'
show
'
]()
}
}
Collapse
.
prototype
.
getParent
=
function
()
{
return
$
(
this
.
options
.
parent
)
.
find
(
'
[data-toggle="collapse"][data-parent="
'
+
this
.
options
.
parent
+
'
"]
'
)
.
each
(
$
.
proxy
(
function
(
i
,
element
)
{
var
$element
=
$
(
element
)
this
.
addAriaAndCollapsedClass
(
getTargetFromTrigger
(
$element
),
$element
)
},
this
))
.
end
()
}
Collapse
.
prototype
.
addAriaAndCollapsedClass
=
function
(
$element
,
$trigger
)
{
var
isOpen
=
$element
.
hasClass
(
'
in
'
)
$element
.
attr
(
'
aria-expanded
'
,
isOpen
)
$trigger
.
toggleClass
(
'
collapsed
'
,
!
isOpen
)
.
attr
(
'
aria-expanded
'
,
isOpen
)
}
function
getTargetFromTrigger
(
$trigger
)
{
var
href
var
target
=
$trigger
.
attr
(
'
data-target
'
)
||
(
href
=
$trigger
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)
// strip for ie7
return
$
(
target
)
}
// COLLAPSE PLUGIN DEFINITION
// COLLAPSE PLUGIN DEFINITION
// ==========================
// ==========================
...
@@ -680,22 +722,13 @@ if (typeof jQuery === 'undefined') {
...
@@ -680,22 +722,13 @@ if (typeof jQuery === 'undefined') {
// =================
// =================
$
(
document
).
on
(
'
click.bs.collapse.data-api
'
,
'
[data-toggle="collapse"]
'
,
function
(
e
)
{
$
(
document
).
on
(
'
click.bs.collapse.data-api
'
,
'
[data-toggle="collapse"]
'
,
function
(
e
)
{
var
href
var
$this
=
$
(
this
)
var
$this
=
$
(
this
)
var
target
=
$this
.
attr
(
'
data-target
'
)
||
e
.
preventDefault
()
if
(
!
$this
.
attr
(
'
data-target
'
))
e
.
preventDefault
()
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)
// strip for ie7
var
$target
=
$
(
target
)
var
$target
=
getTargetFromTrigger
(
$this
)
var
data
=
$target
.
data
(
'
bs.collapse
'
)
var
data
=
$target
.
data
(
'
bs.collapse
'
)
var
option
=
data
?
'
toggle
'
:
$this
.
data
()
var
option
=
data
?
'
toggle
'
:
$
.
extend
({},
$this
.
data
(),
{
trigger
:
this
})
var
parent
=
$this
.
attr
(
'
data-parent
'
)
var
$parent
=
parent
&&
$
(
parent
)
if
(
!
data
||
!
data
.
transitioning
)
{
if
(
$parent
)
$parent
.
find
(
'
[data-toggle="collapse"][data-parent="
'
+
parent
+
'
"]
'
).
not
(
$this
).
addClass
(
'
collapsed
'
).
attr
(
'
aria-expanded
'
,
false
)
var
isCollapsed
=
$target
.
hasClass
(
'
in
'
)
$this
.
toggleClass
(
'
collapsed
'
,
isCollapsed
).
attr
(
'
aria-expanded
'
,
!
isCollapsed
)
}
Plugin
.
call
(
$target
,
option
)
Plugin
.
call
(
$target
,
option
)
})
})
...
...
dist/js/bootstrap.min.js
View file @
94b544c2
This diff is collapsed.
Click to expand it.
docs/assets/js/customize.min.js
View file @
94b544c2
This diff is collapsed.
Click to expand it.
docs/assets/js/raw-files.min.js
View file @
94b544c2
This diff is collapsed.
Click to expand it.
docs/dist/js/bootstrap.js
View file @
94b544c2
...
@@ -541,9 +541,15 @@ if (typeof jQuery === 'undefined') {
...
@@ -541,9 +541,15 @@ if (typeof jQuery === 'undefined') {
var
Collapse
=
function
(
element
,
options
)
{
var
Collapse
=
function
(
element
,
options
)
{
this
.
$element
=
$
(
element
)
this
.
$element
=
$
(
element
)
this
.
options
=
$
.
extend
({},
Collapse
.
DEFAULTS
,
options
)
this
.
options
=
$
.
extend
({},
Collapse
.
DEFAULTS
,
options
)
this
.
$trigger
=
$
(
this
.
options
.
trigger
).
filter
(
'
[href="#
'
+
element
.
id
+
'
"], [data-target="#
'
+
element
.
id
+
'
"]
'
)
this
.
transitioning
=
null
this
.
transitioning
=
null
if
(
this
.
options
.
parent
)
this
.
$parent
=
$
(
this
.
options
.
parent
)
if
(
this
.
options
.
parent
)
{
this
.
$parent
=
this
.
getParent
()
}
else
{
this
.
addAriaAndCollapsedClass
(
this
.
$element
,
this
.
$trigger
)
}
if
(
this
.
options
.
toggle
)
this
.
toggle
()
if
(
this
.
options
.
toggle
)
this
.
toggle
()
}
}
...
@@ -552,7 +558,8 @@ if (typeof jQuery === 'undefined') {
...
@@ -552,7 +558,8 @@ if (typeof jQuery === 'undefined') {
Collapse
.
TRANSITION_DURATION
=
350
Collapse
.
TRANSITION_DURATION
=
350
Collapse
.
DEFAULTS
=
{
Collapse
.
DEFAULTS
=
{
toggle
:
true
toggle
:
true
,
trigger
:
'
[data-toggle="collapse"]
'
}
}
Collapse
.
prototype
.
dimension
=
function
()
{
Collapse
.
prototype
.
dimension
=
function
()
{
...
@@ -587,6 +594,10 @@ if (typeof jQuery === 'undefined') {
...
@@ -587,6 +594,10 @@ if (typeof jQuery === 'undefined') {
.
addClass
(
'
collapsing
'
)[
dimension
](
0
)
.
addClass
(
'
collapsing
'
)[
dimension
](
0
)
.
attr
(
'
aria-expanded
'
,
true
)
.
attr
(
'
aria-expanded
'
,
true
)
this
.
$trigger
.
removeClass
(
'
collapsed
'
)
.
attr
(
'
aria-expanded
'
,
true
)
this
.
transitioning
=
1
this
.
transitioning
=
1
var
complete
=
function
()
{
var
complete
=
function
()
{
...
@@ -623,6 +634,10 @@ if (typeof jQuery === 'undefined') {
...
@@ -623,6 +634,10 @@ if (typeof jQuery === 'undefined') {
.
removeClass
(
'
collapse in
'
)
.
removeClass
(
'
collapse in
'
)
.
attr
(
'
aria-expanded
'
,
false
)
.
attr
(
'
aria-expanded
'
,
false
)
this
.
$trigger
.
addClass
(
'
collapsed
'
)
.
attr
(
'
aria-expanded
'
,
false
)
this
.
transitioning
=
1
this
.
transitioning
=
1
var
complete
=
function
()
{
var
complete
=
function
()
{
...
@@ -645,6 +660,33 @@ if (typeof jQuery === 'undefined') {
...
@@ -645,6 +660,33 @@ if (typeof jQuery === 'undefined') {
this
[
this
.
$element
.
hasClass
(
'
in
'
)
?
'
hide
'
:
'
show
'
]()
this
[
this
.
$element
.
hasClass
(
'
in
'
)
?
'
hide
'
:
'
show
'
]()
}
}
Collapse
.
prototype
.
getParent
=
function
()
{
return
$
(
this
.
options
.
parent
)
.
find
(
'
[data-toggle="collapse"][data-parent="
'
+
this
.
options
.
parent
+
'
"]
'
)
.
each
(
$
.
proxy
(
function
(
i
,
element
)
{
var
$element
=
$
(
element
)
this
.
addAriaAndCollapsedClass
(
getTargetFromTrigger
(
$element
),
$element
)
},
this
))
.
end
()
}
Collapse
.
prototype
.
addAriaAndCollapsedClass
=
function
(
$element
,
$trigger
)
{
var
isOpen
=
$element
.
hasClass
(
'
in
'
)
$element
.
attr
(
'
aria-expanded
'
,
isOpen
)
$trigger
.
toggleClass
(
'
collapsed
'
,
!
isOpen
)
.
attr
(
'
aria-expanded
'
,
isOpen
)
}
function
getTargetFromTrigger
(
$trigger
)
{
var
href
var
target
=
$trigger
.
attr
(
'
data-target
'
)
||
(
href
=
$trigger
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)
// strip for ie7
return
$
(
target
)
}
// COLLAPSE PLUGIN DEFINITION
// COLLAPSE PLUGIN DEFINITION
// ==========================
// ==========================
...
@@ -680,22 +722,13 @@ if (typeof jQuery === 'undefined') {
...
@@ -680,22 +722,13 @@ if (typeof jQuery === 'undefined') {
// =================
// =================
$
(
document
).
on
(
'
click.bs.collapse.data-api
'
,
'
[data-toggle="collapse"]
'
,
function
(
e
)
{
$
(
document
).
on
(
'
click.bs.collapse.data-api
'
,
'
[data-toggle="collapse"]
'
,
function
(
e
)
{
var
href
var
$this
=
$
(
this
)
var
$this
=
$
(
this
)
var
target
=
$this
.
attr
(
'
data-target
'
)
||
e
.
preventDefault
()
if
(
!
$this
.
attr
(
'
data-target
'
))
e
.
preventDefault
()
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)
// strip for ie7
var
$target
=
$
(
target
)
var
$target
=
getTargetFromTrigger
(
$this
)
var
data
=
$target
.
data
(
'
bs.collapse
'
)
var
data
=
$target
.
data
(
'
bs.collapse
'
)
var
option
=
data
?
'
toggle
'
:
$this
.
data
()
var
option
=
data
?
'
toggle
'
:
$
.
extend
({},
$this
.
data
(),
{
trigger
:
this
})
var
parent
=
$this
.
attr
(
'
data-parent
'
)
var
$parent
=
parent
&&
$
(
parent
)
if
(
!
data
||
!
data
.
transitioning
)
{
if
(
$parent
)
$parent
.
find
(
'
[data-toggle="collapse"][data-parent="
'
+
parent
+
'
"]
'
).
not
(
$this
).
addClass
(
'
collapsed
'
).
attr
(
'
aria-expanded
'
,
false
)
var
isCollapsed
=
$target
.
hasClass
(
'
in
'
)
$this
.
toggleClass
(
'
collapsed
'
,
isCollapsed
).
attr
(
'
aria-expanded
'
,
!
isCollapsed
)
}
Plugin
.
call
(
$target
,
option
)
Plugin
.
call
(
$target
,
option
)
})
})
...
...
docs/dist/js/bootstrap.min.js
View file @
94b544c2
This diff is collapsed.
Click to expand it.
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