Skip to content

Commit 1e8b18c

Browse files
author
Emanuele Marchi
committed
v3.3.0
1 parent 44a5942 commit 1e8b18c

26 files changed

+88
-113
lines changed

bower.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bootstrap-switch",
33
"description": "Turn checkboxes and radio buttons in toggle switches.",
4-
"version": "3.2.2",
4+
"version": "3.3.0",
55
"main": [
66
"./dist/js/bootstrap-switch.js",
77
"./dist/css/bootstrap3/bootstrap-switch.css"
@@ -23,7 +23,7 @@
2323
"jquery": ">=1.9.0"
2424
},
2525
"devDependencies": {
26-
"jquery": "~2.1.1",
27-
"bootstrap": "~3.2.0"
26+
"jquery": "~2.1",
27+
"bootstrap": "~3.3"
2828
}
2929
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "components/bootstrap-switch",
33
"description": "Turn checkboxes and radio buttons in toggle switches.",
4-
"version": "3.2.2",
4+
"version": "3.3.0",
55
"type": "component",
66
"keywords": [
77
"bootstrap",

dist/css/bootstrap2/bootstrap-switch.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ========================================================================
2-
* bootstrap-switch - v3.2.2
2+
* bootstrap-switch - v3.3.0
33
* http://www.bootstrap-switch.org
44
* ========================================================================
55
* Copyright 2012-2013 Mattia Larentis

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/bootstrap3/bootstrap-switch.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ========================================================================
2-
* bootstrap-switch - v3.2.2
2+
* bootstrap-switch - v3.3.0
33
* http://www.bootstrap-switch.org
44
* ========================================================================
55
* Copyright 2012-2013 Mattia Larentis

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

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/bootstrap-switch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ========================================================================
2-
* bootstrap-switch - v3.2.2
2+
* bootstrap-switch - v3.3.0
33
* http://www.bootstrap-switch.org
44
* ========================================================================
55
* Copyright 2012-2013 Mattia Larentis

dist/js/bootstrap-switch.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/css/main.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ body {
1717
text-align: center;
1818
}
1919

20-
.old-version {
21-
color: #ccc;
22-
text-decoration: line-through;
23-
}
24-
2520
#github {
2621
display: none;
2722
position: fixed;

docs/js/main.js

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,10 @@ $(function() {
1616
}
1717
});
1818

19-
// download switch
20-
$('input[name="download-version"]').on({
21-
'init.bootstrapSwitch': function() {
22-
$('#download-' + ($(this).is(':checked') ? '2' : '3')).hide();
23-
},
24-
'switchChange.bootstrapSwitch': function(event, state) {
25-
$('#download-3')[state ? 'show' : 'hide']();
26-
$('#download-2')[state ? 'hide' : 'show']();
27-
}
28-
});
29-
3019
// initialize all the inputs
31-
$('input[type="checkbox"], input[type="radio"]:not("#switch-create-destroy, #switch-modal")').bootstrapSwitch();
20+
$('input[type="checkbox"], input[type="radio"]')
21+
.not("[data-switch-no-init]")
22+
.bootstrapSwitch();
3223

3324
$('[data-switch-get]').on("click", function() {
3425
var type = $(this).data('switch-get');
@@ -66,6 +57,4 @@ $(function() {
6657
$createDestroy.bootstrapSwitch(isSwitch ? 'destroy' : null);
6758
$(this).button(isSwitch ? 'reset' : 'destroy');
6859
});
69-
70-
$('#modal-switch');
7160
});

documentation-2.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
<ul class="nav navbar-nav">
3737
<li class="dropdown"><a href="#" data-toggle="dropdown">Download<span class="caret"></span></a>
3838
<ul class="dropdown-menu">
39-
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/master.zip">3 (Stable)</a></li>
39+
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/master.zip">3</a></li>
4040
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/v2.0.1.zip">2.0.1 (Legacy)</a></li>
4141
</ul>
4242
</li>
4343
<li><a href="index.html">Start</a></li>
4444
<li><a href="examples.html">Examples</a></li>
4545
<li class="dropdown"><a href="#" data-toggle="dropdown">Documentation<span class="caret"></span></a>
4646
<ul class="dropdown-menu">
47-
<li class="dropdown-header">Version 3 (Stable)</li>
47+
<li class="dropdown-header">Version 3</li>
4848
<li><a href="/options-3.html">Options</a></li>
4949
<li><a href="/methods-3.html">Methods</a></li>
5050
<li><a href="/events-3.html">Events</a></li>

events-3.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
<ul class="nav navbar-nav">
3737
<li class="dropdown"><a href="#" data-toggle="dropdown">Download<span class="caret"></span></a>
3838
<ul class="dropdown-menu">
39-
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/master.zip">3 (Stable)</a></li>
39+
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/master.zip">3</a></li>
4040
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/v2.0.1.zip">2.0.1 (Legacy)</a></li>
4141
</ul>
4242
</li>
4343
<li><a href="index.html">Start</a></li>
4444
<li><a href="examples.html">Examples</a></li>
4545
<li class="dropdown"><a href="#" data-toggle="dropdown">Documentation<span class="caret"></span></a>
4646
<ul class="dropdown-menu">
47-
<li class="dropdown-header">Version 3 (Stable)</li>
47+
<li class="dropdown-header">Version 3</li>
4848
<li><a href="/options-3.html">Options</a></li>
4949
<li><a href="/methods-3.html">Methods</a></li>
5050
<li><a href="/events-3.html">Events</a></li>
@@ -59,7 +59,7 @@
5959
</div>
6060
</header>
6161
<div class="container content">
62-
<h1 class="page-header">Events &nbsp;<small>Version 3 (Stable)</small></h1>
62+
<h1 class="page-header">Events &nbsp;<small>Version 3</small></h1>
6363
<p>
6464
All the events are namespaced, therefore always append <code>.bootstrapSwitch</code> when you
6565
attach your handlers.<br>

examples.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
<ul class="nav navbar-nav">
3737
<li class="dropdown"><a href="#" data-toggle="dropdown">Download<span class="caret"></span></a>
3838
<ul class="dropdown-menu">
39-
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/master.zip">3 (Stable)</a></li>
39+
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/master.zip">3</a></li>
4040
<li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/v2.0.1.zip">2.0.1 (Legacy)</a></li>
4141
</ul>
4242
</li>
4343
<li><a href="index.html">Start</a></li>
4444
<li><a href="examples.html">Examples</a></li>
4545
<li class="dropdown"><a href="#" data-toggle="dropdown">Documentation<span class="caret"></span></a>
4646
<ul class="dropdown-menu">
47-
<li class="dropdown-header">Version 3 (Stable)</li>
47+
<li class="dropdown-header">Version 3</li>
4848
<li><a href="/options-3.html">Options</a></li>
4949
<li><a href="/methods-3.html">Methods</a></li>
5050
<li><a href="/events-3.html">Events</a></li>
@@ -232,7 +232,7 @@ <h2 class="h4">Label Width</h2>
232232
<div class="col-sm-6 col-lg-4">
233233
<h2 class="h4">Create | Destroy</h2>
234234
<p>
235-
<input id="switch-create-destroy" type="checkbox" checked>
235+
<input id="switch-create-destroy" type="checkbox" checked data-switch-no-init>
236236
</p>
237237
<div class="row">
238238
<div class="col-sm-6">

gulpfile.coffee

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ karmaConfig = require './karma.json'
66
pkg = require './package.json'
77
name = pkg.name
88

9+
cleanCss = require 'less-plugin-clean-css'
10+
cleanCss = new cleanCss advanced: true
11+
912
paths =
1013
src: 'src'
1114
dist: 'dist'
@@ -14,6 +17,7 @@ paths =
1417
server =
1518
host: 'localhost'
1619
port: 3000
20+
1721
banner = """
1822
/* ========================================================================
1923
* <%= pkg.name %> - v<%= pkg.version %>
@@ -65,7 +69,7 @@ gulp.task 'less-bootstrap2', ->
6569
.pipe $.header banner, pkg: pkg
6670
.pipe $.rename basename: name
6771
.pipe gulp.dest "#{paths.dist}/css/bootstrap2"
68-
.pipe $.less compress: true, cleancss: true
72+
.pipe $.less plugins: [cleanCss]
6973
.pipe $.header banner, pkg: pkg
7074
.pipe $.rename suffix: '.min'
7175
.pipe gulp.dest "#{paths.dist}/css/bootstrap2"
@@ -121,6 +125,7 @@ gulp.task 'watch', ['connect'], ->
121125
gulp.watch "#{paths.src}/less/bootstrap2/*.less", ['less-bootstrap2']
122126
gulp.watch "#{paths.src}/less/bootstrap3/*.less", ['less-bootstrap3']
123127
gulp.watch "#{paths.src}/docs/*.jade", ['docs']
128+
gulp.watch('package.json', ['dist']).on 'change', -> pkg = require './package.json'
124129
gulp.watch [
125130
"#{paths.dist}/js/**/*.js"
126131
"#{paths.dist}/css/**/*.css"

0 commit comments

Comments
 (0)