Spaces:
Running
Running
Alfredo Villegas
commited on
Commit
•
a582ff4
1
Parent(s):
7adddda
Tamaño botón switch
Browse files- static/css/switch.css +7 -7
- static/js/windowHandler.js +5 -5
static/css/switch.css
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
.switch {
|
2 |
position: relative;
|
3 |
display: inline-block;
|
4 |
-
width:
|
5 |
-
height:
|
6 |
}
|
7 |
|
8 |
.switch input {
|
@@ -26,8 +26,8 @@
|
|
26 |
.slider:before {
|
27 |
position: absolute;
|
28 |
content: "";
|
29 |
-
height:
|
30 |
-
width:
|
31 |
left: 4px;
|
32 |
bottom: 4px;
|
33 |
background-color: white;
|
@@ -44,9 +44,9 @@ input:focus+.slider {
|
|
44 |
}
|
45 |
|
46 |
input:checked+.slider:before {
|
47 |
-
-webkit-transform: translateX(
|
48 |
-
-ms-transform: translateX(
|
49 |
-
transform: translateX(
|
50 |
}
|
51 |
|
52 |
.slider.round {
|
|
|
1 |
.switch {
|
2 |
position: relative;
|
3 |
display: inline-block;
|
4 |
+
width: 75px;
|
5 |
+
height: 30px;
|
6 |
}
|
7 |
|
8 |
.switch input {
|
|
|
26 |
.slider:before {
|
27 |
position: absolute;
|
28 |
content: "";
|
29 |
+
height: 23px;
|
30 |
+
width: 23px;
|
31 |
left: 4px;
|
32 |
bottom: 4px;
|
33 |
background-color: white;
|
|
|
44 |
}
|
45 |
|
46 |
input:checked+.slider:before {
|
47 |
+
-webkit-transform: translateX(23px);
|
48 |
+
-ms-transform: translateX(23px);
|
49 |
+
transform: translateX(23px);
|
50 |
}
|
51 |
|
52 |
.slider.round {
|
static/js/windowHandler.js
CHANGED
@@ -164,11 +164,11 @@ class WindowHandler{
|
|
164 |
//boton de switch para consultar con google.
|
165 |
let checkBox = event.currentTarget;
|
166 |
$(document).trigger("accion:switch_change", checkBox.checked);
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
}
|
173 |
|
174 |
}
|
|
|
164 |
//boton de switch para consultar con google.
|
165 |
let checkBox = event.currentTarget;
|
166 |
$(document).trigger("accion:switch_change", checkBox.checked);
|
167 |
+
if (checkBox.checked) {
|
168 |
+
console.log("Switch is turned on.");
|
169 |
+
} else {
|
170 |
+
console.log("Switch is turned off.");
|
171 |
+
}
|
172 |
}
|
173 |
|
174 |
}
|