diff options
author | Simon Rettberg | 2016-06-14 17:50:56 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-06-14 17:50:56 +0200 |
commit | 326fef724effa79b4a1900f7a155163f9cf50b7e (patch) | |
tree | 89731da8d2041f3c4f8b63d12b04d90e7a1a6fb8 /modules-available/bootstrap_switch/README | |
parent | Add documentation (diff) | |
download | slx-admin-326fef724effa79b4a1900f7a155163f9cf50b7e.tar.gz slx-admin-326fef724effa79b4a1900f7a155163f9cf50b7e.tar.xz slx-admin-326fef724effa79b4a1900f7a155163f9cf50b7e.zip |
[bootstrap_switch] New module for bootstrap-switch plugin
Diffstat (limited to 'modules-available/bootstrap_switch/README')
-rw-r--r-- | modules-available/bootstrap_switch/README | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/modules-available/bootstrap_switch/README b/modules-available/bootstrap_switch/README new file mode 100644 index 00000000..405ce13a --- /dev/null +++ b/modules-available/bootstrap_switch/README @@ -0,0 +1,19 @@ +This is basically just bootstrap-switch (js + css), with +the addition of these three lines in the .js file: +<snip> +// SLX-Admin: Enable for class bs-switch +$.fn.bootstrapSwitch.defaults.size = 'mini'; +$("input.bs-switch").bootstrapSwitch(); +</snip> + +This makes sure any checkboxes or radio buttons with the +class "bs-switch" will automatically be turned into +bootstrap switches. + +To apply bootstrap-switch to your checkboxes you need to +a) give them the class bs-switch +b) either make bootstrap_switch a dependency of your module (config.json) + or, as a "soft dependency", just call + Module::isAvailable('boostrap_switch') + somewhere in your code. If bootstrap_switch is not activated, your + page will still load and show old fashioned checkboxes
\ No newline at end of file |