From 005bfeb7e669edec2a601c19fdd9067ef14c6dcd Mon Sep 17 00:00:00 2001 From: FezVrasta Date: Sun, 7 Sep 2014 13:49:49 +0200 Subject: [PATCH] .box > .check --- less/checkboxes.less | 9 ++++----- scripts/material.js | 15 +-------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/less/checkboxes.less b/less/checkboxes.less index c81bf6ba..2290249b 100644 --- a/less/checkboxes.less +++ b/less/checkboxes.less @@ -25,7 +25,7 @@ opacity: 0; margin: 0; } - .box { + .check { border: 2px solid @lightbg-text; height: 20px; width: 20px; @@ -39,7 +39,7 @@ // Hide native checkbox input[type=checkbox] { display: none; } - input[type=checkbox] ~ .box { + input[type=checkbox] ~ .check { position: absolute; top: 0px; left: 0px; @@ -50,7 +50,7 @@ .animation(uncheck 300ms ease-out forwards); } - input[type=checkbox]:checked ~ .box { + input[type=checkbox]:checked ~ .check { .animation(check 300ms ease-out forwards); } @@ -63,14 +63,13 @@ } // Style for disabled inputs - input[type=checkbox][disabled]:not(:checked) ~ .box { + input[type=checkbox][disabled]:not(:checked) ~ .check { opacity: 0.5; } input[type=checkbox][disabled] ~ .ripple { background-color: @lightbg-text; } - .variations(~" input[type=checkbox]:checked ~ .ripple", background-color, @success); } diff --git a/scripts/material.js b/scripts/material.js index 4a8e0771..632051bf 100644 --- a/scripts/material.js +++ b/scripts/material.js @@ -5,7 +5,7 @@ $(function (){ ripples.init(".btn:not(.btn-link), .navbar a, .nav-tabs a, .withripple"); // Add fake-checkbox to material checkboxes - $(".checkbox label input").after(""); + $(".checkbox label input").after(""); // Add fake-radio to material radios $(".radio label input").after(""); @@ -24,19 +24,6 @@ $(function (){ } }); - // Material inputs engine (ripple effect) - /*$(document).on("mouseup", ".checkbox label, .radio label", function() { - console.log("click"); - var $ripple = $(this).find(".ripple"); - - $ripple.addClass("animate"); - var timer = setTimeout(function() { - console.log("out"); - clearTimeout(timer); - $ripple.removeClass("animate"); - }, 800); - });*/ - $(document).on("change", ".form-control", function() { if ($(this).val() !== "") { $(this).removeClass("empty");