Skip to content

Commit d6dc3f7

Browse files
author
Emanuele Marchi
committed
Merge branch 'develop'
Conflicts: dist/css/bootstrap2/bootstrap-switch.min.css test/bootstrap-switch.js
2 parents 9242ff8 + 6dd9c93 commit d6dc3f7

35 files changed

+1750
-922
lines changed

bower.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "bootstrap-switch",
33
"description": "Turn checkboxes and radio buttons in toggle switches.",
4-
"version": "3.0.2",
4+
"version": "3.1.0",
55
"main": [
6-
"dist/js/bootstrap-switch.js",
7-
"dist/css/bootstrap3/bootstrap-switch.css"
6+
"./dist/js/bootstrap-switch.js",
7+
"./dist/css/bootstrap3/bootstrap-switch.css"
88
],
99
"ignore": [
1010
"docs",
@@ -19,6 +19,11 @@
1919
"package.json"
2020
],
2121
"dependencies": {
22+
"bootstrap": ">=2.3.2",
2223
"jquery": ">=1.9.0"
24+
},
25+
"devDependencies": {
26+
"jquery": "~2.1.1",
27+
"bootstrap": "~3.2.0"
2328
}
2429
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "components/bootstrap-switch",
33
"description": "Turn checkboxes and radio buttons in toggle switches.",
4-
"version": "3.0.2",
4+
"version": "3.1.0",
55
"type": "component",
66
"keywords": [
77
"bootstrap",

dist/css/bootstrap2/bootstrap-switch.css

Lines changed: 77 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -103,55 +103,58 @@
103103
font-size: 16px;
104104
line-height: normal;
105105
}
106+
.bootstrap-switch.bootstrap-switch-disabled,
107+
.bootstrap-switch.bootstrap-switch-readonly,
108+
.bootstrap-switch.bootstrap-switch-indeterminate {
109+
opacity: 0.5;
110+
filter: alpha(opacity=50);
111+
cursor: default !important;
112+
}
113+
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,
114+
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,
115+
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,
116+
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,
117+
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,
118+
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,
119+
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,
120+
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,
121+
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label {
122+
cursor: default !important;
123+
}
106124
.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container {
107125
-webkit-transition: margin-left 0.5s;
108126
-moz-transition: margin-left 0.5s;
109127
-o-transition: margin-left 0.5s;
110128
transition: margin-left 0.5s;
111129
}
112-
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-container {
113-
margin-left: 0%;
114-
}
115-
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label {
130+
.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on {
131+
-webkit-border-top-left-radius: 0;
132+
-moz-border-radius-topleft: 0;
133+
border-top-left-radius: 0;
134+
-webkit-border-bottom-left-radius: 0;
135+
-moz-border-radius-bottomleft: 0;
136+
border-bottom-left-radius: 0;
116137
-webkit-border-top-right-radius: 4px;
117138
-moz-border-radius-topright: 4px;
118139
border-top-right-radius: 4px;
119140
-webkit-border-bottom-right-radius: 4px;
120141
-moz-border-radius-bottomright: 4px;
121142
border-bottom-right-radius: 4px;
122143
}
123-
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-container {
124-
margin-left: -50%;
125-
}
126-
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label {
144+
.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off {
145+
-webkit-border-top-right-radius: 0;
146+
-moz-border-radius-topright: 0;
147+
border-top-right-radius: 0;
148+
-webkit-border-bottom-right-radius: 0;
149+
-moz-border-radius-bottomright: 0;
150+
border-bottom-right-radius: 0;
127151
-webkit-border-top-left-radius: 4px;
128152
-moz-border-radius-topleft: 4px;
129153
border-top-left-radius: 4px;
130154
-webkit-border-bottom-left-radius: 4px;
131155
-moz-border-radius-bottomleft: 4px;
132156
border-bottom-left-radius: 4px;
133157
}
134-
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-container {
135-
margin-left: -25%;
136-
}
137-
.bootstrap-switch.bootstrap-switch-disabled,
138-
.bootstrap-switch.bootstrap-switch-readonly,
139-
.bootstrap-switch.bootstrap-switch-indeterminate {
140-
opacity: 0.5;
141-
filter: alpha(opacity=50);
142-
cursor: default !important;
143-
}
144-
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,
145-
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,
146-
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,
147-
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,
148-
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,
149-
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,
150-
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,
151-
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,
152-
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label {
153-
cursor: default !important;
154-
}
155158
.bootstrap-switch.bootstrap-switch-focused {
156159
border-color: rgba(82, 168, 236, 0.8);
157160
outline: 0;
@@ -160,6 +163,35 @@
160163
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82, 168, 236, .6);
161164
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82, 168, 236, .6);
162165
}
166+
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-container,
167+
.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-container {
168+
margin-left: 0%;
169+
}
170+
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label,
171+
.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label {
172+
-webkit-border-top-right-radius: 4px;
173+
-moz-border-radius-topright: 4px;
174+
border-top-right-radius: 4px;
175+
-webkit-border-bottom-right-radius: 4px;
176+
-moz-border-radius-bottomright: 4px;
177+
border-bottom-right-radius: 4px;
178+
}
179+
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-container,
180+
.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-container {
181+
margin-left: -50%;
182+
}
183+
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label,
184+
.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label {
185+
-webkit-border-top-left-radius: 4px;
186+
-moz-border-radius-topleft: 4px;
187+
border-top-left-radius: 4px;
188+
-webkit-border-bottom-left-radius: 4px;
189+
-moz-border-radius-bottomleft: 4px;
190+
border-bottom-left-radius: 4px;
191+
}
192+
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-container {
193+
margin-left: -25%;
194+
}
163195
.bootstrap-switch .bootstrap-switch-container {
164196
display: inline-block;
165197
width: 150%;
@@ -432,22 +464,6 @@
432464
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default.active {
433465
background-color: #e6e6e6 \9;
434466
}
435-
.bootstrap-switch .bootstrap-switch-handle-on {
436-
-webkit-border-top-left-radius: 4px;
437-
-moz-border-radius-topleft: 4px;
438-
border-top-left-radius: 4px;
439-
-webkit-border-bottom-left-radius: 4px;
440-
-moz-border-radius-bottomleft: 4px;
441-
border-bottom-left-radius: 4px;
442-
}
443-
.bootstrap-switch .bootstrap-switch-handle-off {
444-
-webkit-border-top-right-radius: 4px;
445-
-moz-border-radius-topright: 4px;
446-
border-top-right-radius: 4px;
447-
-webkit-border-bottom-right-radius: 4px;
448-
-moz-border-radius-bottomright: 4px;
449-
border-bottom-right-radius: 4px;
450-
}
451467
.bootstrap-switch .bootstrap-switch-label {
452468
text-align: center;
453469
margin-top: -1px;
@@ -486,6 +502,22 @@
486502
.bootstrap-switch .bootstrap-switch-label.active {
487503
background-color: #cccccc \9;
488504
}
505+
.bootstrap-switch .bootstrap-switch-handle-on {
506+
-webkit-border-top-left-radius: 4px;
507+
-moz-border-radius-topleft: 4px;
508+
border-top-left-radius: 4px;
509+
-webkit-border-bottom-left-radius: 4px;
510+
-moz-border-radius-bottomleft: 4px;
511+
border-bottom-left-radius: 4px;
512+
}
513+
.bootstrap-switch .bootstrap-switch-handle-off {
514+
-webkit-border-top-right-radius: 4px;
515+
-moz-border-radius-topright: 4px;
516+
border-top-right-radius: 4px;
517+
-webkit-border-bottom-right-radius: 4px;
518+
-moz-border-radius-bottomright: 4px;
519+
border-bottom-right-radius: 4px;
520+
}
489521
.bootstrap-switch input[type='radio'],
490522
.bootstrap-switch input[type='checkbox'] {
491523
position: absolute !important;

dist/css/bootstrap2/bootstrap-switch.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/bootstrap3/bootstrap-switch.css

Lines changed: 46 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -71,27 +71,6 @@
7171
font-size: 16px;
7272
line-height: normal;
7373
}
74-
.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container {
75-
-webkit-transition: margin-left 0.5s;
76-
transition: margin-left 0.5s;
77-
}
78-
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-container {
79-
margin-left: 0%;
80-
}
81-
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label {
82-
border-bottom-right-radius: 3px;
83-
border-top-right-radius: 3px;
84-
}
85-
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-container {
86-
margin-left: -50%;
87-
}
88-
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label {
89-
border-bottom-left-radius: 3px;
90-
border-top-left-radius: 3px;
91-
}
92-
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-container {
93-
margin-left: -25%;
94-
}
9574
.bootstrap-switch.bootstrap-switch-disabled,
9675
.bootstrap-switch.bootstrap-switch-readonly,
9776
.bootstrap-switch.bootstrap-switch-indeterminate {
@@ -110,12 +89,50 @@
11089
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label {
11190
cursor: default !important;
11291
}
92+
.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container {
93+
-webkit-transition: margin-left 0.5s;
94+
transition: margin-left 0.5s;
95+
}
96+
.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on {
97+
border-bottom-left-radius: 0;
98+
border-top-left-radius: 0;
99+
border-bottom-right-radius: 3px;
100+
border-top-right-radius: 3px;
101+
}
102+
.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off {
103+
border-bottom-right-radius: 0;
104+
border-top-right-radius: 0;
105+
border-bottom-left-radius: 3px;
106+
border-top-left-radius: 3px;
107+
}
113108
.bootstrap-switch.bootstrap-switch-focused {
114109
border-color: #66afe9;
115110
outline: 0;
116111
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
117112
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
118113
}
114+
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-container,
115+
.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-container {
116+
margin-left: 0%;
117+
}
118+
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label,
119+
.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label {
120+
border-bottom-right-radius: 3px;
121+
border-top-right-radius: 3px;
122+
}
123+
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-container,
124+
.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-container {
125+
margin-left: -50%;
126+
}
127+
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label,
128+
.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label {
129+
border-bottom-left-radius: 3px;
130+
border-top-left-radius: 3px;
131+
}
132+
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-container,
133+
.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-indeterminate .bootstrap-switch-container {
134+
margin-left: -25%;
135+
}
119136
.bootstrap-switch .bootstrap-switch-container {
120137
display: inline-block;
121138
width: 150%;
@@ -174,14 +191,6 @@
174191
color: #000;
175192
background: #eeeeee;
176193
}
177-
.bootstrap-switch .bootstrap-switch-handle-on {
178-
border-bottom-left-radius: 3px;
179-
border-top-left-radius: 3px;
180-
}
181-
.bootstrap-switch .bootstrap-switch-handle-off {
182-
border-bottom-right-radius: 3px;
183-
border-top-right-radius: 3px;
184-
}
185194
.bootstrap-switch .bootstrap-switch-label {
186195
text-align: center;
187196
margin-top: -1px;
@@ -191,6 +200,14 @@
191200
color: #333333;
192201
background: #ffffff;
193202
}
203+
.bootstrap-switch .bootstrap-switch-handle-on {
204+
border-bottom-left-radius: 3px;
205+
border-top-left-radius: 3px;
206+
}
207+
.bootstrap-switch .bootstrap-switch-handle-off {
208+
border-bottom-right-radius: 3px;
209+
border-top-right-radius: 3px;
210+
}
194211
.bootstrap-switch input[type='radio'],
195212
.bootstrap-switch input[type='checkbox'] {
196213
position: absolute !important;

0 commit comments

Comments
 (0)