Skip to content

Commit

Permalink
v3.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuele Marchi committed Jan 25, 2015
1 parent 2624eea commit ec69b5d
Show file tree
Hide file tree
Showing 35 changed files with 467 additions and 614 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "components"
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.grunt
npm-debug.log
node_modules
bower_components
components
.DS_Store
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion 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.3.1",
"version": "3.3.2",
"main": [
"./dist/js/bootstrap-switch.js",
"./dist/css/bootstrap3/bootstrap-switch.css"
Expand Down
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.3.1",
"version": "3.3.2",
"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.3.1
* bootstrap-switch - v3.3.2
* 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.3.1
* bootstrap-switch - v3.3.2
* http://www.bootstrap-switch.org
* ========================================================================
* Copyright 2012-2013 Mattia Larentis
Expand Down
2 changes: 1 addition & 1 deletion 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.3.1
* bootstrap-switch - v3.3.2
* 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.

6 changes: 2 additions & 4 deletions docs/css/bootstrap.min.css

Large diffs are not rendered by default.

23 changes: 8 additions & 15 deletions docs/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -33,19 +29,16 @@ body {
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;
Expand Down
5 changes: 3 additions & 2 deletions docs/js/bootstrap.min.js

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions docs/js/jquery.min.js

Large diffs are not rendered by default.

117 changes: 59 additions & 58 deletions docs/js/main.js
Original file line number Diff line number Diff line change
@@ -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);
108 changes: 0 additions & 108 deletions events-3.html

This file was deleted.

4 changes: 0 additions & 4 deletions examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,6 @@ <h2 class="h4">Inside Modals</h2>
</div>
</div>
</div>
<hr>
<p class="form-group">
<input type="checkbox">
</p>
</div>
</div>
</main>
Expand Down
Loading

0 comments on commit ec69b5d

Please sign in to comment.