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
5d6e9212
Commit
5d6e9212
authored
11 years ago
by
Brian Leonard
Committed by
Chris Rebert
11 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Don't deselect radio buttons in data-toggle; fixes
#9920
Merges #10787
parent
934d1bca
1 merge request
!11376
Double-clicking on a .btn-ized radio button shouldn't de-select it
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/button.js
+10
-4
js/button.js
with
10 additions
and
4 deletions
+10
-4
js/button.js
+
10
-
4
View file @
5d6e9212
...
...
@@ -54,15 +54,21 @@
Button
.
prototype
.
toggle
=
function
()
{
var
$parent
=
this
.
$element
.
closest
(
'
[data-toggle="buttons"]
'
)
var
changed
=
true
if
(
$parent
.
length
)
{
var
$input
=
this
.
$element
.
find
(
'
input
'
)
.
prop
(
'
checked
'
,
!
this
.
$element
.
hasClass
(
'
active
'
))
.
trigger
(
'
change
'
)
if
(
$input
.
prop
(
'
type
'
)
===
'
radio
'
)
$parent
.
find
(
'
.active
'
).
removeClass
(
'
active
'
)
if
(
$input
.
prop
(
'
type
'
)
===
'
radio
'
)
{
// see if clicking on current one
if
(
$input
.
prop
(
'
checked
'
)
&&
this
.
$element
.
hasClass
(
'
active
'
))
changed
=
false
else
$parent
.
find
(
'
.active
'
).
removeClass
(
'
active
'
)
}
if
(
changed
)
$input
.
prop
(
'
checked
'
,
!
this
.
$element
.
hasClass
(
'
active
'
)).
trigger
(
'
change
'
)
}
this
.
$element
.
toggleClass
(
'
active
'
)
if
(
changed
)
this
.
$element
.
toggleClass
(
'
active
'
)
}
...
...
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