Skip to content
This repository has been archived by the owner on Feb 28, 2020. It is now read-only.

Commit

Permalink
Version 1.4 with allowManualDefault config
Browse files Browse the repository at this point in the history
  • Loading branch information
Edouard Tack committed Jul 29, 2016
1 parent 7bdefd8 commit be1a400
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### Version 1.3.1 | 29/07/2016

* Add allowManualDefault configuration

### Version 1.3.1 | 26/07/2016

* Bug fix, jQuery.noConflict() works now
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# jQuery toggle candlestick (version 1.3.1)
# jQuery toggle candlestick (version 1.4.0)

This is a switch and stylish jquery plugin that converts checkbox to toggle switch button. This plugin allows to choose between three options.
* Checked
Expand Down Expand Up @@ -53,6 +53,7 @@ $('.js-candlestick').candlestick({
'swipe': true, // for swipe
'size': 'md', // Sizes (lg, md (default), sm, xs)
'debug': false, // Display some log message. used with Candlestick.log()
'allowManualDefault': true, // Enable the three options, set to false will disable the default option
afterAction: function(input, wrapper, action) {
// Fired after action
},
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": "candlestick",
"homepage": "https://github.com/EdouardTack/candlestick",
"version": "1.3.1",
"version": "1.4.0",
"authors": [
"Tackacoder <[email protected]>"
],
Expand Down
12 changes: 7 additions & 5 deletions developpment.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function($) {
$(".js-candlestick").candlestick();
$(".js-candlestick").candlestick({
allowManualDefault: false
});
});
/*jQuery(function($) {
$(".js-candlestick").candlestick({
jQuery(function($) {
/*$(".js-candlestick").candlestick({
swipe: {
enabled: true,
transition: true
Expand All @@ -70,15 +72,15 @@
off: 'off',
nc: 'default',
allowManualNc: false
});
});*/
$('#candle-reset').on('click', function(e) {
e.preventDefault();
$(".js-candlestick").candlestick('reset');
// $("#machin").candlestick('reset');
});
});*/
});
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion dist/candlestick.min.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions lib/js/candlestick.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
* @value true
* @property {bool} debug mode
* @value false
* @property {bool} allowManualDefault
* @value true
* @property {function}
* @property {function}
* @property {function}
Expand Down Expand Up @@ -77,7 +79,7 @@
'size': 'md',
'swipe': swipe,
'debug': false,
'allowManualDefault': true,
'allowManualDefault': true,
afterAction: function() {},
afterRendering: function() {},
afterOrganization: function() {},
Expand Down Expand Up @@ -248,7 +250,7 @@
if (this.isSwipeEnable()) {
$classes += ' grab';
}

if (!this.settings.allowManualDefault) {
$classes += ' candlestick-default-disabled';
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "candlestick",
"version": "1.3.1",
"version": "1.4.0",
"description": "javascript candlestick between three values with animation",
"main": "gulpfile.js",
"dependencies": {
Expand Down

0 comments on commit be1a400

Please sign in to comment.