Skip to content

Commit

Permalink
v3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuele Marchi committed Dec 17, 2014
1 parent 44a5942 commit 1e8b18c
Show file tree
Hide file tree
Showing 26 changed files with 88 additions and 113 deletions.
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bootstrap-switch",
"description": "Turn checkboxes and radio buttons in toggle switches.",
"version": "3.2.2",
"version": "3.3.0",
"main": [
"./dist/js/bootstrap-switch.js",
"./dist/css/bootstrap3/bootstrap-switch.css"
Expand All @@ -23,7 +23,7 @@
"jquery": ">=1.9.0"
},
"devDependencies": {
"jquery": "~2.1.1",
"bootstrap": "~3.2.0"
"jquery": "~2.1",
"bootstrap": "~3.3"
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "components/bootstrap-switch",
"description": "Turn checkboxes and radio buttons in toggle switches.",
"version": "3.2.2",
"version": "3.3.0",
"type": "component",
"keywords": [
"bootstrap",
Expand Down
2 changes: 1 addition & 1 deletion dist/css/bootstrap2/bootstrap-switch.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* bootstrap-switch - v3.2.2
* bootstrap-switch - v3.3.0
* http://www.bootstrap-switch.org
* ========================================================================
* Copyright 2012-2013 Mattia Larentis
Expand Down
2 changes: 1 addition & 1 deletion dist/css/bootstrap2/bootstrap-switch.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/css/bootstrap3/bootstrap-switch.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* bootstrap-switch - v3.2.2
* bootstrap-switch - v3.3.0
* http://www.bootstrap-switch.org
* ========================================================================
* Copyright 2012-2013 Mattia Larentis
Expand Down
4 changes: 2 additions & 2 deletions dist/css/bootstrap3/bootstrap-switch.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/bootstrap-switch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* bootstrap-switch - v3.2.2
* bootstrap-switch - v3.3.0
* http://www.bootstrap-switch.org
* ========================================================================
* Copyright 2012-2013 Mattia Larentis
Expand Down
2 changes: 1 addition & 1 deletion dist/js/bootstrap-switch.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions docs/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ body {
text-align: center;
}

.old-version {
color: #ccc;
text-decoration: line-through;
}

#github {
display: none;
position: fixed;
Expand Down
17 changes: 3 additions & 14 deletions docs/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,10 @@ $(function() {
}
});

// download switch
$('input[name="download-version"]').on({
'init.bootstrapSwitch': function() {
$('#download-' + ($(this).is(':checked') ? '2' : '3')).hide();
},
'switchChange.bootstrapSwitch': function(event, state) {
$('#download-3')[state ? 'show' : 'hide']();
$('#download-2')[state ? 'hide' : 'show']();
}
});

// initialize all the inputs
$('input[type="checkbox"], input[type="radio"]:not("#switch-create-destroy, #switch-modal")').bootstrapSwitch();
$('input[type="checkbox"], input[type="radio"]')
.not("[data-switch-no-init]")
.bootstrapSwitch();

$('[data-switch-get]').on("click", function() {
var type = $(this).data('switch-get');
Expand Down Expand Up @@ -66,6 +57,4 @@ $(function() {
$createDestroy.bootstrapSwitch(isSwitch ? 'destroy' : null);
$(this).button(isSwitch ? 'reset' : 'destroy');
});

$('#modal-switch');
});
4 changes: 2 additions & 2 deletions documentation-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
<ul class="nav navbar-nav">
<li class="dropdown"><a href="#" data-toggle="dropdown">Download<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/master.zip">3 (Stable)</a></li>
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/master.zip">3</a></li>
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/v2.0.1.zip">2.0.1 (Legacy)</a></li>
</ul>
</li>
<li><a href="index.html">Start</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 class="dropdown-header">Version 3 (Stable)</li>
<li class="dropdown-header">Version 3</li>
<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>
Expand Down
6 changes: 3 additions & 3 deletions events-3.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
<ul class="nav navbar-nav">
<li class="dropdown"><a href="#" data-toggle="dropdown">Download<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/master.zip">3 (Stable)</a></li>
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/master.zip">3</a></li>
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/v2.0.1.zip">2.0.1 (Legacy)</a></li>
</ul>
</li>
<li><a href="index.html">Start</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 class="dropdown-header">Version 3 (Stable)</li>
<li class="dropdown-header">Version 3</li>
<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>
Expand All @@ -59,7 +59,7 @@
</div>
</header>
<div class="container content">
<h1 class="page-header">Events &nbsp;<small>Version 3 (Stable)</small></h1>
<h1 class="page-header">Events &nbsp;<small>Version 3</small></h1>
<p>
All the events are namespaced, therefore always append <code>.bootstrapSwitch</code> when you
attach your handlers.<br>
Expand Down
6 changes: 3 additions & 3 deletions examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
<ul class="nav navbar-nav">
<li class="dropdown"><a href="#" data-toggle="dropdown">Download<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/master.zip">3 (Stable)</a></li>
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/master.zip">3</a></li>
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/v2.0.1.zip">2.0.1 (Legacy)</a></li>
</ul>
</li>
<li><a href="index.html">Start</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 class="dropdown-header">Version 3 (Stable)</li>
<li class="dropdown-header">Version 3</li>
<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>
Expand Down Expand Up @@ -232,7 +232,7 @@ <h2 class="h4">Label Width</h2>
<div class="col-sm-6 col-lg-4">
<h2 class="h4">Create | Destroy</h2>
<p>
<input id="switch-create-destroy" type="checkbox" checked>
<input id="switch-create-destroy" type="checkbox" checked data-switch-no-init>
</p>
<div class="row">
<div class="col-sm-6">
Expand Down
7 changes: 6 additions & 1 deletion gulpfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ karmaConfig = require './karma.json'
pkg = require './package.json'
name = pkg.name

cleanCss = require 'less-plugin-clean-css'
cleanCss = new cleanCss advanced: true

paths =
src: 'src'
dist: 'dist'
Expand All @@ -14,6 +17,7 @@ paths =
server =
host: 'localhost'
port: 3000

banner = """
/* ========================================================================
* <%= pkg.name %> - v<%= pkg.version %>
Expand Down Expand Up @@ -65,7 +69,7 @@ gulp.task 'less-bootstrap2', ->
.pipe $.header banner, pkg: pkg
.pipe $.rename basename: name
.pipe gulp.dest "#{paths.dist}/css/bootstrap2"
.pipe $.less compress: true, cleancss: true
.pipe $.less plugins: [cleanCss]
.pipe $.header banner, pkg: pkg
.pipe $.rename suffix: '.min'
.pipe gulp.dest "#{paths.dist}/css/bootstrap2"
Expand Down Expand Up @@ -121,6 +125,7 @@ gulp.task 'watch', ['connect'], ->
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('package.json', ['dist']).on 'change', -> pkg = require './package.json'
gulp.watch [
"#{paths.dist}/js/**/*.js"
"#{paths.dist}/css/**/*.css"
Expand Down
Loading

0 comments on commit 1e8b18c

Please sign in to comment.