Skip to content

Commit

Permalink
Release 0.1.0-alpha3
Browse files Browse the repository at this point in the history
  • Loading branch information
tcharlss committed Nov 19, 2019
1 parent e66cc9a commit a9ca5c4
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "editpricehelper",
"description": "A small jQuery plugin to help edit prices with taxes.",
"title": "Edit Price Helper",
"version": "0.1.0-alpha.2",
"version": "0.1.0-alpha.3",
"authors": [
"tcharlss <[email protected]>"
],
Expand Down
16 changes: 8 additions & 8 deletions dist/jquery.editpricehelper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Edit Price Helper 0.1.0-alpha.2
* Edit Price Helper 0.1.0-alpha.3
* A small jQuery plugin to help edit prices with taxes.
* (c) 2019 tcharlss
* MIT license
Expand Down Expand Up @@ -33,9 +33,7 @@
taxRateClass: 'price price_tax-rate',
taxRateDisplayClass: 'price__tax-rate',
labelClass: 'price__label',
inputClass: 'price__input',
// Debug
debug: false,
inputClass: 'price__input'
};

/**
Expand Down Expand Up @@ -412,17 +410,19 @@
* @return {Number} float - Default = 0
*/
Plugin.prototype.getTaxRate = function () {
var taxRate;
var
taxRate,
taxRateOptions = Number.parseFloat(this.options.taxRate) || 0;

// Without input, we take the default tax
if (!this.hasTaxRateInput) {
taxRate = this.options.taxRate;
taxRate = taxRateOptions;
// Otherwise we take the input value
} else {
taxRate = Number.parseFloat(this.$inputs.taxRate.val()) || 0;
// If the input is empty, there can be a default taxe rate
if (!Number.isNumeric(taxRate) && this.options.taxRate) {
taxRate = this.options.taxRate;
if (!Number.isNumeric(this.$inputs.taxRate.val()) && this.options.taxRate) {
taxRate = taxRateOptions;
}
}
// taxRate = taxRate.toFixed(2);
Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.editpricehelper.min.js

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

2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Into something like this:
## Installation

* Via [npm](https://www.npmjs.org/) : ```npm install --save editpricehelper```
* Download manually on [Github](https://github.com/tcharlss/editpricehelper/releases/tag/v0.1.0-alpha.2)
* Download manually on [Github](https://github.com/tcharlss/editpricehelper/releases/tag/v0.1.0-alpha.3)

The script is also hosted on CDNs like [unpkg](https://unpkg.com/editpricehelper) or [jsdelivr](https://www.jsdelivr.com/package/npm/editpricehelper?path=dist)

Expand Down
2 changes: 1 addition & 1 deletion docs/_coverpage.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
![Logo](/_medias/editpricehelper.svg)
# Edit Price Helper <small>0.1.0-alpha.2</small>
# Edit Price Helper <small>0.1.0-alpha.3</small>

> A small jQuery plugin to help edit prices with taxes.
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="description" content="A jQuery plugin to display radio buttons as a slider.">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/[email protected].2/dist/editpricehelper.min.css">
<link rel="stylesheet" href="//unpkg.com/[email protected].3/dist/editpricehelper.min.css">
</head>
<body>
<div id="app"></div>
Expand All @@ -24,6 +24,6 @@
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/external-script.min.js"></script>
<script src="//unpkg.com/[email protected]/dist/jquery.min.js"></script>
<script src="//unpkg.com/[email protected].2/dist/jquery.editpricehelper.min.js"></script>
<script src="//unpkg.com/[email protected].3/dist/jquery.editpricehelper.min.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"tax",
"input"
],
"version": "0.1.0-alpha.2",
"version": "0.1.0-alpha.3",
"author": {
"name": "tcharlss"
},
Expand Down
4 changes: 1 addition & 3 deletions src/jquery.editpricehelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
taxRateClass: 'price price_tax-rate',
taxRateDisplayClass: 'price__tax-rate',
labelClass: 'price__label',
inputClass: 'price__input',
// Debug
debug: false,
inputClass: 'price__input'
};

/**
Expand Down

0 comments on commit a9ca5c4

Please sign in to comment.