Skip to content

Commit

Permalink
Upgrade to release v3.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Feb 13, 2015
1 parent dd56000 commit 1625fb5
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 75 deletions.
8 changes: 8 additions & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
version 3.5.1
=============
**Date:** 13-Feb-2015

1. (enh #44): Ability to integrate with other font icon CSS frameworks like Font Awesome.
- New property `ratingClass` added to allow configuring other icon framework css classes.
2. Set copyright year to current.

version 3.5.0
=============
**Date:** 31-Jan-2015
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014, Kartik Visweswaran
Copyright (c) 2015, Kartik Visweswaran
Krajee.com
All rights reserved.

Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
bootstrap-star-rating
=====================

> NOTE: Version 3.5.0 has been released. Refer [change log](https://github.com/kartik-v/bootstrap-star-rating/blob/master/CHANGE.md) for details.
> NOTE: Version 3.5.1 has been released. Refer [change log](https://github.com/kartik-v/bootstrap-star-rating/blob/master/CHANGE.md) for details.
A simple yet powerful JQuery star rating plugin for Bootstrap which supports advanced features like fractional star fill and RTL input support.
Developed with a focus on utlizing pure CSS-3 styling to render the control. The plugin uses Bootstrap markup and styling by default, but it
Expand All @@ -19,6 +19,7 @@ at Krajee JQuery plugins.
However, number inputs have a problem with decimal values on the Chrome Browser. Read the Browser Support section below.
- Involves pure CSS3 styling of the stars. Say goodbye to image sprites or playing with image backgrounds. Offers clean scalable vector
icons for consistent display across devices. Optionally one can use the Unicode character set to override symbols.
- Use any of your favorite font icon frameworks to render your star symbols (for example you can easily use the icons from the FontAwesome library).
- Render and display fractional star ratings. Configure number of stars, min, max, step, and theoretically support any fractional rating.
- Uses Bootstrap 3.x styles & glyphs by default. But this can be overridden with plugin parameters and your own CSS styles.
- Support for RIGHT TO LEFT (RTL) input. Automatically changes star styling for RTL.
Expand Down Expand Up @@ -112,13 +113,15 @@ The plugin supports these following options:
_int_ number of stars to display. Defaults to `5`.

#### glyphicon
_boolean_ whether to use the glyphicon star symbol. Defaults to `true`. If set to `false`,
will use the unicode black star symbol.
_boolean_ whether to use the glyphicon star symbol. Defaults to `true`. If set to `false`, will use the unicode black star symbol by default. You can also configure the `ratingClass` to set your own icon framework font CSS class to render the symbols.

#### symbol
_string_ any custom star symbol or unicode character to display. This will override the
`glyphicon` settings above.

#### ratingClass
_string_ the CSS class to be appended to the star rating. This is useful when you wish to render the stars using other third party icon font libraries. For example, to render the symbols using [Font Awesome icons](http://fortawesome.github.io/Font-Awesome/icons/), you can set this to `rating-fa`. The `rating-fa` class is a prebuilt CSS style within this plugin, but you can build similar CSS styles for your other font icons. You need to also set `glyphicon` property to `false` to ensure the symbols do not conflict with glyphicons.

#### min
_float_ the minimum value for the rating input. Defaults to `1`.

Expand Down Expand Up @@ -147,7 +150,7 @@ _boolean_ whether the rating caption is to be displayed. Defaults to `true`.
_string_ size of the rating control. One of `xl`, `lg`, `md`, `sm`, or `xs`. Defaults to `md`.

#### defaultCaption
_string_ the default caption text, which will be displayed when no caption is setup for the rating in the `starCaptions` array. This variable defaults to `{rating} Stars`, where the variable `{rating}` will be replaced with the selected star rating.</p>
_string_ the default caption text, which will be displayed when no caption is setup for the rating in the `starCaptions` array. This variable defaults to `{rating} Stars`, where the variable `{rating}` will be replaced with the selected star rating.

#### starCaptions
_array | function_ the caption titles corresponding to each of the star rating selected. Defaults to
Expand Down Expand Up @@ -373,4 +376,4 @@ $('#input-id').rating('create', {disabled: true});

## License

**bootstrap-star-rating** is released under the BSD 3-Clause License. See the bundled `LICENSE.md` for details.
**bootstrap-star-rating** is released under the BSD 3-Clause License. See the bundled `LICENSE.md` for details.
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.5.0",
"version": "3.5.1",
"homepage": "https://github.com/kartik-v/bootstrap-star-rating",
"authors": [
"Kartik Visweswaran <kartikv2@gmail.com>"
Expand Down
14 changes: 12 additions & 2 deletions 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.5.0
* @copyright &copy; Kartik Visweswaran, Krajee.com, 2015
* @version 3.5.1
*
* A simple yet powerful JQuery star rating plugin that allows rendering
* fractional star ratings and supports Right to Left (RTL) input.
Expand All @@ -19,9 +19,19 @@
/*
* Stars
*/
.rating-fa {
font-family: 'FontAwesome';
padding-left: 1px;
}

.rating-fa .rating-stars:before {
padding-left: 1px;
}

.rating-gly {
font-family: 'Glyphicons Halflings';
}

.rating-gly-star {
font-family: 'Glyphicons Halflings';
padding-left: 2px;
Expand Down
6 changes: 3 additions & 3 deletions css/star-rating.min.css

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

12 changes: 10 additions & 2 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
<head>
<meta charset="UTF-8"/>
<title>Krajee JQuery Plugins - &copy; Kartik</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="../css/star-rating.css" media="all" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link href="../css/star-rating.css" media="all" rel="stylesheet" type="text/css"/>
<script src="../js/star-rating.js" type="text/javascript"></script>
<body>
<div class="container">
Expand All @@ -16,6 +17,13 @@ <h2>Bootstrap Star Rating Examples <small>&copy; Kartik Visweswaran, Krajee.com<
<input id="input-2b" type="number" class="rating" min="0" max="5" step="0.5" data-size="xl"
data-symbol="&#xe005;" data-default-caption="{rating} hearts" data-star-captions="{}">
<hr>
<label>Font Awesome Stars</label>
<input id="input-2c" class="rating" min="0" max="5" step="0.5" data-size="sm"
data-symbol="&#xf005;" data-glyphicon="false" data-rating-class="rating-fa">
<label>Font Awesome Beer</label>
<input id="input-2d" class="rating" min="0" max="5" step="0.5" data-size="sm"
data-symbol="&#xf0fc;" data-glyphicon="false" data-rating-class="rating-fa" data-default-caption="{rating} drinks" data-star-captions="{}">
<hr>
<input id="input-21a" value="0" type="number" class="rating" data-symbol="*" min=0 max=5 step=0.5 data-size="xl" >
<hr>
<input id="input-21b" value="4" type="number" class="rating" min=0 max=5 step=0.2 data-size="lg">
Expand Down
Loading

0 comments on commit 1625fb5

Please sign in to comment.