Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
94b544c2
Commit
94b544c2
authored
10 years ago
by
Heinrich Fenkart
Browse files
Options
Download
Email Patches
Plain Diff
grunt
parent
36e3d07c
4 merge requests
!28721
Hot test
,
!16605
Test pull please ignore
,
!22103
test
,
!25326
Adjust examples
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
dist/js/bootstrap.js
+49
-16
dist/js/bootstrap.js
dist/js/bootstrap.min.js
+2
-2
dist/js/bootstrap.min.js
docs/assets/js/customize.min.js
+1
-1
docs/assets/js/customize.min.js
docs/assets/js/raw-files.min.js
+1
-1
docs/assets/js/raw-files.min.js
docs/dist/js/bootstrap.js
+49
-16
docs/dist/js/bootstrap.js
docs/dist/js/bootstrap.min.js
+2
-2
docs/dist/js/bootstrap.min.js
with
104 additions
and
38 deletions
+104
-38
dist/js/bootstrap.js
+
49
-
16
View file @
94b544c2
...
...
@@ -541,9 +541,15 @@ if (typeof jQuery === 'undefined') {
var
Collapse
=
function
(
element
,
options
)
{
this
.
$element
=
$
(
element
)
this
.
options
=
$
.
extend
({},
Collapse
.
DEFAULTS
,
options
)
this
.
$trigger
=
$
(
this
.
options
.
trigger
).
filter
(
'
[href="#
'
+
element
.
id
+
'
"], [data-target="#
'
+
element
.
id
+
'
"]
'
)
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
()
}
...
...
@@ -552,7 +558,8 @@ if (typeof jQuery === 'undefined') {
Collapse
.
TRANSITION_DURATION
=
350
Collapse
.
DEFAULTS
=
{
toggle
:
true
toggle
:
true
,
trigger
:
'
[data-toggle="collapse"]
'
}
Collapse
.
prototype
.
dimension
=
function
()
{
...
...
@@ -587,6 +594,10 @@ if (typeof jQuery === 'undefined') {
.
addClass
(
'
collapsing
'
)[
dimension
](
0
)
.
attr
(
'
aria-expanded
'
,
true
)
this
.
$trigger
.
removeClass
(
'
collapsed
'
)
.
attr
(
'
aria-expanded
'
,
true
)
this
.
transitioning
=
1
var
complete
=
function
()
{
...
...
@@ -623,6 +634,10 @@ if (typeof jQuery === 'undefined') {
.
removeClass
(
'
collapse in
'
)
.
attr
(
'
aria-expanded
'
,
false
)
this
.
$trigger
.
addClass
(
'
collapsed
'
)
.
attr
(
'
aria-expanded
'
,
false
)
this
.
transitioning
=
1
var
complete
=
function
()
{
...
...
@@ -645,6 +660,33 @@ if (typeof jQuery === 'undefined') {
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
// ==========================
...
...
@@ -680,22 +722,13 @@ if (typeof jQuery === 'undefined') {
// =================
$
(
document
).
on
(
'
click.bs.collapse.data-api
'
,
'
[data-toggle="collapse"]
'
,
function
(
e
)
{
var
href
var
$this
=
$
(
this
)
var
target
=
$this
.
attr
(
'
data-target
'
)
||
e
.
preventDefault
()
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)
// strip for ie7
var
$target
=
$
(
t
arget
)
if
(
!
$this
.
attr
(
'
data-target
'
))
e
.
preventDefault
()
var
$target
=
getT
arget
FromTrigger
(
$this
)
var
data
=
$target
.
data
(
'
bs.collapse
'
)
var
option
=
data
?
'
toggle
'
:
$this
.
data
()
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
)
}
var
option
=
data
?
'
toggle
'
:
$
.
extend
({},
$this
.
data
(),
{
trigger
:
this
})
Plugin
.
call
(
$target
,
option
)
})
...
...
This diff is collapsed.
Click to expand it.
dist/js/bootstrap.min.js
+
2
-
2
View file @
94b544c2
This diff is collapsed.
Click to expand it.
docs/assets/js/customize.min.js
+
1
-
1
View file @
94b544c2
This diff is collapsed.
Click to expand it.
docs/assets/js/raw-files.min.js
+
1
-
1
View file @
94b544c2
This diff is collapsed.
Click to expand it.
docs/dist/js/bootstrap.js
+
49
-
16
View file @
94b544c2
...
...
@@ -541,9 +541,15 @@ if (typeof jQuery === 'undefined') {
var
Collapse
=
function
(
element
,
options
)
{
this
.
$element
=
$
(
element
)
this
.
options
=
$
.
extend
({},
Collapse
.
DEFAULTS
,
options
)
this
.
$trigger
=
$
(
this
.
options
.
trigger
).
filter
(
'
[href="#
'
+
element
.
id
+
'
"], [data-target="#
'
+
element
.
id
+
'
"]
'
)
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
()
}
...
...
@@ -552,7 +558,8 @@ if (typeof jQuery === 'undefined') {
Collapse
.
TRANSITION_DURATION
=
350
Collapse
.
DEFAULTS
=
{
toggle
:
true
toggle
:
true
,
trigger
:
'
[data-toggle="collapse"]
'
}
Collapse
.
prototype
.
dimension
=
function
()
{
...
...
@@ -587,6 +594,10 @@ if (typeof jQuery === 'undefined') {
.
addClass
(
'
collapsing
'
)[
dimension
](
0
)
.
attr
(
'
aria-expanded
'
,
true
)
this
.
$trigger
.
removeClass
(
'
collapsed
'
)
.
attr
(
'
aria-expanded
'
,
true
)
this
.
transitioning
=
1
var
complete
=
function
()
{
...
...
@@ -623,6 +634,10 @@ if (typeof jQuery === 'undefined') {
.
removeClass
(
'
collapse in
'
)
.
attr
(
'
aria-expanded
'
,
false
)
this
.
$trigger
.
addClass
(
'
collapsed
'
)
.
attr
(
'
aria-expanded
'
,
false
)
this
.
transitioning
=
1
var
complete
=
function
()
{
...
...
@@ -645,6 +660,33 @@ if (typeof jQuery === 'undefined') {
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
// ==========================
...
...
@@ -680,22 +722,13 @@ if (typeof jQuery === 'undefined') {
// =================
$
(
document
).
on
(
'
click.bs.collapse.data-api
'
,
'
[data-toggle="collapse"]
'
,
function
(
e
)
{
var
href
var
$this
=
$
(
this
)
var
target
=
$this
.
attr
(
'
data-target
'
)
||
e
.
preventDefault
()
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)
// strip for ie7
var
$target
=
$
(
t
arget
)
if
(
!
$this
.
attr
(
'
data-target
'
))
e
.
preventDefault
()
var
$target
=
getT
arget
FromTrigger
(
$this
)
var
data
=
$target
.
data
(
'
bs.collapse
'
)
var
option
=
data
?
'
toggle
'
:
$this
.
data
()
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
)
}
var
option
=
data
?
'
toggle
'
:
$
.
extend
({},
$this
.
data
(),
{
trigger
:
this
})
Plugin
.
call
(
$target
,
option
)
})
...
...
This diff is collapsed.
Click to expand it.
docs/dist/js/bootstrap.min.js
+
2
-
2
View file @
94b544c2
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets