Emanuele Marchi 10 vuotta sitten
vanhempi
commit
ec69b5dd91

+ 3 - 0
.bowerrc

@@ -0,0 +1,3 @@
+{
+  "directory": "components"
+}

+ 1 - 1
.gitignore

@@ -1,5 +1,5 @@
 .grunt
 npm-debug.log
 node_modules
-bower_components
+components
 .DS_Store

+ 5 - 0
CHANGELOG.md

@@ -1,5 +1,10 @@
 # Changelog
 
+## 3.3.2
+
+- Fix for Flicker on initialisation [#425](https://github.com/nostalgiaz/bootstrap-switch/issues/425), [#422](https://github.com/nostalgiaz/bootstrap-switch/issues/422)
+- Prevent horizontal misalignment inside modal in page with odd width [#414](https://github.com/nostalgiaz/bootstrap-switch/issues/414)
+
 ## 3.3.1
 
 - Revert of switchChange event triggered only on falsy skip [#411](https://github.com/nostalgiaz/bootstrap-switch/issues/411)

+ 1 - 1
bower.json

@@ -1,7 +1,7 @@
 {
   "name": "bootstrap-switch",
   "description": "Turn checkboxes and radio buttons in toggle switches.",
-  "version": "3.3.1",
+  "version": "3.3.2",
   "main": [
     "./dist/js/bootstrap-switch.js",
     "./dist/css/bootstrap3/bootstrap-switch.css"

+ 1 - 1
composer.json

@@ -1,7 +1,7 @@
 {
   "name": "components/bootstrap-switch",
   "description": "Turn checkboxes and radio buttons in toggle switches.",
-  "version": "3.3.1",
+  "version": "3.3.2",
   "type": "component",
   "keywords": [
     "bootstrap",

+ 1 - 1
dist/css/bootstrap2/bootstrap-switch.css

@@ -1,5 +1,5 @@
 /* ========================================================================
- * bootstrap-switch - v3.3.1
+ * bootstrap-switch - v3.3.2
  * http://www.bootstrap-switch.org
  * ========================================================================
  * Copyright 2012-2013 Mattia Larentis

+ 1 - 1
dist/css/bootstrap2/bootstrap-switch.min.css

@@ -1,5 +1,5 @@
 /* ========================================================================
- * bootstrap-switch - v3.3.1
+ * bootstrap-switch - v3.3.2
  * http://www.bootstrap-switch.org
  * ========================================================================
  * Copyright 2012-2013 Mattia Larentis

+ 1 - 1
dist/css/bootstrap3/bootstrap-switch.css

@@ -1,5 +1,5 @@
 /* ========================================================================
- * bootstrap-switch - v3.3.1
+ * bootstrap-switch - v3.3.2
  * http://www.bootstrap-switch.org
  * ========================================================================
  * Copyright 2012-2013 Mattia Larentis

+ 1 - 1
dist/css/bootstrap3/bootstrap-switch.min.css

@@ -1,5 +1,5 @@
 /* ========================================================================
- * bootstrap-switch - v3.3.1
+ * bootstrap-switch - v3.3.2
  * http://www.bootstrap-switch.org
  * ========================================================================
  * Copyright 2012-2013 Mattia Larentis

+ 1 - 1
dist/js/bootstrap-switch.js

@@ -1,5 +1,5 @@
 /* ========================================================================
- * bootstrap-switch - v3.3.1
+ * bootstrap-switch - v3.3.2
  * http://www.bootstrap-switch.org
  * ========================================================================
  * Copyright 2012-2013 Mattia Larentis

+ 1 - 1
dist/js/bootstrap-switch.min.js

@@ -1,5 +1,5 @@
 /* ========================================================================
- * bootstrap-switch - v3.3.1
+ * bootstrap-switch - v3.3.2
  * http://www.bootstrap-switch.org
  * ========================================================================
  * Copyright 2012-2013 Mattia Larentis

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 3
docs/css/bootstrap.min.css


+ 8 - 15
docs/css/main.css

@@ -2,28 +2,24 @@ body {
   font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
   padding-bottom: 50px;
 }
-
 .bs-docs-masthead,
 .bs-docs-header {
   color: #cdbfe3;
-  text-shadow: 0 1px 0 rgba(0,0,0,.1);
+  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
   background-color: #6f5499;
-  background-image: -webkit-gradient(linear,left top,left bottom,from(#563d7c),to(#6f5499));
-  background-image:-webkit-linear-gradient(top,#563d7c 0,#6f5499 100%);
-  background-image:-o-linear-gradient(top,#563d7c 0,#6f5499 100%);
-  background-image:linear-gradient(to bottom,#563d7c 0,#6f5499 100%);
-  filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#563d7c', endColorstr='#6F5499', GradientType=0);
-  background-repeat:repeat-x
-}
-
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#563d7c), to(#6f5499));
+  background-image: -webkit-linear-gradient(top, #563d7c 0, #6f5499 100%);
+  background-image: -o-linear-gradient(top, #563d7c 0, #6f5499 100%);
+  background-image: linear-gradient(to bottom, #563d7c 0, #6f5499 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#563d7c', endColorstr='#6F5499', GradientType=0);
+  background-repeat: repeat-x;
+}
 .bs-docs-masthead h1 {
   font-weight: 500;
 }
-
 .page-header {
   text-align: left;
 }
-
 #github {
   display: none;
   position: fixed;
@@ -33,7 +29,6 @@ body {
   right: 0;
   z-index: 2000;
 }
-
 .bottom {
   border-top: 1px solid #eee;
   margin-top: 40px;
@@ -41,11 +36,9 @@ body {
   padding-bottom: 20px;
   text-align: center;
 }
-
 .hljs {
   background-color: transparent;
 }
-
 @media (min-width: 768px) {
   #github {
     display: block;

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
docs/js/bootstrap.min.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 1
docs/js/jquery.min.js


+ 59 - 58
docs/js/main.js

@@ -1,60 +1,61 @@
-$(function() {
-  var $window = $(window);
-  var sectionTop = $('.top').outerHeight() + 20;
-  var $createDestroy = $('#switch-create-destroy');
-
-  // initialize highlight.js
-  hljs.initHighlightingOnLoad();
-
-  // navigation
-  $('a[href*="#"]').on('click', function(event) {
-    event.preventDefault();
-    var $target = $($(this).attr('href').slice('#'));
-
-    if ($target.length) {
-      $window.scrollTop($target.offset().top - sectionTop);
-    }
-  });
-
-  // initialize all the inputs
-  $('input[type="checkbox"], input[type="radio"]')
-  .not("[data-switch-no-init]")
-  .bootstrapSwitch();
-
-  $('[data-switch-get]').on("click", function() {
-    var type = $(this).data('switch-get');
-
-    alert($('#switch-' + type).bootstrapSwitch(type));
-  });
-
-  $('[data-switch-set]').on('click', function() {
-    var type = $(this).data('switch-set');
-
-    $('#switch-' + type).bootstrapSwitch(type, $(this).data('switch-value'));
+(function() {
+  var $confirm;
+
+  $confirm = null;
+
+  $(function() {
+    var $createDestroy, $window, sectionTop;
+    $window = $(window);
+    sectionTop = $(".top").outerHeight() + 20;
+    $createDestroy = $("#switch-create-destroy");
+    hljs.initHighlightingOnLoad();
+    $("a[href*=\"#\"]").on("click", function(event) {
+      var $target;
+      event.preventDefault();
+      $target = $($(this).attr("href").slice("#"));
+      if ($target.length) {
+        return $window.scrollTop($target.offset().top - sectionTop);
+      }
+    });
+    $("input[type=\"checkbox\"], input[type=\"radio\"]").not("[data-switch-no-init]").bootstrapSwitch();
+    $("[data-switch-get]").on("click", function() {
+      var type;
+      type = $(this).data("switch-get");
+      return alert($("#switch-" + type).bootstrapSwitch(type));
+    });
+    $("[data-switch-set]").on("click", function() {
+      var type;
+      type = $(this).data("switch-set");
+      return $("#switch-" + type).bootstrapSwitch(type, $(this).data("switch-value"));
+    });
+    $("[data-switch-toggle]").on("click", function() {
+      var type;
+      type = $(this).data("switch-toggle");
+      return $("#switch-" + type).bootstrapSwitch("toggle" + type.charAt(0).toUpperCase() + type.slice(1));
+    });
+    $("[data-switch-set-value]").on("input", function(event) {
+      var type, value;
+      event.preventDefault();
+      type = $(this).data("switch-set-value");
+      value = $.trim($(this).val());
+      if ($(this).data("value") === value) {
+        return;
+      }
+      return $("#switch-" + type).bootstrapSwitch(type, value);
+    });
+    $("[data-switch-create-destroy]").on("click", function() {
+      var isSwitch;
+      isSwitch = $createDestroy.data("bootstrap-switch");
+      $createDestroy.bootstrapSwitch((isSwitch ? "destroy" : null));
+      return $(this).button((isSwitch ? "reset" : "destroy"));
+    });
+    return $confirm = $("#confirm").bootstrapSwitch({
+      size: "large",
+      onSwitchChange: function(event, state) {
+        event.preventDefault();
+        return console.log(state, event.isDefaultPrevented());
+      }
+    });
   });
 
-  $('[data-switch-toggle]').on('click', function() {
-    var type = $(this).data('switch-toggle');
-
-    $('#switch-' + type).bootstrapSwitch('toggle' + type.charAt(0).toUpperCase() + type.slice(1));
-  });
-
-  $('[data-switch-set-value]').on('input', function(event) {
-    event.preventDefault();
-    var type = $(this).data('switch-set-value');
-    var value = $.trim($(this).val());
-
-    if ($(this).data('value') == value) {
-      return;
-    }
-
-    $('#switch-' + type).bootstrapSwitch(type, value);
-  });
-
-  $('[data-switch-create-destroy]').on('click', function() {
-    var isSwitch = $createDestroy.data('bootstrap-switch');
-
-    $createDestroy.bootstrapSwitch(isSwitch ? 'destroy' : null);
-    $(this).button(isSwitch ? 'reset' : 'destroy');
-  });
-});
+}).call(this);

+ 0 - 108
events-3.html

@@ -1,108 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta name="description" content="Turn checkboxes and radio buttons in toggle switches.">
-    <meta name="author" content="Mattia Larentis, Emanuele Marchi and Peter Stein">
-    <title>Bootstrap Switch · Turn checkboxes and radio buttons in toggle switches</title>
-    <link href="docs/css/bootstrap.min.css" rel="stylesheet">
-    <link href="docs/css/highlight.css" rel="stylesheet">
-    <link href="dist/css/bootstrap3/bootstrap-switch.css" rel="stylesheet">
-    <link href="docs/css/main.css" rel="stylesheet">
-    <link href="http://getbootstrap.com/assets/css/docs.min.css" rel="stylesheet">
-    <script>
-      var _gaq = _gaq || [];
-      _gaq.push(['_setAccount', 'UA-43092768-1']);
-      _gaq.push(['_trackPageview']);
-      (function () {
-        var ga = document.createElement('script');
-        ga.type = 'text/javascript';
-        ga.async = true;
-        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-        var s = document.getElementsByTagName('script')[0];
-        s.parentNode.insertBefore(ga, s);
-      })();
-    </script>
-  </head>
-  <body><a href="https://github.com/nostalgiaz/bootstrap-switch" id="github"><img src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>
-    <header role="banner" class="navbar navbar-static-top bs-docs-nav">
-      <div class="container">
-        <div class="navbar-header">
-          <button type="button" data-toggle="collapse" data-target="#collapse" class="navbar-toggle"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><a href="../" class="navbar-brand">Bootstrap Switch</a>
-        </div>
-        <nav id="collapse" role="navigation" class="collapse navbar-collapse bs-navbar-collapse">
-          <ul class="nav navbar-nav">
-            <li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/master.zip" data-toggle="dropdown">Download</a></li>
-            <li><a href="examples.html">Examples</a></li>
-            <li class="dropdown"><a href="#" data-toggle="dropdown">Documentation<span class="caret"></span></a>
-              <ul class="dropdown-menu">
-                <li><a href="/options-3.html">Options</a></li>
-                <li><a href="/methods-3.html">Methods</a></li>
-                <li><a href="/events-3.html">Events</a></li>
-                <li class="dropdown-divider"></li>
-                <li><a href="/documentation-2.html">Documentation (v2.0.1)</a></li>
-              </ul>
-            </li>
-            <li><a href="https://github.com/nostalgiaz/bootstrap-switch/issues">Bug reports</a></li>
-          </ul>
-        </nav>
-      </div>
-    </header>
-    <main id="content" role="main">
-      <div id="content" class="bs-docs-header">
-        <div class="container">
-          <h1>Events</h1>
-        </div>
-      </div>
-      <div class="container">
-        <p>
-          All the events are namespaced, therefore always append <code>.bootstrapSwitch</code> when you
-          attach your handlers.<br>
-          You can register to the emitted events as follow:
-        </p>
-        <pre><code>$('input[name="my-checkbox"]').on('switchChange.bootstrapSwitch', function(event, state) {
-  console.log(this); // DOM element
-  console.log(event); // jQuery event
-  console.log(state); // true | false
-});</code></pre>
-        <table class="table table-bordered table-striped table-responsive">
-          <thead>
-            <tr>
-              <th>Name</th>
-              <th>Description</th>
-              <th>Parameters</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>init</td>
-              <td>Triggered on initialization. 'this' refers to the DOM element.</td>
-              <td>event (<a href="https://api.jquery.com/category/events/event-object/" target="_blank">jQuery Event object</a>)</td>
-            </tr>
-            <tr>
-              <td>switchChange</td>
-              <td>Triggered on switch state change. 'this' refers to the DOM element.</td>
-              <td>
-                event (<a href="https://api.jquery.com/category/events/event-object/" target="_blank">jQuery Event object</a>),
-                state (true | false)
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-    </main>
-    <footer class="bs-docs-footer">
-      <div class="container">
-        <p>Code licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License, Version 2.0</a><br>Created by <a href="https://github.com/nostalgiaz" target="_blank">Mattia Larentis</a><br>Mantained by <a href="https://github.com/lostcrew" target="_blank">Emanuele Marchi</a>
-        </p>
-      </div>
-    </footer>
-    <script src="docs/js/jquery.min.js"></script>
-    <script src="docs/js/bootstrap.min.js"></script>
-    <script src="docs/js/highlight.js"></script>
-    <script src="dist/js/bootstrap-switch.js"></script>
-    <script src="docs/js/main.js"></script>
-  </body>
-</html>

+ 0 - 4
examples.html

@@ -270,10 +270,6 @@
               </div>
             </div>
           </div>
-          <hr>
-          <p class="form-group">
-            <input type="checkbox">
-          </p>
         </div>
       </div>
     </main>

+ 112 - 30
gulpfile.coffee

@@ -10,10 +10,47 @@ cleanCss = require 'less-plugin-clean-css'
 cleanCss = new cleanCss advanced: true
 
 paths =
+  base: './'
   src: 'src'
   dist: 'dist'
   test: 'test'
-  docs: "./"
+  docs: "docs"
+  components: "components"
+
+src =
+  scripts: "#{paths.src}/coffee/#{name}.coffee"
+  stylesheets:
+    bootstrap2: "#{paths.src}/less/bootstrap2/build.less"
+    bootstrap3: "#{paths.src}/less/bootstrap3/build.less"
+  test: "#{paths.src}/coffee/#{name}.tests.coffee"
+  docs:
+    vendor:
+      scripts: [
+        "#{paths.components}/jquery/dist/jquery.min.js"
+        "#{paths.components}/bootstrap/dist/js/bootstrap.min.js"
+        "#{paths.src}/docs/js/*.js"
+      ]
+      stylesheets: [
+        "#{paths.components}/bootstrap/dist/css/bootstrap.min.css"
+        "#{paths.src}/docs/css/*.css"
+      ]
+      fonts: "#{paths.components}/bootstrap/dist/fonts/*"
+    scripts: "#{paths.src}/docs/coffee/main.coffee"
+    stylesheets: "#{paths.src}/docs/less/main.less"
+    markup: "#{paths.src}/docs/jade/*.jade"
+
+dest =
+  scripts: "#{paths.dist}/js"
+  stylesheets:
+    bootstrap2: "#{paths.dist}/css/bootstrap2"
+    bootstrap3: "#{paths.dist}/css/bootstrap3"
+  test: paths.test
+  docs:
+    scripts: "#{paths.docs}/js"
+    stylesheets: "#{paths.docs}/css"
+    fonts: "#{paths.docs}/fonts"
+    markup: paths.base
+
 server =
   host: 'localhost'
   port: 3000
@@ -43,71 +80,107 @@ banner = """
 
   """
 
+
+# build
 gulp.task 'coffee', ->
   gulp
-  .src "#{paths.src}/coffee/#{name}.coffee"
-  .pipe $.changed "#{paths.dist}/js"
+  .src src.scripts
+  .pipe $.changed dest.scripts
   .pipe $.coffeelint 'coffeelint.json'
   .pipe $.coffeelint.reporter()
   .pipe $.coffeelint.reporter("fail")
   .pipe $.coffee()
     .on 'error', $.util.log
   .pipe $.header banner, pkg: pkg
-  .pipe gulp.dest "#{paths.dist}/js"
-  .pipe gulp.dest paths.test
+  .pipe gulp.dest dest.scripts
+  .pipe gulp.dest dest.test
   .pipe $.uglify()
   .pipe $.header banner, pkg: pkg
   .pipe $.rename suffix: '.min'
-  .pipe gulp.dest "#{paths.dist}/js"
+  .pipe gulp.dest dest.scripts
 
 gulp.task 'less-bootstrap2', ->
   gulp
-  .src "#{paths.src}/less/bootstrap2/build.less"
-  .pipe $.changed "#{paths.dist}/css/bootstrap2"
+  .src src.stylesheets.bootstrap2
+  .pipe $.changed dest.stylesheets.bootstrap2
   .pipe $.less()
     .on 'error', $.util.log
   .pipe $.header banner, pkg: pkg
   .pipe $.rename basename: name
-  .pipe gulp.dest "#{paths.dist}/css/bootstrap2"
+  .pipe gulp.dest dest.stylesheets.bootstrap2
   .pipe $.less plugins: [cleanCss]
   .pipe $.header banner, pkg: pkg
   .pipe $.rename suffix: '.min'
-  .pipe gulp.dest "#{paths.dist}/css/bootstrap2"
+  .pipe gulp.dest dest.stylesheets.bootstrap2
 
 gulp.task 'less-bootstrap3', ->
   gulp
-  .src "#{paths.src}/less/bootstrap3/build.less"
-  .pipe $.changed "#{paths.dist}/css/bootstrap3"
+  .src src.stylesheets.bootstrap3
+  .pipe $.changed dest.stylesheets.bootstrap3
   .pipe $.less()
   .pipe $.header banner, pkg: pkg
   .pipe $.rename basename: name
-  .pipe gulp.dest "#{paths.dist}/css/bootstrap3"
+  .pipe gulp.dest dest.stylesheets.bootstrap3
   .pipe $.less compress: true, cleancss: true
   .pipe $.header banner, pkg: pkg
   .pipe $.rename suffix: '.min'
-  .pipe gulp.dest "#{paths.dist}/css/bootstrap3"
+  .pipe gulp.dest dest.stylesheets.bootstrap3
+
+# docs
+vendorTask = (name) ->
+  return ->
+    gulp
+    .src src.docs.vendor[name]
+    .pipe $.changed dest.docs[name]
+    .pipe gulp.dest dest.docs[name]
+
+gulp.task 'docs-vendor-scripts', vendorTask 'scripts'
 
-gulp.task 'docs', ->
+gulp.task 'docs-vendor-stylesheets', vendorTask 'stylesheets'
+
+gulp.task 'docs-vendor-fonts', vendorTask 'fonts'
+
+gulp.task 'docs-coffee', ->
   gulp
-  .src "#{paths.src}/docs/*.jade"
-  .pipe $.changed paths.docs
+  .src src.docs.scripts
+  .pipe $.changed dest.docs.scripts
+  .pipe $.coffeelint 'coffeelint.json'
+  .pipe $.coffeelint.reporter()
+  .pipe $.coffeelint.reporter("fail")
+  .pipe $.coffee()
+    .on 'error', $.util.log
+  .pipe gulp.dest dest.docs.scripts
+
+gulp.task 'docs-less', ->
+  gulp
+  .src src.docs.stylesheets
+  .pipe $.changed dest.docs.stylesheets
+  .pipe $.less()
+  .pipe gulp.dest dest.docs.stylesheets
+
+gulp.task 'docs-jade', ->
+  gulp
+  .src src.docs.markup
+  .pipe $.changed dest.docs.markup
   .pipe $.jade pretty: true
-  .pipe gulp.dest paths.docs
+  .pipe gulp.dest dest.docs.markup
 
+# test
 gulp.task 'test-coffee', ['coffee'], ->
   gulp
-  .src "#{paths.src}/coffee/#{name}.tests.coffee"
-  .pipe $.changed paths.test
+  .src src.test
+  .pipe $.changed dest.test
   .pipe $.coffeelint 'coffeelint.json'
   .pipe $.coffeelint.reporter()
-    .on 'error', $.util.log
+  .pipe $.coffeelint.reporter("fail")
   .pipe $.coffee()
     .on 'error', $.util.log
-  .pipe gulp.dest paths.test
+  .pipe gulp.dest dest.test
 
 gulp.task 'test-go', ['test-coffee'], (done) ->
   karma.start extend(karmaConfig, singleRun: true), done
 
+# extra
 gulp.task 'connect', ['docs'], ->
   $.connect.server
     root: [__dirname]
@@ -120,23 +193,32 @@ gulp.task 'open', ['connect'], ->
   .src 'index.html'
   .pipe $.open '', url: "http://#{server.host}:#{server.port}"
 
+# watch
 gulp.task 'watch', ['connect'], ->
-  gulp.watch "#{paths.src}/coffee/#{name}.coffee", ['coffee']
-  gulp.watch "#{paths.src}/less/bootstrap2/*.less", ['less-bootstrap2']
-  gulp.watch "#{paths.src}/less/bootstrap3/*.less", ['less-bootstrap3']
-  gulp.watch "#{paths.src}/docs/*.jade", ['docs']
+  gulp.watch src.scripts, ['coffee']
+  gulp.watch src.stylesheets.bootstrap2, ['less-bootstrap2']
+  gulp.watch src.stylesheets.bootstrap3, ['less-bootstrap3']
+  gulp.watch src.docs.vendor.scripts, ['docs-vendor-scripts']
+  gulp.watch src.docs.vendor.stylesheets, ['docs-vendor-stylesheets']
+  gulp.watch src.docs.vendor.fonts, ['docs-vendor-fonts']
+  gulp.watch src.docs.scripts, ['docs-coffee']
+  gulp.watch src.docs.stylesheets, ['docs-less']
+  gulp.watch src.docs.markup, ['docs-jade']
+
   gulp.watch('package.json', ['dist']).on 'change', -> pkg = require './package.json'
   gulp.watch [
-    "#{paths.dist}/js/**/*.js"
-    "#{paths.dist}/css/**/*.css"
-    '*.html'
+    "#{dest.scripts}/*.js"
+    "#{dest.stylesheets.bootstrap2}/*.css"
+    "#{dest.stylesheets.bootstrap3}/*.css"
+    "*.html"
   ]
   .on 'change', (event) ->
     gulp.src event.path
     .pipe $.connect.reload()
 
-gulp.task 'server', ['connect', 'open', 'watch']
+gulp.task 'docs', ['docs-vendor-scripts', 'docs-vendor-stylesheets', 'docs-vendor-fonts', 'docs-coffee', 'docs-less', 'docs-jade']
 gulp.task 'less', ['less-bootstrap2', 'less-bootstrap3']
 gulp.task 'dist', ['coffee', 'less']
 gulp.task 'test', ['coffee', 'test-coffee', 'test-go']
+gulp.task 'server', ['connect', 'open', 'watch']
 gulp.task 'default', ['dist', 'docs', 'server']

+ 1 - 1
index.html

@@ -64,7 +64,7 @@
             <iframe src="http://ghbtns.com/github-btn.html?user=nostalgiaz&amp;repo=bootstrap-switch&amp;type=watch&amp;count=true&amp;size=large" allowtransparency="true" frameborder="0" scrolling="0" width="184" height="30"></iframe>
             <iframe src="http://ghbtns.com/github-btn.html?user=nostalgiaz&amp;repo=bootstrap-switch&amp;type=fork&amp;count=true&amp;size=large" allowtransparency="true" frameborder="0" scrolling="0" width="144" height="30"></iframe>
           </p><br>
-          <p class="version">Currently v3.3.1 · Compatible with Bootstrap 2 and 3</p>
+          <p class="version">Currently v3.3.2 · Compatible with Bootstrap 2 and 3</p>
         </div>
       </div>
       <div class="container">

+ 0 - 123
methods-3.html

@@ -1,123 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta name="description" content="Turn checkboxes and radio buttons in toggle switches.">
-    <meta name="author" content="Mattia Larentis, Emanuele Marchi and Peter Stein">
-    <title>Bootstrap Switch · Turn checkboxes and radio buttons in toggle switches</title>
-    <link href="docs/css/bootstrap.min.css" rel="stylesheet">
-    <link href="docs/css/highlight.css" rel="stylesheet">
-    <link href="dist/css/bootstrap3/bootstrap-switch.css" rel="stylesheet">
-    <link href="docs/css/main.css" rel="stylesheet">
-    <link href="http://getbootstrap.com/assets/css/docs.min.css" rel="stylesheet">
-    <script>
-      var _gaq = _gaq || [];
-      _gaq.push(['_setAccount', 'UA-43092768-1']);
-      _gaq.push(['_trackPageview']);
-      (function () {
-        var ga = document.createElement('script');
-        ga.type = 'text/javascript';
-        ga.async = true;
-        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-        var s = document.getElementsByTagName('script')[0];
-        s.parentNode.insertBefore(ga, s);
-      })();
-    </script>
-  </head>
-  <body><a href="https://github.com/nostalgiaz/bootstrap-switch" id="github"><img src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>
-    <header role="banner" class="navbar navbar-static-top bs-docs-nav">
-      <div class="container">
-        <div class="navbar-header">
-          <button type="button" data-toggle="collapse" data-target="#collapse" class="navbar-toggle"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><a href="../" class="navbar-brand">Bootstrap Switch</a>
-        </div>
-        <nav id="collapse" role="navigation" class="collapse navbar-collapse bs-navbar-collapse">
-          <ul class="nav navbar-nav">
-            <li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/master.zip" data-toggle="dropdown">Download</a></li>
-            <li><a href="examples.html">Examples</a></li>
-            <li class="dropdown"><a href="#" data-toggle="dropdown">Documentation<span class="caret"></span></a>
-              <ul class="dropdown-menu">
-                <li><a href="/options-3.html">Options</a></li>
-                <li><a href="/methods-3.html">Methods</a></li>
-                <li><a href="/events-3.html">Events</a></li>
-                <li class="dropdown-divider"></li>
-                <li><a href="/documentation-2.html">Documentation (v2.0.1)</a></li>
-              </ul>
-            </li>
-            <li><a href="https://github.com/nostalgiaz/bootstrap-switch/issues">Bug reports</a></li>
-          </ul>
-        </nav>
-      </div>
-    </header>
-    <main id="content" role="main">
-      <div id="content" class="bs-docs-header">
-        <div class="container">
-          <h1>Options</h1>
-        </div>
-      </div>
-      <div class="container">
-        <p>In Bootstrap Switch, every option is also a method.</p>
-        <p>If the second parameter is omitted, the method return the current value.</p>
-        <p>You can invoke methods as follows:</p>
-        <pre><code>$('input[name="my-checkbox"]').bootstrapSwitch('state', true, true);</code></pre>
-        <h2>Additional Methods</h2>
-        <table class="table table-bordered table-striped table-responsive">
-          <thead>
-            <tr>
-              <th>Name</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>toggleState</td>
-              <td>Toggle the switch state</td>
-            </tr>
-            <tr>
-              <td>toggleAnimate</td>
-              <td>Toggle the animate option</td>
-            </tr>
-            <tr>
-              <td>toggleDisabled</td>
-              <td>Toggle the disabled state</td>
-            </tr>
-            <tr>
-              <td>toggleReadonly</td>
-              <td>Toggle the readonly state</td>
-            </tr>
-            <tr>
-              <td>toggleIndeterminate</td>
-              <td>Toggle the indeterminate state</td>
-            </tr>
-            <tr>
-              <td>toggleInverse</td>
-              <td>Toggle the inverse option</td>
-            </tr>
-            <tr>
-              <td>destroy</td>
-              <td>Destroy the instance of Bootstrap Switch</td>
-            </tr>
-          </tbody>
-        </table>
-        <h2>Special Behaviours</h2>
-        <ul>
-          <li>The method <code>state</code> can receive an optional third parameter <code>skip</code>. if true, <code>switchChange</code> event is not executed. The default is false.</li>
-          <li>The method <code>toggleState</code> can receive an optional second parameter <code>skip</code>. if true, <code>switchChange</code> event is not executed. The default is false.</li>
-          <li>The method <code>wrapperClass</code> can accepts a falsy value as second parameter. If so, it resets the class to its default.</li>
-        </ul>
-      </div>
-    </main>
-    <footer class="bs-docs-footer">
-      <div class="container">
-        <p>Code licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License, Version 2.0</a><br>Created by <a href="https://github.com/nostalgiaz" target="_blank">Mattia Larentis</a><br>Mantained by <a href="https://github.com/lostcrew" target="_blank">Emanuele Marchi</a>
-        </p>
-      </div>
-    </footer>
-    <script src="docs/js/jquery.min.js"></script>
-    <script src="docs/js/bootstrap.min.js"></script>
-    <script src="docs/js/highlight.js"></script>
-    <script src="dist/js/bootstrap-switch.js"></script>
-    <script src="docs/js/main.js"></script>
-  </body>
-</html>

+ 0 - 248
options-3.html

@@ -1,248 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta name="description" content="Turn checkboxes and radio buttons in toggle switches.">
-    <meta name="author" content="Mattia Larentis, Emanuele Marchi and Peter Stein">
-    <title>Bootstrap Switch · Turn checkboxes and radio buttons in toggle switches</title>
-    <link href="docs/css/bootstrap.min.css" rel="stylesheet">
-    <link href="docs/css/highlight.css" rel="stylesheet">
-    <link href="dist/css/bootstrap3/bootstrap-switch.css" rel="stylesheet">
-    <link href="docs/css/main.css" rel="stylesheet">
-    <link href="http://getbootstrap.com/assets/css/docs.min.css" rel="stylesheet">
-    <script>
-      var _gaq = _gaq || [];
-      _gaq.push(['_setAccount', 'UA-43092768-1']);
-      _gaq.push(['_trackPageview']);
-      (function () {
-        var ga = document.createElement('script');
-        ga.type = 'text/javascript';
-        ga.async = true;
-        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-        var s = document.getElementsByTagName('script')[0];
-        s.parentNode.insertBefore(ga, s);
-      })();
-    </script>
-  </head>
-  <body><a href="https://github.com/nostalgiaz/bootstrap-switch" id="github"><img src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>
-    <header role="banner" class="navbar navbar-static-top bs-docs-nav">
-      <div class="container">
-        <div class="navbar-header">
-          <button type="button" data-toggle="collapse" data-target="#collapse" class="navbar-toggle"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><a href="../" class="navbar-brand">Bootstrap Switch</a>
-        </div>
-        <nav id="collapse" role="navigation" class="collapse navbar-collapse bs-navbar-collapse">
-          <ul class="nav navbar-nav">
-            <li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/master.zip" data-toggle="dropdown">Download</a></li>
-            <li><a href="examples.html">Examples</a></li>
-            <li class="dropdown"><a href="#" data-toggle="dropdown">Documentation<span class="caret"></span></a>
-              <ul class="dropdown-menu">
-                <li><a href="/options-3.html">Options</a></li>
-                <li><a href="/methods-3.html">Methods</a></li>
-                <li><a href="/events-3.html">Events</a></li>
-                <li class="dropdown-divider"></li>
-                <li><a href="/documentation-2.html">Documentation (v2.0.1)</a></li>
-              </ul>
-            </li>
-            <li><a href="https://github.com/nostalgiaz/bootstrap-switch/issues">Bug reports</a></li>
-          </ul>
-        </nav>
-      </div>
-    </header>
-    <main id="content" role="main">
-      <div id="content" class="bs-docs-header">
-        <div class="container">
-          <h1>Options</h1>
-        </div>
-      </div>
-      <div class="container">
-        <table class="table table-bordered table-striped table-responsive">
-          <thead>
-            <tr>
-              <th>Name</th>
-              <th>Attribute</th>
-              <th>Type</th>
-              <th>Description</th>
-              <th>Values</th>
-              <th>Default</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>state</td>
-              <td>checked</td>
-              <td>Boolean</td>
-              <td>The checkbox state</td>
-              <td>true, false</td>
-              <td>true</td>
-            </tr>
-            <tr>
-              <td>size</td>
-              <td>data-size</td>
-              <td>String</td>
-              <td>The checkbox size</td>
-              <td>null, 'mini', 'small', 'normal', 'large'</td>
-              <td>null</td>
-            </tr>
-            <tr>
-              <td>animate</td>
-              <td>data-animate</td>
-              <td>Boolean</td>
-              <td>Animate the switch</td>
-              <td>true, false</td>
-              <td>true</td>
-            </tr>
-            <tr>
-              <td>disabled</td>
-              <td>disabled</td>
-              <td>Boolean</td>
-              <td>Disable state</td>
-              <td>true, false</td>
-              <td>false</td>
-            </tr>
-            <tr>
-              <td>readonly</td>
-              <td>readonly</td>
-              <td>Boolean</td>
-              <td>Readonly state</td>
-              <td>true, false</td>
-              <td>false</td>
-            </tr>
-            <tr>
-              <td>indeterminate</td>
-              <td>data-indeterminate</td>
-              <td>Boolean</td>
-              <td>Indeterminate state</td>
-              <td>true, false</td>
-              <td>false</td>
-            </tr>
-            <tr>
-              <td>inverse</td>
-              <td>data-inverse</td>
-              <td>Boolean</td>
-              <td>Inverse switch direction</td>
-              <td>true, false</td>
-              <td>false</td>
-            </tr>
-            <tr>
-              <td>radioAllOff</td>
-              <td>data-radio-all-off</td>
-              <td>Boolean</td>
-              <td>Allow this radio button to be unchecked by the user</td>
-              <td>true, false</td>
-              <td>false</td>
-            </tr>
-            <tr>
-              <td>onColor</td>
-              <td>data-on-color</td>
-              <td>String</td>
-              <td>Color of the left side of the switch</td>
-              <td>'primary', 'info', 'success', 'warning', 'danger', 'default'</td>
-              <td>'primary'</td>
-            </tr>
-            <tr>
-              <td>offColor</td>
-              <td>data-off-color</td>
-              <td>String</td>
-              <td>Color of the right side of the switch</td>
-              <td>'primary', 'info', 'success', 'warning', 'danger', 'default'</td>
-              <td>'default'</td>
-            </tr>
-            <tr>
-              <td>onText</td>
-              <td>data-on-text</td>
-              <td>String</td>
-              <td>Text of the left side of the switch</td>
-              <td>String</td>
-              <td>'ON'</td>
-            </tr>
-            <tr>
-              <td>offText</td>
-              <td>data-off-text</td>
-              <td>String</td>
-              <td>Text of the right side of the switch</td>
-              <td>String</td>
-              <td>'OFF'</td>
-            </tr>
-            <tr>
-              <td>labelText</td>
-              <td>data-label-text</td>
-              <td>String</td>
-              <td>Text of the center handle of the switch</td>
-              <td>String</td>
-              <td>'&amp;nbsp;'</td>
-            </tr>
-            <tr>
-              <td>handleWidth</td>
-              <td>data-handle-width</td>
-              <td>String | Number</td>
-              <td>Width of the left and right sides in pixels</td>
-              <td>'auto' or Number</td>
-              <td>'auto'</td>
-            </tr>
-            <tr>
-              <td>labelWidth</td>
-              <td>data-label-width</td>
-              <td>String | Number</td>
-              <td>Width of the center handle in pixels</td>
-              <td>'auto' or Number</td>
-              <td>'auto'</td>
-            </tr>
-            <tr>
-              <td>baseClass</td>
-              <td>data-base-class</td>
-              <td>String</td>
-              <td>Global class prefix</td>
-              <td>String</td>
-              <td>'bootstrap-switch'</td>
-            </tr>
-            <tr>
-              <td>wrapperClass</td>
-              <td>data-wrapper-class</td>
-              <td>String | Array</td>
-              <td>Container element class(es)</td>
-              <td>String | Array</td>
-              <td>'wrapper'</td>
-            </tr>
-            <tr>
-              <td>onInit</td>
-              <td></td>
-              <td>Function</td>
-              <td>Callback function to execute on initialization</td>
-              <td>Function</td>
-              <td>
-                <pre><code class="javascript">function(event, state) {}</code></pre>
-              </td>
-            </tr>
-            <tr>
-              <td>onSwitchChange</td>
-              <td></td>
-              <td>Function</td>
-              <td>Callback function to execute on switch state change</td>
-              <td>Function</td>
-              <td>
-                <pre><code class="javascript">function(event, state) {}</code></pre>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-        <h2>Global Defaults Overriding</h2>
-        <p>Follow the jQuery convention to override the default options of the library. For instance:</p>
-        <pre><code>$.fn.bootstrapSwitch.defaults.size = 'large';
-$.fn.bootstrapSwitch.defaults.onColor = 'success';</code></pre>
-      </div>
-    </main>
-    <footer class="bs-docs-footer">
-      <div class="container">
-        <p>Code licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License, Version 2.0</a><br>Created by <a href="https://github.com/nostalgiaz" target="_blank">Mattia Larentis</a><br>Mantained by <a href="https://github.com/lostcrew" target="_blank">Emanuele Marchi</a>
-        </p>
-      </div>
-    </footer>
-    <script src="docs/js/jquery.min.js"></script>
-    <script src="docs/js/bootstrap.min.js"></script>
-    <script src="docs/js/highlight.js"></script>
-    <script src="dist/js/bootstrap-switch.js"></script>
-    <script src="docs/js/main.js"></script>
-  </body>
-</html>

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "bootstrap-switch",
   "description": "Turn checkboxes and radio buttons in toggle switches.",
-  "version": "3.3.1",
+  "version": "3.3.2",
   "keywords": [
     "bootstrap",
     "switch",

+ 50 - 0
src/docs/coffee/main.coffee

@@ -0,0 +1,50 @@
+$confirm = null
+
+$ ->
+  $window = $(window)
+  sectionTop = $(".top").outerHeight() + 20
+  $createDestroy = $("#switch-create-destroy")
+
+  # initialize highlight.js
+  hljs.initHighlightingOnLoad()
+
+  # navigation
+  $("a[href*=\"#\"]").on "click", (event) ->
+    event.preventDefault()
+    $target = $($(this).attr("href").slice("#"))
+    $window.scrollTop $target.offset().top - sectionTop  if $target.length
+
+
+  # initialize all the inputs
+  $("input[type=\"checkbox\"], input[type=\"radio\"]").not("[data-switch-no-init]").bootstrapSwitch()
+  $("[data-switch-get]").on "click", ->
+    type = $(this).data("switch-get")
+    alert $("#switch-" + type).bootstrapSwitch(type)
+
+  $("[data-switch-set]").on "click", ->
+    type = $(this).data("switch-set")
+    $("#switch-" + type).bootstrapSwitch type, $(this).data("switch-value")
+
+  $("[data-switch-toggle]").on "click", ->
+    type = $(this).data("switch-toggle")
+    $("#switch-" + type).bootstrapSwitch "toggle" + type.charAt(0).toUpperCase() + type.slice(1)
+
+  $("[data-switch-set-value]").on "input", (event) ->
+    event.preventDefault()
+    type = $(this).data("switch-set-value")
+    value = $.trim($(this).val())
+
+    return  if $(this).data("value") is value
+    $("#switch-" + type).bootstrapSwitch type, value
+
+  $("[data-switch-create-destroy]").on "click", ->
+    isSwitch = $createDestroy.data("bootstrap-switch")
+
+    $createDestroy.bootstrapSwitch (if isSwitch then "destroy" else null)
+    $(this).button (if isSwitch then "reset" else "destroy")
+
+  $confirm = $("#confirm").bootstrapSwitch
+    size: "large"
+    onSwitchChange: (event, state) ->
+      event.preventDefault()
+      console.log state, event.isDefaultPrevented()

+ 153 - 0
src/docs/css/highlight.css

@@ -0,0 +1,153 @@
+/*
+
+Original style from softwaremaniacs.org (c) Ivan Sagalaev <[email protected]>
+
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  background: #F0F0F0;
+}
+
+.hljs,
+.hljs-subst,
+.hljs-tag .hljs-title,
+.lisp .hljs-title,
+.clojure .hljs-built_in,
+.nginx .hljs-title {
+  color: black;
+}
+
+.hljs-string,
+.hljs-title,
+.hljs-constant,
+.hljs-parent,
+.hljs-tag .hljs-value,
+.hljs-rules .hljs-value,
+.hljs-rules .hljs-value .hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.haml .hljs-symbol,
+.ruby .hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.hljs-aggregate,
+.hljs-template_tag,
+.django .hljs-variable,
+.smalltalk .hljs-class,
+.hljs-addition,
+.hljs-flow,
+.hljs-stream,
+.bash .hljs-variable,
+.apache .hljs-tag,
+.apache .hljs-cbracket,
+.tex .hljs-command,
+.tex .hljs-special,
+.erlang_repl .hljs-function_or_atom,
+.asciidoc .hljs-header,
+.markdown .hljs-header,
+.coffeescript .hljs-attribute {
+  color: #800;
+}
+
+.smartquote,
+.hljs-comment,
+.hljs-annotation,
+.hljs-template_comment,
+.diff .hljs-header,
+.hljs-chunk,
+.asciidoc .hljs-blockquote,
+.markdown .hljs-blockquote {
+  color: #888;
+}
+
+.hljs-number,
+.hljs-date,
+.hljs-regexp,
+.hljs-literal,
+.hljs-hexcolor,
+.smalltalk .hljs-symbol,
+.smalltalk .hljs-char,
+.go .hljs-constant,
+.hljs-change,
+.lasso .hljs-variable,
+.makefile .hljs-variable,
+.asciidoc .hljs-bullet,
+.markdown .hljs-bullet,
+.asciidoc .hljs-link_url,
+.markdown .hljs-link_url {
+  color: #080;
+}
+
+.hljs-label,
+.hljs-javadoc,
+.ruby .hljs-string,
+.hljs-decorator,
+.hljs-filter .hljs-argument,
+.hljs-localvars,
+.hljs-array,
+.hljs-attr_selector,
+.hljs-important,
+.hljs-pseudo,
+.hljs-pi,
+.haml .hljs-bullet,
+.hljs-doctype,
+.hljs-deletion,
+.hljs-envvar,
+.hljs-shebang,
+.apache .hljs-sqbracket,
+.nginx .hljs-built_in,
+.tex .hljs-formula,
+.erlang_repl .hljs-reserved,
+.hljs-prompt,
+.asciidoc .hljs-link_label,
+.markdown .hljs-link_label,
+.vhdl .hljs-attribute,
+.clojure .hljs-attribute,
+.asciidoc .hljs-attribute,
+.lasso .hljs-attribute,
+.coffeescript .hljs-property,
+.hljs-phony {
+  color: #88F
+}
+
+.hljs-keyword,
+.hljs-id,
+.hljs-title,
+.hljs-built_in,
+.hljs-aggregate,
+.css .hljs-tag,
+.hljs-javadoctag,
+.hljs-phpdoc,
+.hljs-yardoctag,
+.smalltalk .hljs-class,
+.hljs-winutils,
+.bash .hljs-variable,
+.apache .hljs-tag,
+.go .hljs-typename,
+.tex .hljs-command,
+.asciidoc .hljs-strong,
+.markdown .hljs-strong,
+.hljs-request,
+.hljs-status {
+  font-weight: bold;
+}
+
+.asciidoc .hljs-emphasis,
+.markdown .hljs-emphasis {
+  font-style: italic;
+}
+
+.nginx .hljs-built_in {
+  font-weight: normal;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.lasso .markup,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}

+ 0 - 0
src/docs/documentation-2.jade → src/docs/jade/documentation-2.jade


+ 0 - 0
src/docs/events.jade → src/docs/jade/events.jade


+ 0 - 5
src/docs/examples.jade → src/docs/jade/examples.jade

@@ -183,8 +183,3 @@ block content
               .modal-title#modal-switch-label Title
             .modal-body
               input#switch-modal(type='checkbox', checked)
-
-      hr
-
-      p.form-group
-        input(type="checkbox")

+ 1 - 1
src/docs/index.jade → src/docs/jade/index.jade

@@ -20,7 +20,7 @@ block content
         iframe(src='http://ghbtns.com/github-btn.html?user=nostalgiaz&repo=bootstrap-switch&type=fork&count=true&size=large', allowtransparency='true', frameborder='0', scrolling='0', width='144', height='30')
       br
       p.version
-        | Currently v3.3.1 · Compatible with Bootstrap 2 and 3
+        | Currently v3.3.2 · Compatible with Bootstrap 2 and 3
 
   .container
     h2.page-header Getting Started

+ 0 - 0
src/docs/main.jade → src/docs/jade/main.jade


+ 0 - 0
src/docs/methods.jade → src/docs/jade/methods.jade


+ 0 - 0
src/docs/options.jade → src/docs/jade/options.jade


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
src/docs/js/highlight.js


+ 53 - 0
src/docs/less/main.less

@@ -0,0 +1,53 @@
+body {
+  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
+  padding-bottom: 50px;
+}
+
+.bs-docs-masthead,
+.bs-docs-header {
+  color: #cdbfe3;
+  text-shadow: 0 1px 0 rgba(0,0,0,.1);
+  background-color: #6f5499;
+  background-image: -webkit-gradient(linear,left top,left bottom,from(#563d7c),to(#6f5499));
+  background-image:-webkit-linear-gradient(top,#563d7c 0,#6f5499 100%);
+  background-image:-o-linear-gradient(top,#563d7c 0,#6f5499 100%);
+  background-image:linear-gradient(to bottom,#563d7c 0,#6f5499 100%);
+  filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#563d7c', endColorstr='#6F5499', GradientType=0);
+  background-repeat:repeat-x
+}
+
+.bs-docs-masthead h1 {
+  font-weight: 500;
+}
+
+.page-header {
+  text-align: left;
+}
+
+#github {
+  display: none;
+  position: fixed;
+  width: 150px;
+  height: 150px;
+  top: 0;
+  right: 0;
+  z-index: 2000;
+}
+
+.bottom {
+  border-top: 1px solid #eee;
+  margin-top: 40px;
+  padding-top: 20px;
+  padding-bottom: 20px;
+  text-align: center;
+}
+
+.hljs {
+  background-color: transparent;
+}
+
+@media (min-width: 768px) {
+  #github {
+    display: block;
+  }
+}

+ 1 - 1
test/bootstrap-switch.js

@@ -1,5 +1,5 @@
 /* ========================================================================
- * bootstrap-switch - v3.3.1
+ * bootstrap-switch - v3.3.2
  * http://www.bootstrap-switch.org
  * ========================================================================
  * Copyright 2012-2013 Mattia Larentis

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä