From 8cc05fab341de87ea8d70ab02153797d8b1b6791 Mon Sep 17 00:00:00 2001 From: tilwinjoy Date: Tue, 26 Apr 2016 11:12:39 +0530 Subject: [PATCH] adds support for inline checkbox --- less/_checkboxes.less | 19 +++++++++++-------- scripts/material.js | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/less/_checkboxes.less b/less/_checkboxes.less index a320dc30..9afa0ad1 100644 --- a/less/_checkboxes.less +++ b/less/_checkboxes.less @@ -2,14 +2,16 @@ .form-group { } -.checkbox { - label { - cursor: pointer; - padding-left: 0; // Reset for Bootstrap rule - color: @mdb-checkbox-label-color; - .mdb-label-color-toggle-focus(); - } +.checkbox label, +label.checkbox-inline { + cursor: pointer; + padding-left: 0; // Reset for Bootstrap rule + color: @mdb-checkbox-label-color; + .mdb-label-color-toggle-focus(); +} +.checkbox, +label.checkbox-inline { // Hide native checkbox input[type=checkbox] { opacity: 0; @@ -135,7 +137,8 @@ // Prevent checkbox animation and ripple effect on page load .is-focused { - .checkbox { + .checkbox, + label.checkbox-inline { .checkbox-material { .check:before { animation: checkbox-off @mdb-checkbox-animation-check forwards; diff --git a/scripts/material.js b/scripts/material.js index d0e3cd09..76fd9abb 100644 --- a/scripts/material.js +++ b/scripts/material.js @@ -74,7 +74,7 @@ ".pagination li:not(.active):not(.disabled) a:not(.withoutripple)" ].join(","), "inputElements": "input.form-control, textarea.form-control, select.form-control", - "checkboxElements": ".checkbox > label > input[type=checkbox]", + "checkboxElements": ".checkbox > label > input[type=checkbox], label.checkbox-inline > input[type=checkbox]", "togglebuttonElements": ".togglebutton > label > input[type=checkbox]", "radioElements": ".radio > label > input[type=radio]" },