Skip to content

Commit

Permalink
Upgrade to release v3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Nov 14, 2014
1 parent f78b304 commit f1bfec7
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
version 3.3.0
=============
**Date:** 14-Nov-2014

1. (bug #32): Prevent invalid star ratings if cursor is close to left/right edge of star array.

version 3.2.0
=============
**Date:** 08-Nov-2014
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bootstrap-star-rating",
"version": "3.2.0",
"version": "3.3.0",
"homepage": "https://github.com/kartik-v/bootstrap-star-rating",
"authors": [
"Kartik Visweswaran <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"homepage": "http://www.krajee.com/"
}
],
"minimum-stability": "dev",
"minimum-stability": "stable",
"autoload": {
"psr-4": {
"kartik\\plugins\\rating\\": ""
Expand Down
2 changes: 1 addition & 1 deletion css/star-rating.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* @copyright &copy; Kartik Visweswaran, Krajee.com, 2014
* @version 3.2.0
* @version 3.3.0
*
* A simple yet powerful JQuery star rating plugin that allows rendering
* fractional star ratings and supports Right to Left (RTL) input.
Expand Down
2 changes: 1 addition & 1 deletion css/star-rating.min.css

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

5 changes: 5 additions & 0 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ <h1>Bootstrap Star Rating Example</h1>

<input id="rating-input" type="number" />
<button id="btn-rating-input" type="button" class="btn btn-primary">Toggle Disable</button>

<input class="rb-rating">
</form>
<br>
<script>
Expand Down Expand Up @@ -76,6 +78,9 @@ <h1>Bootstrap Star Rating Example</h1>
$('#rating-input').on('rating.change', function() {
alert($('#rating-input').val());
});


$('.rb-rating').rating({'showCaption':true, 'stars':'3', 'min':'0', 'max':'3', 'step':'1', 'size':'xs', 'starCaptions': {0:'status:nix', 1:'status:wackelt', 2:'status:geht', 3:'status:laeuft'}});
});
</script>

Expand Down
9 changes: 2 additions & 7 deletions js/star-rating.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* @copyright &copy; Kartik Visweswaran, Krajee.com, 2014
* @version 3.2.0
* @version 3.3.0
*
* A simple yet powerful JQuery star rating plugin that allows rendering
* fractional star ratings and supports Right to Left (RTL) input.
Expand Down Expand Up @@ -354,13 +354,8 @@
else {
val = (self.min + Math.ceil(self.diff * percentage / self.step) * self.step);
}
if (val < self.min) {
val = self.min;
}
else if (val > self.max) {
val = self.max;
}
val = applyPrecision(parseFloat(val), precision);
val = Math.max(Math.min(val, self.max), self.min);
if (self.rtl) {
val = self.max - val;
}
Expand Down
4 changes: 2 additions & 2 deletions js/star-rating.min.js

Large diffs are not rendered by default.

0 comments on commit f1bfec7

Please sign in to comment.