Skip to content
GitLab
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
392bf0c9
Commit
392bf0c9
authored
11 years ago
by
fat
Browse files
Options
Download
Email Patches
Plain Diff
fixes
#6691
parent
5396c408
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/assets/js/bootstrap.js
+12
-7
docs/assets/js/bootstrap.js
docs/assets/js/bootstrap.min.js
+1
-1
docs/assets/js/bootstrap.min.js
js/collapse.js
+11
-7
js/collapse.js
with
24 additions
and
15 deletions
+24
-15
docs/assets/js/bootstrap.js
+
12
-
7
View file @
392bf0c9
...
@@ -511,10 +511,10 @@
...
@@ -511,10 +511,10 @@
var
actives
=
this
.
$parent
&&
this
.
$parent
.
find
(
'
> .accordion-group > .in
'
)
var
actives
=
this
.
$parent
&&
this
.
$parent
.
find
(
'
> .accordion-group > .in
'
)
if
(
actives
&&
actives
.
length
)
{
if
(
actives
&&
actives
.
length
)
{
var
hasData
=
actives
.
data
(
'
collapse
'
)
var
hasData
=
actives
.
data
(
'
bs.
collapse
'
)
if
(
hasData
&&
hasData
.
transitioning
)
return
if
(
hasData
&&
hasData
.
transitioning
)
return
actives
.
collapse
(
'
hide
'
)
actives
.
collapse
(
'
hide
'
)
hasData
||
actives
.
data
(
'
collapse
'
,
null
)
hasData
||
actives
.
data
(
'
bs.
collapse
'
,
null
)
}
}
this
.
$element
[
dimension
](
0
)
this
.
$element
[
dimension
](
0
)
...
@@ -579,10 +579,10 @@
...
@@ -579,10 +579,10 @@
$
.
fn
.
collapse
=
function
(
option
)
{
$
.
fn
.
collapse
=
function
(
option
)
{
return
this
.
each
(
function
()
{
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
)
var
$this
=
$
(
this
)
var
data
=
$this
.
data
(
'
collapse
'
)
var
data
=
$this
.
data
(
'
bs.
collapse
'
)
var
options
=
$
.
extend
({},
Collapse
.
DEFAULTS
,
$this
.
data
(),
typeof
option
==
'
object
'
&&
option
)
var
options
=
$
.
extend
({},
Collapse
.
DEFAULTS
,
$this
.
data
(),
typeof
option
==
'
object
'
&&
option
)
if
(
!
data
)
$this
.
data
(
'
collapse
'
,
(
data
=
new
Collapse
(
this
,
options
)))
if
(
!
data
)
$this
.
data
(
'
bs.
collapse
'
,
(
data
=
new
Collapse
(
this
,
options
)))
if
(
typeof
option
==
'
string
'
)
data
[
option
]()
if
(
typeof
option
==
'
string
'
)
data
[
option
]()
})
})
}
}
...
@@ -607,12 +607,17 @@
...
@@ -607,12 +607,17 @@
var
target
=
$this
.
attr
(
'
data-target
'
)
var
target
=
$this
.
attr
(
'
data-target
'
)
||
e
.
preventDefault
()
||
e
.
preventDefault
()
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)
//strip for ie7
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)
//strip for ie7
var
option
=
$
(
target
).
data
(
'
collapse
'
)
?
'
toggle
'
:
$this
.
data
()
var
data
=
$
(
target
).
data
(
'
bs.collapse
'
)
var
option
=
data
?
'
toggle
'
:
$this
.
data
()
var
parent
=
$this
.
attr
(
'
data-parent
'
)
var
parent
=
$this
.
attr
(
'
data-parent
'
)
var
$parent
=
parent
&&
$
(
parent
)
var
$parent
=
parent
&&
$
(
parent
)
if
(
$parent
)
$parent
.
find
(
'
[data-toggle=collapse][data-parent=
'
+
parent
+
'
]
'
).
not
(
$this
).
addClass
(
'
collapsed
'
)
console
.
log
(
data
,
data
&&
data
.
transitioning
)
$this
[
$
(
target
).
hasClass
(
'
in
'
)
?
'
addClass
'
:
'
removeClass
'
](
'
collapsed
'
)
if
(
data
&&
!
data
.
transitioning
)
{
if
(
$parent
)
$parent
.
find
(
'
[data-toggle=collapse][data-parent=
'
+
parent
+
'
]
'
).
not
(
$this
).
addClass
(
'
collapsed
'
)
$this
[
$
(
target
).
hasClass
(
'
in
'
)
?
'
addClass
'
:
'
removeClass
'
](
'
collapsed
'
)
}
$
(
target
).
collapse
(
option
)
$
(
target
).
collapse
(
option
)
})
})
...
...
This diff is collapsed.
Click to expand it.
docs/assets/js/bootstrap.min.js
+
1
-
1
View file @
392bf0c9
This diff is collapsed.
Click to expand it.
js/collapse.js
+
11
-
7
View file @
392bf0c9
...
@@ -53,10 +53,10 @@
...
@@ -53,10 +53,10 @@
var
actives
=
this
.
$parent
&&
this
.
$parent
.
find
(
'
> .accordion-group > .in
'
)
var
actives
=
this
.
$parent
&&
this
.
$parent
.
find
(
'
> .accordion-group > .in
'
)
if
(
actives
&&
actives
.
length
)
{
if
(
actives
&&
actives
.
length
)
{
var
hasData
=
actives
.
data
(
'
collapse
'
)
var
hasData
=
actives
.
data
(
'
bs.
collapse
'
)
if
(
hasData
&&
hasData
.
transitioning
)
return
if
(
hasData
&&
hasData
.
transitioning
)
return
actives
.
collapse
(
'
hide
'
)
actives
.
collapse
(
'
hide
'
)
hasData
||
actives
.
data
(
'
collapse
'
,
null
)
hasData
||
actives
.
data
(
'
bs.
collapse
'
,
null
)
}
}
this
.
$element
[
dimension
](
0
)
this
.
$element
[
dimension
](
0
)
...
@@ -121,10 +121,10 @@
...
@@ -121,10 +121,10 @@
$
.
fn
.
collapse
=
function
(
option
)
{
$
.
fn
.
collapse
=
function
(
option
)
{
return
this
.
each
(
function
()
{
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
)
var
$this
=
$
(
this
)
var
data
=
$this
.
data
(
'
collapse
'
)
var
data
=
$this
.
data
(
'
bs.
collapse
'
)
var
options
=
$
.
extend
({},
Collapse
.
DEFAULTS
,
$this
.
data
(),
typeof
option
==
'
object
'
&&
option
)
var
options
=
$
.
extend
({},
Collapse
.
DEFAULTS
,
$this
.
data
(),
typeof
option
==
'
object
'
&&
option
)
if
(
!
data
)
$this
.
data
(
'
collapse
'
,
(
data
=
new
Collapse
(
this
,
options
)))
if
(
!
data
)
$this
.
data
(
'
bs.
collapse
'
,
(
data
=
new
Collapse
(
this
,
options
)))
if
(
typeof
option
==
'
string
'
)
data
[
option
]()
if
(
typeof
option
==
'
string
'
)
data
[
option
]()
})
})
}
}
...
@@ -149,12 +149,16 @@
...
@@ -149,12 +149,16 @@
var
target
=
$this
.
attr
(
'
data-target
'
)
var
target
=
$this
.
attr
(
'
data-target
'
)
||
e
.
preventDefault
()
||
e
.
preventDefault
()
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)
//strip for ie7
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)
//strip for ie7
var
option
=
$
(
target
).
data
(
'
collapse
'
)
?
'
toggle
'
:
$this
.
data
()
var
data
=
$
(
target
).
data
(
'
bs.collapse
'
)
var
option
=
data
?
'
toggle
'
:
$this
.
data
()
var
parent
=
$this
.
attr
(
'
data-parent
'
)
var
parent
=
$this
.
attr
(
'
data-parent
'
)
var
$parent
=
parent
&&
$
(
parent
)
var
$parent
=
parent
&&
$
(
parent
)
if
(
$parent
)
$parent
.
find
(
'
[data-toggle=collapse][data-parent=
'
+
parent
+
'
]
'
).
not
(
$this
).
addClass
(
'
collapsed
'
)
if
(
!
data
||
!
data
.
transitioning
)
{
$this
[
$
(
target
).
hasClass
(
'
in
'
)
?
'
addClass
'
:
'
removeClass
'
](
'
collapsed
'
)
if
(
$parent
)
$parent
.
find
(
'
[data-toggle=collapse][data-parent=
'
+
parent
+
'
]
'
).
not
(
$this
).
addClass
(
'
collapsed
'
)
$this
[
$
(
target
).
hasClass
(
'
in
'
)
?
'
addClass
'
:
'
removeClass
'
](
'
collapsed
'
)
}
$
(
target
).
collapse
(
option
)
$
(
target
).
collapse
(
option
)
})
})
...
...
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