/* ======================================================================== * bootstrap-switch - v2.0.1 * http://www.bootstrap-switch.org * ======================================================================== * Copyright 2012-2013 Mattia Larentis * * ======================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ======================================================================== */ (function() { var __slice = [].slice; (function($, window) { "use strict"; var BootstrapSwitch; BootstrapSwitch = (function() { function BootstrapSwitch(element, option) { var _this = this; this.$element = $(element); this.$switchLeft = $("", { "class": function() { var cls, color; cls = "switch-left"; color = _this.$element.data("on-color"); if (color != null) { cls += " switch-" + color; } return cls; }, html: function() { var html, text; html = "ON"; text = _this.$element.data("on-text"); if (text != null) { html = text; } return html; } }); this.$switchRight = $("", { "class": function() { var cls, color; cls = "switch-right"; color = _this.$element.data("off-color"); if (color != null) { cls += " switch-" + color; } return cls; }, html: function() { var html, text; html = "OFF"; text = _this.$element.data("off-text"); if (text != null) { html = text; } return html; } }); this.$label = $("