first commit

This commit is contained in:
2025-05-30 03:09:08 -06:00
parent 99d54737de
commit 1932509066
6221 changed files with 298434 additions and 212 deletions

View File

@ -0,0 +1,358 @@
Change Log: `bootstrap-star-rating`
===================================
## Version 4.1.2
**Date:** 20-Sep-2021
- Simplify NPM module handling.
## Version 4.1.1
**Date:** 11-Sep-2021
- (enh #215): Correct NPM module handling.
## Version 4.1.0
**Date:** 25-Jul-2021
- (bug #213): Correct `mousenter` event to `mouseenter`.
- (enh #212): Enhance caption badge styles.
- (enh #211): Correct keyboard arrow keys behavior for RTL oriented inputs.
- (enh #210): Revamp themes - set default theme to Krajee SVG.
## Version 4.0.9
**Date:** 21-May-2021
- Correct `minThreshold` default value.
## Version 4.0.8
**Date:** 21-May-2021
- (enh #209): Enhancements to support BS 5.x (and 4.x/3.x).
## Version 4.0.7
**Date:** 20-May-2021
- (enh #208): Corrected positioning of the base input on which the rating is triggered.
- (enh #205): Add Dutch Translations.
- (enh #200): Activate Open Collective.
- (enh #199): Add Greek Translations.
- (enh #145): Minimum value threshold validation.
- New property `minThreshold` which allows a star rated with minimum value always. The initial value
of the rating is set to `minThreshold` if it has a value undefined or a value less than `minThreshold`
- The `minThreshold` value must be a value between the `min` and `max` values
- If `minThreshold` is set to less than `min` the plugin will default `minThreshold` to the `min` value
- If `minThreshold` is set to greater than `max` the plugin will default `minThreshold` to the `max` value
- (enh #129): Enhance accessibility & make the stars keyboard focusable.
- New property `keyboardEnabled` - defaults to `true`
- allow use of `tab` keyboard button to navigate to the rating
- allow use of arrow `right` and arrow `left` keyboard buttons to change the rating value
- New property `mouseEnabled` - defaults to `true`
- when set to false - the mouse cannot be used to change the ratings
- (enh #111): Add titles to individual star elements.
- New config property `starTitles` (can be set as object or function) - will set the title for each star
- (enh #110): Hover events reworked. New events added `rating:mouseenter` and `rating:mouseleave`
```
$('#ratingInput').on('rating:mouseenter rating:mouseleave', function(e, index, status, $star) {
console.log(index); // the index number of the star where the event was triggered
console.log(status); // whether the mouse event was triggered on `empty-star` or `filled-star`
console.log($star); // the current star jquery object where event was triggered
console.log($star.attr('title')); // can get properties of the star object
});
```
## Version 4.0.6
**Date:** 25-May-2019
- (enh #195): Update Bootstrap dependency.
- (enh #194, enh #180): Allow StarCaptionClasses CSS classes to also be set by Percentage width.
- (enh #190): Update German Translations.
- Implement stale bot.
## Version 4.0.5
**Date:** 04-Oct-2018
- (enh #189): Add Bengali Translations.
- (enh #188): Allow `showCaption` when `displayOnly` is `true`.
## Version 4.0.4
**Date:** 15-Sep-2018
- Enhancements to support Bootstrap v4.x.
- Better styling of stars for the 5 rating sizes and maintain consistency across themes.
- (enh #187): Add Kazakh translations.
- (enh #184): Correct rating-input style to keep it hidden - yet trigger required validation.
- (enh #182): New Krajee Font Awesome 5.x `fas` theme.
- (bug #177, enh #179): New property `showCaptionAsTitle`
- Useful for caption to be displayed as title for readonly ratings.
## Version 4.0.3
**Date:** 03-Nov-2017
- (bug #173): Correct `rating:change` event.
- (enh #171): Rename events to start with `rating:` instead of `rating`.
- (enh #170): Enhancements to support Bootstrap v4.x framework.
## Version 4.0.2
**Date:** 27-Aug-2017
- (enh #170): Enhancements to support Bootstrap v4.x framework.
- Chronological sorting of issues and enhancements in the CHANGE log.
- (enh #164): Add Turkish Translations.
- (enh #163): Add Korean Translations.
- (enh #162): Add Italian Translations.
- (enh #161): Add Farsi Translations.
- (enh #156): More correct form reset event listening.
- (enh #155): Styling enhancements and code optimizations.
- (enh #154): New property `zeroAsNull` to treat zero value rating as null.
- (enh #153): Add ability to configure `required` attribute for input.
- Add github issue and PR contribution templates.
- (enh #142): Enable scroll when rating is readonly or disabled.
- (enh #139): Do not refer to minified files in bower main metadata .
- (enh #132): Add Polish Translations.
- (enh #131): Add Arabic Translations.
- (enh #130): Better management of themes and locales.
- (enh #127): Add Chinese Translations.
- (enh #124): Add License Headers.
- (enh #123): Add Italian Translations.
- (enh #122): Add Spanish Translations.
- (enh #115): Add Romanian Translations.
- (enh #108): Add French Translations.
## Version 4.0.1
**Date:** 28-Feb-2016
- Update package.json to include `peerDependencies` instead of `dependencies`.
- (enh #103): Implement method chaining and revamp private methods
- enhance public methods like `create`, `destroy`, `refresh`, `clear`, `reset` to return the rating element jQuery object
- (bug #102): Revamp generation of rating via `refresh` method.
- (bug #101): Correct caption setting when `showCaption` is `false`.
- (bug #100): Correct caption and clear rendering methods.
- (bug #99): Correct documentation for refresh method.
## Version 4.0.0
**Date:** 16-Feb-2016
- (enh #97): Add `animate` property to enable / disable animation of star highlight on hover / change.
- (enh #96): Add support for `bootstrap-sass` official repo via `sass` branch.
- (enh #95): Add display only capability.
- (enh #94): Add Theming Functionality.
- New property `theme` will assign a CSS class with the `rating-<theme-name>` to the rating container.
- Themes included
- The default (blank) theme (for displaying bootstrap glyphicons)
- `krajee-svg` (for displaying svg icons)
- `krajee-uni` (for displaying unicode symbols as stars)
- `krajee-fa` (for displaying font awesome icons)
- Add ability to override and add one's own themes
**Various new features and BC breaking enhancements**
- **REMOVED**: `symbol`, `glyphicon`, `ratingClass` properties will be removed.
- The requirement for the above will be replaced with the `theme` property (and can also be implemented using the `containerClass` property).
- Stars now have a better padding and spacing that can be configured via CSS and themes
- New property `filledStar` - will allow one to set the markup for `filledStar` - will default to
- `<i class="glyphicon glyphicon-star"></i>`
- New property `emptyStar` - will allow one to set the markup for `emptyStar` - will default to
- `<i class="glyphicon glyphicon-star-empty"></i>`
- Exclusive support for SVG (and a prebuilt `krajee-svg` theme that contains two different ready to use SVG icons).
- (enh #91): Add SVG Icon Support
## Version 3.5.8
**Date:** 16-Feb-2016
- (bug #90): Rename reserved word used as variable.
- (enh #89): Add Portugese Brazilian Translations.
- (enh #88): Add German Translations.
## Version 3.5.7
**Date:** 22-Jan-2016
- (enh #86): Refactor code for listening events and deep extend options correctly.
- (enh #84): Add Ukranian Translations.
## Version 3.5.6
**Date:** 29-Dec-2015
- (enh #82): Added "main" key into NPM package.json.
- (enh #81): Simplify README docs.
- (bug #77): Correct `touches` and `changedTouches` validation.
- (enh #76): Add Russian Translations.
## Version 3.5.5
**Date:** 22-Nov-2015
- (enh #75): Implement Locales and Translations.
- (enh #74): Universal Module Definition for use with CommonJS, AMD or browser globals.
- (enh #71): Fix `Error: Cannot read property 'pageX' of undefined` error on touch devices.
## Version 3.5.4
**Date:** 20-Sep-2015
- Update bootstrap bower version to support only 3.x variants.
- (enh #63): Add `package.json` for npm install.
- (enh #59): Remove `String.prototype.replaceAll` and implement regex replace.
- (enh #47): Styling enhancements for printed output (better star colors and hide clear button).
## Version 3.5.3
**Date:** 18-Jun-2015
- Fixes for composer.json dependencies.
- (enh #58): Remove redundant tooltip title on hover of caption element.
## Version 3.5.2
**Date:** 10-May-2015
- (enh #46): More correct init of `clear` and `caption` elements.
- (enh #45): Validate on `touchstart` for devices that do not support `click` event.
## Version 3.5.1
**Date:** 13-Feb-2015
- Set copyright year to current.
- (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.
## Version 3.5.0
**Date:** 31-Jan-2015
- (enh #42): Code cleanup and restructure for JS lint changes (using JSHint Code cleanup library).
- (enh #39): Prevent invalid star rating for numStars > 5 with default value & hoverChange enabled.
## Version 3.4.0
**Date:** 16-Dec-2014
- (enh #36): Added `create` method to create the rating plugin (typically after a destroy).
- (enh #35): Added `destroy` method to destroy the rating plugin.
## Version 3.3.0
**Date:** 17-Nov-2014
- (enh #33): Enhance touch methods for compatibility across more wider mobile device browsers.
- (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
- Updated CHANGE log to reflect user friendly date time formats.
- Set release to stable in composer.json.
## Version 3.1.0
**Date:** 27-Oct-2014
- enh #28: Add rating.refresh event.
- enh #27: Reset events on the rating element before every refresh.
- enh #26: Add touch device support to enable touch and slide across stars.
## Version 3.0.0
**Date:** 13-Oct-2014
- enh #24: Set `clearValue` to default to `min` if not set.
- enh #22: More correct minimum value and clear value validation through new `getWidthFromValue` method.
- enh #21: Following new events are added:
- `rating.hover`
- `rating.hoverleave`
- enh #20, #21: Included hover validation routine and rating state change on hover. Following new configurable properties added:
- `hoverEnabled`: _boolean_ whether hover functionality is enabled. This will dynamically change the stars and caption on mouse hover. Defaults to `true`. This functionality will only work on desktop devices and if the input is not `disabled` or `readonly`.
- `hoverChangeCaption`: _boolean_ control whether the caption should dynamically change on mouse hover. Defaults to `true`. Will be applicable only if `hoverEnabled` is `true`.
- `hoverChangeStars`: _boolean_ control whether the stars should dynamically change on mouse hover. Defaults to `true`. Will be applicable only if `hoverEnabled` is `true`.
## Version 2.6.0
**Date:** 23-Aug-2014
- enh #17: Dynamic configuration for `starCaptions` and `starCaptionClasses` using a function.
## Version 2.5.0
**Date:** 27-May-2014
- Caption and Clear elements parameters treated as identifiers rather than JQuery object elements.
- Removed cloning of inputs to allow better refreshing of input across ajax and other scenarios.
- Plugin support is now extended to all Touch based and mobile devices like iOS, Android.
- Plugin support is now extended to all browsers including pre IE10
- Uses special JQuery routines to trigger star rating changes.
- Change to entire plugin code to eliminate dependency of HTML5 input. Plugin size reduced to 8KB minified.
## Version 2.1.0
**Date:** 08-May-2014
- Bug #8,#9,#10: Correct cloning and con## Version of field to a range slider input.
## Version 2.0.0
**Date:** 25-Apr-2014
- Automatically degrades to a normal SELECT dropdown input for browsers that do not support
HTML 5 range input.
- Uses HTML 5 range input to change ratings. Polyfills for range input in case JQuery/Javascript is disabled.
- Any star symbol (unicode or icon font) can be embedded instead of Glyphicon.
- Bootstrap style is made optional and configurable. Can override CSS to use any style.
- Right to left (RTL) support enhancement. Optimally uses the `dir` attribute of the range input.
- Render and display fractional star ratings. Configure number of stars, min, max, step, and theoretically
support any fractional rating.
- Revamp of entire plugin code. Cleverly leverages CSS3 styles, animations, and HTML5 input features
to render the plugin.
## Version 1.2.0
**Date:** 04-Apr-2014
- Clear button class customization added.
- Widget is customizable for using any CSS markup to override Bootstrap styles.
## Version 1.1.0
**Date:** 10-Mar-2014
Revamped the methods for usage across wider scenarios:
- Revamped the `refresh` method to enable refreshing all plugin options at runtime via parameters.
- Included `update` method to set a value of a rating via javascript.
## Version 1.0.0
**Date:** 01-Oct-2013
Initial release. The following features are included in this release:
- Convert any HTML input to a star rating control. Recommended input is of `type = number`, which will help fallback to a number input for browsers not supporting JQuery or Javascript.
- The plugin automatically converts an input with `type = number` to a star rating control if you set its `class = rating`. All options to the input can be passed as HTML5 `data` attributes.
- 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.
- Specifically uses Bootstrap 3.x styles & glyphs. Can be combined to work better for Bootstrap styled projects (or input group addons).
- Ability to clear values and options for the stars. Control where the clear button element can be shown.
- Reset star rating to the initial value when the form is reset.
- Ability to control and display caption of the selected stars. Each rated star can have its own caption. Control where the caption element can be shown.
- Ability to size the rating control including the stars, caption, and clear button. Five prebuilt size templates are available `xl`, `lg`, `md`, `sm`, and `xs`.
- Support for RIGHT TO LEFT (RTL) input. Automatically changes star styling for RTL.
- Triggers JQuery events for advanced development. Events currently available are `rating.change`, `rating.clear`, and `rating.reset`.
- Disabled and readonly input star rating support.
- Size of the entire plugin is less than 9KB (about 6KB for the minified JS and 3KB for the minified CSS).

View File

@ -0,0 +1,28 @@
Copyright (c) 2013 - 2021, Kartik Visweswaran
Krajee.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
* Neither the names of Kartik Visweswaran or Krajee nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -0,0 +1,193 @@
<h1 align="center">
<a href="https://plugins.krajee.com" title="Krajee Plugins" target="_blank">
<img src="https://kartik-v.github.io/bootstrap-fileinput-samples/samples/krajee-logo-b.png" alt="Krajee Logo"/>
</a>
<br>
bootstrap-star-rating
<hr>
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DTP3NZQ6G2AYU"
title="Donate via Paypal" target="_blank"><img src="https://kartik-v.github.io/bootstrap-fileinput-samples/samples/donate.png" height="60" alt="Donate"/></a>
&nbsp; &nbsp; &nbsp;
<a href="https://www.buymeacoffee.com/kartikv" title="Buy me a coffee" ><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" height="60" alt="kartikv" /></a>
</h1>
<div align="center">
[![Financial Contributors on Open Collective](https://opencollective.com/bootstrap-star-rating/all/badge.svg?label=financial+contributors)](https://opencollective.com/bootstrap-star-rating)
[![Bower version](https://badge.fury.io/bo/bootstrap-star-rating.svg)](http://badge.fury.io/bo/bootstrap-star-rating)
[![Latest Stable Version](https://poser.pugx.org/kartik-v/bootstrap-star-rating/v/stable)](https://packagist.org/packages/kartik-v/bootstrap-star-rating)
[![License](https://poser.pugx.org/kartik-v/bootstrap-star-rating/license)](https://packagist.org/packages/kartik-v/bootstrap-star-rating)
[![Packagist Downloads](https://poser.pugx.org/kartik-v/bootstrap-star-rating/downloads)](https://packagist.org/packages/kartik-v/bootstrap-star-rating)
[![Monthly Downloads](https://poser.pugx.org/kartik-v/bootstrap-star-rating/d/monthly)](https://packagist.org/packages/kartik-v/bootstrap-star-rating)
</div>
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
can be overridden with any other CSS markup. View the [documentation](http://plugins.krajee.com/star-rating) or a [complete demo](http://plugins.krajee.com/star-rating/demo)
at Krajee JQuery plugins.
> NOTE: Release v4.0 is a modified rewrite with various new enhancements and BC breaking features. It allows rendering richer markup for star symbols and offers theming support.
![Star Rating Screenshot](https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput-samples@0.0.1/samples/star-rating-screenshot.png)
## Features
- Convert any HTML input to a star rating control.
- The plugin automatically converts an input to a star rating control if you set its `class = rating`.
All options to the input can be passed as HTML5 `data` attributes.
- You can use the HTML 5 number input for polyfill and the plugin will automatically use the number attributes like `min`, `max`, and `step`.
However, number inputs have a problem with decimal values on the Chrome Browser. Read the Browser Support section in the documentation.
- 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 5.x, 4.x, 3.x styles & Bootstrap 3.x glyphicons 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.
- Ability to clear values and options for the stars. Control where the clear button element can be shown.
- Reset star rating to the initial value when the form is reset.
- Ability to control and display caption of the selected stars. Each rated star can have its own caption. Control where the
caption element can be shown.
- Ability to size the rating control including the stars, caption, and clear button. Five prebuilt size templates are
available `xl`, `lg`, `md`, `sm`, and `xs`.
- Triggers JQuery events for advanced development. Events currently available are `rating.change`, `rating.clear`, `rating.reset`, `rating.refresh`, `rating.hover`, and `rating.hoverleave`.
- Disabled and readonly input star rating support.
- Change stars and caption on mouse hover (new feature since v3.0.0).
- Change stars and caption on slide and drag for mobile/touch devices (new feature since v3.1.0).
- Support for translations and locales.
### New features/changes since release v4.0
- **BC Breaking Change**: The `symbol`, `glyphicon`, `ratingClass` properties have been removed. The functionality is replaced with the `theme` property (and can also be complemented or implemented separately using the `containerClass` property).
- New property `theme` will assign a CSS class with the `rating-<theme-name>` to the rating container.
- Themes included
- `krajee-svg` (for displaying svg icons) - default theme since v4.1.2
- `krajee-uni` (for displaying Krajee unicode symbols as stars)
- `krajee-fas` (for displaying font awesome 5.x icons)
- `krajee-fa` (for displaying font awesome 4.x icons)
- `krajee-gly` (for displaying bootstrap 3.x glyphicons)
- Add ability to override and add one's own themes
- Stars now have a better padding and spacing that can be configured via CSS and themes
- New property `filledStar` - will allow one to set the markup for `filledStar` - will default to
- `<i class="glyphicon glyphicon-star"></i>`
- New property `emptyStar` - will allow one to set the markup for `emptyStar` - will default to
- `<i class="glyphicon glyphicon-star-empty"></i>`
- Exclusive support for SVG (and a prebuilt `krajee-svg` theme that contains two different ready to use SVG icons).
- Ability to easily set the widget as a "display only" rating via `displayOnly` property.
- New property `animate` to control animation of highlighted stars on hover or click.
> NOTE: Refer [change log](https://github.com/kartik-v/bootstrap-star-rating/blob/master/CHANGE.md) for details on plugin enhancements, fixes, and changes.
## Documentation and Demo
View the [plugin documentation](http://plugins.krajee.com/star-rating) and [plugin demos](http://plugins.krajee.com/star-rating/demo) at Krajee JQuery plugins.
## Pre-requisites
1. [Bootstrap 5.x, 4.x, 3.x](http://getbootstrap.com/)
2. Latest [JQuery](http://jquery.com/)
3. Most browsers supporting CSS3 & JQuery.
## Installation
### Using Bower
You can use the `bower` package manager to install. Run:
bower install bootstrap-star-rating
### Using Composer
You can use the `composer` package manager to install. Either run:
$ php composer.phar require kartik-v/bootstrap-star-rating "@dev"
or add:
"kartik-v/bootstrap-star-rating": "@dev"
to your composer.json file
> NOTE: You can use the [sass branch](https://github.com/kartik-v/bootstrap-star-rating/tree/sass) for installation using `bootstrap-sass` dependency.
The [master branch](https://github.com/kartik-v/bootstrap-star-rating/tree/master) can be used for installation using plain `bootstrap` dependency.
### Manual Install
You can also manually install the plugin easily to your project. Just download the source [ZIP](https://github.com/kartik-v/bootstrap-star-rating/zipball/master) or [TAR ball](https://github.com/kartik-v/bootstrap-star-rating/tarball/master) and extract the plugin assets (css and js folders) into your project.
## Usage
Step 1: Load the following assets in your header.
```html
<!-- default styles -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css">
<link href="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-star-rating@4.1.2/css/star-rating.min.css" media="all" rel="stylesheet" type="text/css" />
<!-- with v4.1.0 Krajee SVG theme is used as default (and must be loaded as below) - include any of the other theme CSS files as mentioned below (and change the theme property of the plugin) -->
<link href="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-star-rating@4.1.2/themes/krajee-svg/theme.css" media="all" rel="stylesheet" type="text/css" />
<!-- important mandatory libraries -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-star-rating@4.1.2/js/star-rating.min.js" type="text/javascript"></script>
<!-- with v4.1.0 Krajee SVG theme is used as default (and must be loaded as below) - include any of the other theme JS files as mentioned below (and change the theme property of the plugin) -->
<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-star-rating@4.1.2/themes/krajee-svg/theme.js"></script>
<!-- optionally if you need translation for your language then include locale file as mentioned below (replace LANG.js with your own locale file) -->
<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-star-rating@4.1.2/js/locales/LANG.js"></script>
```
If you noticed, you need to load the `jquery.min.js` and `bootstrap.min.css` in addition to the `star-rating.min.css` and `star-rating.min.js` for
the plugin to work with default settings.
Step 2: Setup your input markup to automatically initialize the rating
```html
<input id="input-id" type="text" class="rating" data-size="lg" >
```
Step 3: Initialize the plugin on your page for other input types. For example,
```js
// initialize with defaults
$("#input-id").rating();
// with plugin options (do not attach the CSS class "rating" to your input if using this approach)
$("#input-id").rating({'size':'lg'});
```
The `#input-id` is the identifier for the input on your page (that you used to initialize the rating), and this input is hidden automatically by the plugin (by adding the bootstrap CSS class `hide`).
Alternatively, you can directly call the plugin options by setting data attributes to your input field.
## Contributors
### Code Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/kartik-v/bootstrap-star-rating/graphs/contributors"><img src="https://opencollective.com/bootstrap-star-rating/contributors.svg?width=890&button=false" /></a>
### Financial Contributors
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/bootstrap-star-rating/contribute)]
#### Individuals
<a href="https://opencollective.com/bootstrap-star-rating"><img src="https://opencollective.com/bootstrap-star-rating/individuals.svg?width=890"></a>
#### Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/bootstrap-star-rating/contribute)]
<a href="https://opencollective.com/bootstrap-star-rating/organization/0/website"><img src="https://opencollective.com/bootstrap-star-rating/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/bootstrap-star-rating/organization/1/website"><img src="https://opencollective.com/bootstrap-star-rating/organization/1/avatar.svg"></a>
<a href="https://opencollective.com/bootstrap-star-rating/organization/2/website"><img src="https://opencollective.com/bootstrap-star-rating/organization/2/avatar.svg"></a>
<a href="https://opencollective.com/bootstrap-star-rating/organization/3/website"><img src="https://opencollective.com/bootstrap-star-rating/organization/3/avatar.svg"></a>
<a href="https://opencollective.com/bootstrap-star-rating/organization/4/website"><img src="https://opencollective.com/bootstrap-star-rating/organization/4/avatar.svg"></a>
<a href="https://opencollective.com/bootstrap-star-rating/organization/5/website"><img src="https://opencollective.com/bootstrap-star-rating/organization/5/avatar.svg"></a>
<a href="https://opencollective.com/bootstrap-star-rating/organization/6/website"><img src="https://opencollective.com/bootstrap-star-rating/organization/6/avatar.svg"></a>
<a href="https://opencollective.com/bootstrap-star-rating/organization/7/website"><img src="https://opencollective.com/bootstrap-star-rating/organization/7/avatar.svg"></a>
<a href="https://opencollective.com/bootstrap-star-rating/organization/8/website"><img src="https://opencollective.com/bootstrap-star-rating/organization/8/avatar.svg"></a>
<a href="https://opencollective.com/bootstrap-star-rating/organization/9/website"><img src="https://opencollective.com/bootstrap-star-rating/organization/9/avatar.svg"></a>
## License
**bootstrap-star-rating** is released under the BSD-3-Clause License. See the bundled `LICENSE.md` for details.

View File

@ -0,0 +1,36 @@
{
"name": "bootstrap-star-rating",
"version": "4.1.2",
"homepage": "https://github.com/kartik-v/bootstrap-star-rating",
"authors": [
"Kartik Visweswaran <kartikv2@gmail.com>"
],
"description": "A simple yet powerful JQuery star rating plugin for Bootstrap.",
"main": [
"./css/star-rating.min.css",
"./js/star-rating.min.js"
],
"keywords": [
"bootstrap",
"star",
"rating",
"font",
"awesome",
"glyphicon",
"svg"
],
"dependencies": {
"jquery": ">= 1.9.0",
"bootstrap": ">= 3.0.0"
},
"ignore": [
"**/.*",
"node_modules",
"composer.json",
"examples",
"bower_components",
"test",
"tests"
],
"license": "BSD-3-Clause"
}

View File

@ -0,0 +1,27 @@
{
"name": "kartik-v/bootstrap-star-rating",
"description": "A simple yet powerful JQuery star rating plugin for Bootstrap.",
"keywords": [
"bootstrap",
"star",
"rating",
"font",
"awesome",
"glyphicon",
"svg"
],
"homepage": "https://github.com/kartik-v/bootstrap-star-rating",
"license": "BSD-3-Clause",
"authors": [
{
"name": "Kartik Visweswaran",
"email": "kartikv2@gmail.com",
"homepage": "http://www.krajee.com/"
}
],
"extra": {
"branch-alias": {
"dev-master": "4.1.x-dev"
}
}
}

View File

@ -0,0 +1,248 @@
/*!
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
.rating-loading {
width: 25px;
height: 25px;
font-size: 0;
color: #fff;
background: transparent url('../img/loading.gif') top left no-repeat;
border: none;
}
/*
* Stars & Input
*/
.rating-container .rating-stars {
position: relative;
cursor: pointer;
vertical-align: middle;
display: inline-block;
overflow: hidden;
white-space: nowrap;
}
.rating-container .rating-stars:focus {
outline: 1px dotted;
}
.rating-input {
display: absolute;
cursor: pointer;
width: 100%;
height: 1px;
bottom: 0;
left: 0;
font-size: 1px;
border: none;
background: none;
opacity: 0;
padding: 0;
margin: 0;
}
.rating-container.is-display-only .rating-stars {
cursor: default;
}
.rating-disabled .rating-stars {
cursor: not-allowed;
}
.rating-container .star {
display: inline-block;
margin: 0 2px;
text-align: center;
}
.rating-container .empty-stars {
color: #aaa;
}
.rating-container .filled-stars {
position: absolute;
left: 0;
top: 0;
margin: auto;
color: #fde16d;
white-space: nowrap;
overflow: hidden;
-webkit-text-stroke: 1px #777;
text-shadow: 1px 1px #999;
}
.rating-rtl {
float: right;
}
.rating-animate .filled-stars {
transition: width 0.25s ease;
}
.rating-rtl .filled-stars {
left: auto;
right: 0;
transition: none;
-webkit-transform: matrix(-1, 0, 0, 1, 0, 0);
transform: matrix(-1, 0, 0, 1, 0, 0);
}
.rating-rtl.is-star .filled-stars {
right: 0.06em;
}
.rating-rtl.is-heart .empty-stars {
margin-right: 0.07em;
}
/**
* Clear
*/
.rating-container .clear-rating {
color: #aaa;
cursor: not-allowed;
display: inline-block;
vertical-align: middle;
font-size: 60%;
}
.clear-rating-active {
cursor: pointer !important;
}
.clear-rating-active:hover {
color: #843534;
}
.rating-container .clear-rating {
padding-right: 5px;
}
/**
* Caption
*/
/* extend support to BS4 */
.rating-container .caption .label {
display: inline-block;
padding: .25em .4em;
line-height: 1;
text-align: center;
vertical-align: baseline;
border-radius: .25rem;
}
.rating-container .caption {
color: #999;
display: inline-block;
vertical-align: middle;
line-height: 1;
}
.rating-container .caption {
margin-left: 5px;
margin-right: 0;
}
.rating-rtl .caption {
margin-right: 5px;
margin-left: 0;
}
/**
* Print
*/
@media print {
.rating-container .clear-rating {
display: none;
}
}
/**
* Sizes
*/
.rating-xl {
font-size: 48px;
}
.rating-lg {
font-size: 40px;
}
.rating-md {
font-size: 32px;
}
.rating-sm {
font-size: 24px;
}
.rating-xs {
font-size: 16px;
}
.rating-xl .caption {
font-size: 20px;
}
.rating-lg .caption {
font-size: 18px;
}
.rating-md .caption {
font-size: 16px;
}
.rating-sm .caption {
font-size: 14px;
}
.rating-xs .caption {
font-size: 12px;
}
/**
* Caption
*/
.caption-badge {
font-family: Arial, Helvetica, sans-serif;
display: inline-block;
padding: .35em .65em;
font-size: .75em;
font-weight: 700;
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25rem;
}
.caption-secondary {
background-color: #6c757d;
}
.caption-danger {
background-color: #dc3545;
}
.caption-warning {
background-color: #ffc107;
color: #212529;
}
.caption-info {
background-color: #0dcaf0;
color: #212529;
}
.caption-primary {
background-color: #0d6efd;
}
.caption-success {
background-color: #198754;
}

View File

@ -0,0 +1,11 @@
/*!
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
.rating-loading{width:25px;height:25px;font-size:0;color:#fff;background:url(../img/loading.gif) top left no-repeat;border:none}.rating-container .rating-stars{position:relative;cursor:pointer;vertical-align:middle;display:inline-block;overflow:hidden;white-space:nowrap}.rating-container .rating-stars:focus{outline:dotted 1px}.rating-input{display:absolute;cursor:pointer;width:100%;height:1px;bottom:0;left:0;font-size:1px;border:none;background:0 0;opacity:0;padding:0;margin:0}.caption-badge,.rating-container .caption .label{line-height:1;text-align:center;border-radius:.25rem}.rating-container.is-display-only .rating-stars{cursor:default}.rating-disabled .rating-stars{cursor:not-allowed}.rating-container .star{display:inline-block;margin:0 2px;text-align:center}.rating-container .empty-stars{color:#aaa}.rating-container .filled-stars{position:absolute;left:0;top:0;margin:auto;color:#fde16d;white-space:nowrap;overflow:hidden;-webkit-text-stroke:1px #777;text-shadow:1px 1px #999}.rating-rtl{float:right}.rating-animate .filled-stars{transition:width .25s ease}.rating-rtl .filled-stars{left:auto;right:0;transition:none;-webkit-transform:matrix(-1,0,0,1,0,0);transform:matrix(-1,0,0,1,0,0)}.rating-rtl.is-star .filled-stars{right:.06em}.rating-rtl.is-heart .empty-stars{margin-right:.07em}.rating-container .clear-rating{color:#aaa;cursor:not-allowed;display:inline-block;vertical-align:middle;font-size:60%;padding-right:5px}.clear-rating-active{cursor:pointer!important}.clear-rating-active:hover{color:#843534}.rating-container .caption .label{display:inline-block;padding:.25em .4em;vertical-align:baseline}.rating-container .caption{color:#999;display:inline-block;vertical-align:middle;line-height:1;margin-left:5px;margin-right:0}.rating-rtl .caption{margin-right:5px;margin-left:0}@media print{.rating-container .clear-rating{display:none}}.rating-xl{font-size:48px}.rating-lg{font-size:40px}.rating-md{font-size:32px}.rating-sm{font-size:24px}.rating-xs{font-size:16px}.rating-xl .caption{font-size:20px}.rating-lg .caption{font-size:18px}.rating-md .caption{font-size:16px}.rating-sm .caption{font-size:14px}.rating-xs .caption{font-size:12px}.caption-badge{font-family:Arial,Helvetica,sans-serif;display:inline-block;padding:.35em .65em;font-size:.75em;font-weight:700;color:#fff;white-space:nowrap;vertical-align:baseline}.caption-secondary{background-color:#6c757d}.caption-danger{background-color:#dc3545}.caption-warning{background-color:#ffc107;color:#212529}.caption-info{background-color:#0dcaf0;color:#212529}.caption-primary{background-color:#0d6efd}.caption-success{background-color:#198754}

View File

@ -0,0 +1,370 @@
<!--
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
-->
<!DOCTYPE html>
<!--suppress CssUnusedSymbol, JSUnresolvedLibraryURL -->
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Krajee JQuery Plugins - &copy; Kartik</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="../css/star-rating.css" media="all" type="text/css"/>
<link rel="stylesheet" href="../themes/krajee-fa/theme.css" media="all" type="text/css"/>
<link rel="stylesheet" href="../themes/krajee-svg/theme.css" media="all" type="text/css"/>
<link rel="stylesheet" href="../themes/krajee-uni/theme.css" media="all" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="../js/star-rating.js" type="text/javascript"></script>
<script src="../themes/krajee-fa/theme.js" type="text/javascript"></script>
<script src="../themes/krajee-svg/theme.js" type="text/javascript"></script>
<script src="../themes/krajee-gly/theme.js" type="text/javascript"></script>
<script src="../themes/krajee-uni/theme.js" type="text/javascript"></script>
<body>
<div class="container">
<div class="page-header">
<h2>Bootstrap Star Rating Examples
<small>&copy; Kartik Visweswaran, Krajee.com</small>
</h2>
</div>
<form>
<div class="page-header">
<h3>Glyphicon Star LTR</h3>
</div>
<input type="text" class="rating rating-loading" value="3.75" data-size="xl" data-theme="krajee-gly" title="">
<br>
<input type="text" class="rating rating-loading" value="2.5" data-size="lg" data-theme="krajee-gly" title="">
<br>
<input type="text" class="rating rating-loading" value="1.75" data-size="md" data-theme="krajee-gly" title="">
<br>
<input type="text" class="rating rating-loading" value="4" data-size="sm" data-theme="krajee-gly" title="">
<br>
<input type="text" class="rating rating-loading" value="2" data-size="xs" data-theme="krajee-gly" title="">
<br>
<div class="page-header">
<h3>Glyphicon Star RTL</h3>
</div>
<input type="text" class="kv-gly-star rating-loading" value="3.75" dir="rtl" data-size="xl" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-gly-star rating-loading" value="2.5" dir="rtl" data-size="lg" data-theme="krajee-gly" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-gly-star rating-loading" value="1.75" dir="rtl" data-size="md" data-theme="krajee-gly" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-gly-star rating-loading" value="4" dir="rtl" data-size="sm" data-theme="krajee-gly" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-gly-star rating-loading" value="2" dir="rtl" data-size="xs" data-theme="krajee-gly" title="">
<div class="clearfix"></div>
<br>
<div class="page-header">
<h3>Glyphicon Heart LTR</h3>
</div>
<input type="text" class="kv-gly-heart rating-loading" value="3.75" data-size="xl" data-theme="krajee-gly" title="">
<br>
<input type="text" class="kv-gly-heart rating-loading" value="2.5" data-size="lg" data-theme="krajee-gly" title="">
<br>
<input type="text" class="kv-gly-heart rating-loading" value="1.75" data-size="md" data-theme="krajee-gly" title="">
<br>
<input type="text" class="kv-gly-heart rating-loading" value="4" data-size="sm" data-theme="krajee-gly" title="">
<br>
<input type="text" class="kv-gly-heart rating-loading" value="2" data-size="xs" data-theme="krajee-gly" title="">
<br>
<div class="page-header">
<h3>Glyphicon Heart RTL</h3>
</div>
<input type="text" class="kv-gly-heart rating-loading" value="3.75" dir="rtl" data-size="xl" data-theme="krajee-gly" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-gly-heart rating-loading" value="2.5" dir="rtl" data-size="lg" data-theme="krajee-gly" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-gly-heart rating-loading" value="1.75" dir="rtl" data-size="md" data-theme="krajee-gly" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-gly-heart rating-loading" value="4" dir="rtl" data-size="sm" data-theme="krajee-gly" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-gly-heart rating-loading" value="2" dir="rtl" data-size="xs" data-theme="krajee-gly" title="">
<div class="clearfix"></div>
<br>
<div class="page-header">
<h3>Unicode Star LTR</h3>
</div>
<input type="text" class="kv-uni-star rating-loading" value="3.75" data-size="xl" title="">
<br>
<input type="text" class="kv-uni-star rating-loading" value="2.5" data-size="lg" title="">
<br>
<input type="text" class="kv-uni-star rating-loading" value="1.75" data-size="md" title="">
<br>
<input type="text" class="kv-uni-star rating-loading" value="4" data-size="sm" title="">
<br>
<input type="text" class="kv-uni-star rating-loading" value="2" data-size="xs" title="">
<br>
<div class="page-header">
<h3>Unicode Star RTL</h3>
</div>
<input type="text" class="kv-uni-star rating-loading" value="3.75" dir="rtl" data-size="xl" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-uni-star rating-loading" value="2.5" dir="rtl" data-size="lg" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-uni-star rating-loading" value="1.75" dir="rtl" data-size="md" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-uni-star rating-loading" value="4" dir="rtl" data-size="sm" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-uni-star rating-loading" value="2" dir="rtl" data-size="xs" title="">
<div class="clearfix"></div>
<br>
<div class="page-header">
<h3>Unicode Rook LTR</h3>
</div>
<input type="text" class="kv-uni-rook rating-loading" value="3.75" data-size="xl" title="">
<br>
<input type="text" class="kv-uni-rook rating-loading" value="2.5" data-size="lg" title="">
<br>
<input type="text" class="kv-uni-rook rating-loading" value="1.75" data-size="md" title="">
<br>
<input type="text" class="kv-uni-rook rating-loading" value="4" data-size="sm" title="">
<br>
<input type="text" class="kv-uni-rook rating-loading" value="2" data-size="xs" title="">
<br>
<div class="page-header">
<h3>Unicode Rook RTL</h3>
</div>
<input type="text" class="kv-uni-rook rating-loading" value="3.75" dir="rtl" data-size="xl" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-uni-rook rating-loading" value="2.5" dir="rtl" data-size="lg" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-uni-rook rating-loading" value="1.75" dir="rtl" data-size="md" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-uni-rook rating-loading" value="4" dir="rtl" data-size="sm" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-uni-rook rating-loading" value="2" dir="rtl" data-size="xs" title="">
<div class="clearfix"></div>
<br>
<div class="page-header">
<h3>Font Awesome Star LTR</h3>
</div>
<input type="text" class="kv-fa rating-loading" value="3.75" data-size="xl" title="">
<br>
<input type="text" class="kv-fa rating-loading" value="2.5" data-size="lg" title="">
<br>
<input type="text" class="kv-fa rating-loading" value="1.75" data-size="md" title="">
<br>
<input type="text" class="kv-fa rating-loading" value="4" data-size="sm" title="">
<br>
<input type="text" class="kv-fa rating-loading" value="2" data-size="xs" title="">
<br>
<div class="page-header">
<h3>Font Awesome Star RTL</h3>
</div>
<input type="text" class="kv-fa rating-loading" value="3.75" dir="rtl" data-size="xl" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-fa rating-loading" value="2.5" dir="rtl" data-size="lg" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-fa rating-loading" value="1.75" dir="rtl" data-size="md" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-fa rating-loading" value="4" dir="rtl" data-size="sm" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-fa rating-loading" value="2" dir="rtl" data-size="xs" title="">
<div class="clearfix"></div>
<br>
<div class="page-header">
<h3>Font Awesome Heart LTR</h3>
</div>
<input type="text" class="kv-fa-heart rating-loading" value="3.75" data-size="xl"
title="">
<br>
<input type="text" class="kv-fa-heart rating-loading" value="2.5" data-size="lg" title="">
<br>
<input type="text" class="kv-fa-heart rating-loading" value="1.75" data-size="md" title="">
<br>
<input type="text" class="kv-fa-heart rating-loading" value="4" data-size="sm" title="">
<br>
<input type="text" class="kv-fa-heart rating-loading" value="2" data-size="xs" title="">
<br>
<div class="page-header">
<h3>Font Awesome Heart RTL</h3>
</div>
<input type="text" class="kv-fa-heart rating-loading" value="3.75" dir="rtl" data-size="xl" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-fa-heart rating-loading" value="2.5" dir="rtl" data-size="lg" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-fa-heart rating-loading" value="1.75" dir="rtl" data-size="md" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-fa-heart rating-loading" value="4" dir="rtl" data-size="sm" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-fa-heart rating-loading" value="2" dir="rtl" data-size="xs" title="">
<div class="clearfix"></div>
<br>
<div class="page-header">
<h3>SVG LTR Star</h3>
</div>
<input type="text" class="kv-svg rating-loading" value="3.75" data-size="xl" title="">
<br>
<input type="text" class="kv-svg rating-loading" value="2.5" data-size="lg" title="">
<br>
<input type="text" class="kv-svg rating-loading" value="1.75" data-size="md" title="">
<br>
<input type="text" class="kv-svg rating-loading" value="4" data-size="sm" title="">
<br>
<input type="text" class="kv-svg rating-loading" value="2" data-size="xs" title="">
<br>
<div class="page-header">
<h3>SVG RTL Star</h3>
</div>
<input type="text" class="kv-svg rating-loading" value="3.75" dir="rtl" data-size="xl" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-svg rating-loading" value="2.5" dir="rtl" data-size="lg" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-svg rating-loading" value="1.75" dir="rtl" data-size="md" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-svg rating-loading" value="4" dir="rtl" data-size="sm" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-svg rating-loading" value="2" dir="rtl" data-size="xs" title="">
<div class="clearfix"></div>
<br>
<div class="page-header">
<h3>SVG LTR Heart</h3>
</div>
<input type="text" class="kv-svg-heart rating-loading" value="3.75" data-size="xl" title="">
<br>
<input type="text" class="kv-svg-heart rating-loading" value="2.5" data-size="lg" title="">
<br>
<input type="text" class="kv-svg-heart rating-loading" value="1.75" data-size="md" title="">
<br>
<input type="text" class="kv-svg-heart rating-loading" value="4" data-size="sm" title="">
<br>
<input type="text" class="kv-svg-heart rating-loading" value="2" data-size="xs" title="">
<br>
<div class="page-header">
<h3>SVG RTL Heart</h3>
</div>
<input type="text" class="kv-svg-heart rating-loading" value="3.75" dir="rtl" data-size="xl" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-svg-heart rating-loading" value="2.5" dir="rtl" data-size="lg" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-svg-heart rating-loading" value="1.75" dir="rtl" data-size="md" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-svg-heart rating-loading" value="4" dir="rtl" data-size="sm" title="">
<div class="clearfix"></div>
<br>
<input type="text" class="kv-svg-heart rating-loading" value="2" dir="rtl" data-size="xs" title="">
<div class="clearfix"></div>
<br>
</form>
</div>
</body>
<script>
$(document).on('ready', function () {
$('.kv-gly-star').rating({
containerClass: 'is-star'
});
$('.kv-gly-heart').rating({
containerClass: 'is-heart',
defaultCaption: '{rating} hearts',
starCaptions: function (rating) {
return rating == 1 ? 'One heart' : rating + ' hearts';
},
filledStar: '<i class="glyphicon glyphicon-heart"></i>',
emptyStar: '<i class="glyphicon glyphicon-heart-empty"></i>'
});
$('.kv-fa').rating({
theme: 'krajee-fa',
filledStar: '<i class="fa fa-star"></i>',
emptyStar: '<i class="fa fa-star-o"></i>'
});
$('.kv-fa-heart').rating({
defaultCaption: '{rating} hearts',
starCaptions: function (rating) {
return rating == 1 ? 'One heart' : rating + ' hearts';
},
theme: 'krajee-fa',
filledStar: '<i class="fa fa-heart"></i>',
emptyStar: '<i class="fa fa-heart-o"></i>'
});
$('.kv-uni-star').rating({
theme: 'krajee-uni',
filledStar: '&#x2605;',
emptyStar: '&#x2606;'
});
$('.kv-uni-rook').rating({
theme: 'krajee-uni',
defaultCaption: '{rating} rooks',
starCaptions: function (rating) {
return rating == 1 ? 'One rook' : rating + ' rooks';
},
filledStar: '&#9820;',
emptyStar: '&#9814;'
});
$('.kv-svg').rating({
theme: 'krajee-svg',
filledStar: '<span class="krajee-icon krajee-icon-star"></span>',
emptyStar: '<span class="krajee-icon krajee-icon-star"></span>'
});
$('.kv-svg-heart').rating({
theme: 'krajee-svg',
filledStar: '<span class="krajee-icon krajee-icon-heart"></span>',
emptyStar: '<span class="krajee-icon krajee-icon-heart"></span>',
defaultCaption: '{rating} hearts',
starCaptions: function (rating) {
return rating == 1 ? 'One heart' : rating + ' hearts';
},
containerClass: 'is-heart'
});
$('.rating,.kv-gly-star,.kv-gly-heart,.kv-uni-star,.kv-uni-rook,.kv-fa,.kv-fa-heart,.kv-svg,.kv-svg-heart').on(
'change', function () {
console.log('Rating selected: ' + $(this).val());
});
});
</script>
</html>

View File

@ -0,0 +1,136 @@
<!--
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Krajee JQuery Plugins - &copy; Kartik</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
<link href="../css/star-rating.css" media="all" rel="stylesheet" type="text/css"/>
<link href="../themes/krajee-fas/theme.css" media="all" rel="stylesheet" type="text/css"/>
<link href="../themes/krajee-svg/theme.css" media="all" rel="stylesheet" type="text/css"/>
<!--suppress JSUnresolvedLibraryURL -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="../js/star-rating.js" type="text/javascript"></script>
<script src="../themes/krajee-fas/theme.js" type="text/javascript"></script>
<script src="../themes/krajee-svg/theme.js" type="text/javascript"></script>
<body>
<div class="m-5">
<h2>Bootstrap Star Rating Examples
<small>&copy; Kartik Visweswaran, Krajee.com</small>
</h2>
<hr style="height:4px">
<form>
<input id="input-21b" value="4" type="text" class="rating" data-theme="krajee-fas" data-min=0 data-max=5 data-step=0.2 data-size="lg"
required title="">
<div class="clearfix"></div>
<hr>
<input required id="input-21c" value="" type="text" title="">
<div class="clearfix"></div>
<hr>
<input id="input-21d" value="2" type="text" class="rating" data-theme="krajee-fas" data-min=0 data-max=5 data-step=0.5 data-size="sm"
title="">
<hr>
<input id="input-21e" value="0" type="text" class="rating" data-theme="krajee-fas" data-min=0 data-max=5 data-step=0.5 data-size="xs"
title="">
<hr>
<input id="input-21f" value="0" type="text" data-theme="krajee-fas" data-min=0 data-max=5 data-step=0.1 data-size="md" title="">
<hr>
<input id="input-2ba" type="text" class="rating" data-theme="krajee-fas" data-min="0" data-max="5" data-step="0.5" data-stars=5
data-symbol="&#xe005;" data-default-caption="{rating} hearts" data-star-captions="{}" title="">
<hr>
<input id="input-22" value="0" type="text" class="rating" data-theme="krajee-fas" data-min=0 data-max=5 data-step=0.5 data-rtl=1
data-container-class='text-right' data-glyphicon=0 title="">
<div class="clearfix"></div>
<hr>
<input required class="rb-rating" type="text" value="" title="">
<hr>
<input id="rating-input" type="text" title=""/>
<button id="btn-rating-input" type="button" class="btn btn-primary">Toggle Disable</button>
<hr>
<input id="kartik" class="rating" data-stars="5" data-step="0.1" title=""/>
<div class="form-group" style="margin-top:10px">
<button type="submit" class="btn btn-primary">Submit</button>
<button type="reset" class="btn btn-default btn-secondary">Reset</button>
<button type="button" class="btn btn-danger">Destroy</button>
<button type="button" class="btn btn-success">Create</button>
</div>
</form>
<hr>
<script>
jQuery(document).ready(function () {
$("#input-21f").rating({
starCaptions: function (val) {
if (val < 3) {
return val;
} else {
return 'high';
}
},
starCaptionClasses: function (val) {
if (val < 3) {
return 'label label-danger';
} else {
return 'label label-success';
}
},
hoverOnClear: false
});
var $inp = $('#rating-input');
$inp.rating({
min: 0,
max: 5,
step: 1,
size: 'lg',
showClear: false
});
$('#btn-rating-input').on('click', function () {
$inp.rating('refresh', {
showClear: true,
disabled: !$inp.attr('disabled')
});
});
$('.btn-danger').on('click', function () {
$("#kartik").rating('destroy');
});
$('.btn-success').on('click', function () {
$("#kartik").rating('create');
});
$inp.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'}
});
$("#input-21c").rating({
min: 0, max: 8, step: 0.5, size: "xl", stars: "8"
});
});
</script>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

View File

@ -0,0 +1,45 @@
/*!
* Star Rating <LANG> Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['<LANG>'] = {
defaultCaption: '{rating} Stars',
starCaptions: {
0.5: 'Half Star',
1: 'One Star',
1.5: 'One & Half Star',
2: 'Two Stars',
2.5: 'Two & Half Stars',
3: 'Three Stars',
3.5: 'Three & Half Stars',
4: 'Four Stars',
4.5: 'Four & Half Stars',
5: 'Five Stars'
},
clearButtonTitle: 'Clear',
clearCaption: 'Not Rated'
};
}));

View File

@ -0,0 +1,46 @@
/*!
* Star Rating Arabic Translations
* @author Abdulrahman Zaiter
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['ar'] = {
defaultCaption: '{rating} نجوم',
starCaptions: {
0.5: 'نصف نجمة',
1: 'نجمة واحدة',
1.5: 'نجمة ونصف',
2: 'نجمتين',
2.5: 'نجمتين ونصف',
3: 'ثلاث نجمات',
3.5: 'ثلاث نجمات ونصف',
4: 'أربع نجمات',
4.5: 'أربع نجمات ونصف',
5: 'خمسة نجمات'
},
clearButtonTitle: 'مسح',
clearCaption: 'غير مصنّف'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Bengali Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['bn'] = {
defaultCaption: '{rating} তারা',
starCaptions: {
0.5: 'অর্ধেক তারা',
1: 'এক তারা',
1.5: 'দেড় তারা',
2: 'দুই তারা',
2.5: 'আড়াই তারা',
3: 'তিন তারা',
3.5: 'সাড়ে তিন তারা',
4: 'চার তারা',
4.5: 'সাড়ে চার তারা',
5: 'পাঁচ তারা'
},
clearButtonTitle: 'মুছে ফেলুন',
clearCaption: 'কোন তারা নেই'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating German Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['de'] = {
defaultCaption: '{rating} Sterne',
starCaptions: {
0.5: 'Halber Stern',
1: 'Ein Stern',
1.5: 'Eineinhalb Sterne',
2: 'Zwei Sterne',
2.5: 'Zweieinhalb Sterne',
3: 'Drei Sterne',
3.5: 'Dreieinhalb Sterne',
4: 'Vier Sterne',
4.5: 'Viereinhalb Sterne',
5: 'Fünf Sterne'
},
clearButtonTitle: 'Zurücksetzen',
clearCaption: 'Nicht bewertet'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Spanish Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales.es = {
defaultCaption: '{rating} Estrellas',
starCaptions: {
0.5: 'Media Estrella',
1: 'Una Estrella',
1.5: 'Una Estrella y Media',
2: 'Dos Estrellas',
2.5: 'Dos Estrellas y Media',
3: 'Tres Estrellas',
3.5: 'Tres Estrellas y Media',
4: 'Cuatro Estrellas',
4.5: 'Cuatro Estrellas y Media',
5: 'Cinco Estrellas'
},
clearButtonTitle: 'Limpiar',
clearCaption: 'Sin Calificar'
};
}));

View File

@ -0,0 +1,46 @@
/*!
* Star Rating Persian / Farsi Translations
* @author Bt Saeed Sajadi (http://saeedsajadi.ir)
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['fa'] = {
defaultCaption: '{rating} ستاره',
starCaptions: {
0.5: 'نیم ستاره',
1: 'یک ستاره',
1.5: 'یک و نیم ستاره',
2: 'دو ستاره',
2.5: 'دو و نیم ستاره',
3: 'سه ستاره',
3.5: 'سه و نیم ستاره',
4: 'چهار ستاره',
4.5: 'چهار ستاره',
5: 'پنج ستاره'
},
clearButtonTitle: 'پاک کردن',
clearCaption: 'بدون رای'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating French Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['fr'] = {
defaultCaption: '{rating} étoiles',
starCaptions: {
0.5: 'Une demi étoile',
1: 'Une étoile',
1.5: 'Une étoile et demi',
2: 'Deux étoiles',
2.5: 'Deux étoiles et demi',
3: 'Trois étoiles',
3.5: 'Trois étoiles et demi',
4: 'Quatre étoiles',
4.5: 'Quatre étoiles et demi',
5: 'Cinq étoiles'
},
clearButtonTitle: 'Effacer',
clearCaption: 'Non noté'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Greek Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales.gr = {
defaultCaption: '{rating} Αστέρια',
starCaptions: {
0.5: 'Μισό Αστέρι',
1: 'Ένα Αστέρι',
1.5: 'Ένα Αστέρι και Μισό',
2: 'Δύο Αστέρια',
2.5: 'Δύο Αστέρια και Μισό',
3: 'Τρία Αστέρια',
3.5: 'Τρία Αστέρια και Μισό',
4: 'Τέσσερα Αστέρια',
4.5: 'Τέσσερα Αστέρια και Μισό',
5: 'Πέντε Αστέρια'
},
clearButtonTitle: 'Καθαρισμός',
clearCaption: 'Χωρίς Βαθμολογία'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Italian Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['it'] = {
defaultCaption: '{rating} Stelle',
starCaptions: {
0.5: 'Mezza Stella',
1: 'Una Stella',
1.5: 'Una Stella & Mezzo',
2: 'Due Stelle',
2.5: 'Due Stelle & Mezzo',
3: 'Tre Stelle',
3.5: 'Tre Stelle & Mezzo',
4: 'Quattro Stelle',
4.5: 'Quattro Stelle & Mezzo',
5: 'Cinque Stelle'
},
clearButtonTitle: 'Rimuovi',
clearCaption: 'Nessuna valutazione'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Kazakh Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['kk'] = {
defaultCaption: '{rating} Жұлдыз',
starCaptions: {
0.5: 'Жарты жұлдыз',
1: 'Бір жұлдыз',
1.5: 'Бір жарым жұлдыз',
2: 'Екі жұлдыз',
2.5: 'Екі жарым жұлдыз',
3: 'Үш жұлдыз',
3.5: 'Үш жарым жұлдыз',
4: 'Төрт жұлдыз',
4.5: 'Төрт жарым жұлдыз',
5: 'Бес жұлдыз'
},
clearButtonTitle: 'Өшіру',
clearCaption: 'Рейтингсіз'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Korean Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['ko'] = {
defaultCaption: '{rating} 별점',
starCaptions: {
0.5: '0.5 점',
1: '1 점',
1.5: '1.5 점',
2: '2 점',
2.5: '2.5 점',
3: '3 점',
3.5: '3.5 점',
4: '4 점',
4.5: '4.5 점',
5: '5 점'
},
clearButtonTitle: '초기화',
clearCaption: '평점 없음'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Dutch Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['<LANG>'] = {
defaultCaption: '{rating} Sterren',
starCaptions: {
0.5: 'halve ster',
1: 'Één ster',
1.5: 'Anderhalve ster',
2: 'Twee sterren',
2.5: 'Twee en een half sterren',
3: 'Drie sterren',
3.5: 'Drie en een half sterren',
4: 'Vier sterren',
4.5: 'Vier en een half sterren',
5: 'Vijf sterren'
},
clearButtonTitle: 'Wissen',
clearCaption: 'Niet beoordeeld'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Polish Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['pl'] = {
defaultCaption: '{rating} Gwiazdek',
starCaptions: {
0.5: 'Pół Gwiazdki',
1: 'Jedna Gwiazdka',
1.5: 'Półtora Gwiazdek',
2: 'Dwie Gwiazdki',
2.5: 'Dwa i pół Gwiazdek',
3: 'Trzy Gwiazdki',
3.5: 'Trzy i pół Gwiazdek',
4: 'Cztery Gwiazdki',
4.5: 'Cztery i pół Gwiazdek',
5: 'Pięć Gwiazdek'
},
clearButtonTitle: 'Powrót',
clearCaption: 'Nie Oceniać'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Portugese Brazilian Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['pt-BR'] = {
defaultCaption: '{rating} Estrelas',
starCaptions: {
0.5: 'Meia Estrela',
1: 'Uma Estrela',
1.5: 'Uma Estrela e Meia',
2: 'Duas Estrelas',
2.5: 'Duas Estrelas e Meia',
3: 'Três Estrelas',
3.5: 'Três Estrelas e Meia',
4: 'Quatro Estrelas',
4.5: 'Quatro Estrelas e Meia',
5: 'Cinco Estrelas'
},
clearButtonTitle: 'Limpar',
clearCaption: 'Não Avaliado'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Romanian Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['ro'] = {
defaultCaption: '{rating} stele',
starCaptions: {
0.5: 'Jumatate de stea',
1: 'O Stea',
1.5: 'O stea si jumatate',
2: 'Doua stele',
2.5: 'Doua stele si jumatate',
3: 'Trei stele',
3.5: 'Trei stele si jumatate',
4: 'Patru stele',
4.5: 'Patru stele si jumatate',
5: 'Cinci stele'
},
clearButtonTitle: 'Sterge',
clearCaption: 'Fara vot'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Russian Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['ru'] = {
defaultCaption: '{rating} Звёзды',
starCaptions: {
0.5: 'Половина звезды',
1: 'Одна звезда',
1.5: 'Полторы звезды',
2: 'Две звезды',
2.5: 'Две с половиной звезды',
3: 'Три звезды',
3.5: 'Три с половиной звезды',
4: 'Четыре звезды',
4.5: 'Четыре с половиной звезды',
5: 'Пять звёзд'
},
clearButtonTitle: 'Очистить',
clearCaption: 'Без рейтинга'
};
}));

View File

@ -0,0 +1,46 @@
/*!
* Star Rating Turkish Translations
* @author Oguz Külcü <grafikcoder@gmail.com>
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['tr'] = {
defaultCaption: '{rating} Yıldız',
starCaptions: {
0.5: 'Yarım Yıldız',
1: 'Tek Yıldız',
1.5: 'Bir Buçuk Yıldız',
2: 'İki Yıldız',
2.5: 'İki Buçuk Yıldız',
3: 'Üç Yıldız',
3.5: 'Üç Buçuk Yıldız',
4: 'Dört Yıldız',
4.5: 'Dört Buçuk Yıldız',
5: 'Beş Yıldız'
},
clearButtonTitle: 'Temizle',
clearCaption: 'Oylanmamış'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Ukranian Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['ua'] = {
defaultCaption: '{rating} Зірки',
starCaptions: {
0.5: 'Пів зірки',
1: 'Одна зірка',
1.5: 'Півтори зірки',
2: 'Дві зірки',
2.5: 'Дві з половиною зірки',
3: 'Три зірки',
3.5: 'Три з половиною зірки',
4: 'Чотири зірки',
4.5: 'Чотири з половиною зірки',
5: 'П\'ять зірок'
},
clearButtonTitle: 'Очистити',
clearCaption: 'Без рейтингу'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Chinese Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['zh'] = {
defaultCaption: '{rating} 星',
starCaptions: {
0.5: '半星',
1: '一星',
1.5: '一星半',
2: '二星',
2.5: '二星半',
3: '三星',
3.5: '三星半',
4: '四星',
4.5: '四星半',
5: '五星'
},
clearButtonTitle: '清除',
clearCaption: '未评级'
};
}));

View File

@ -0,0 +1,708 @@
/*!
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
'use strict';
$.fn.ratingLocales = {};
$.fn.ratingThemes = {};
var $h, Rating;
// Global helper methods and constants
$h = {
NAMESPACE: '.rating',
DEFAULT_MIN: 0,
DEFAULT_MAX: 5,
DEFAULT_STEP: 0.5,
isEmpty: function (value, trim) {
return value === null || value === undefined || value.length === 0 || (trim && $.trim(value) === '');
},
getCss: function (condition, css) {
return condition ? ' ' + css : '';
},
addCss: function ($el, css) {
$el.removeClass(css).addClass(css);
},
getDecimalPlaces: function (num) {
var m = ('' + num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
return !m ? 0 : Math.max(0, (m[1] ? m[1].length : 0) - (m[2] ? +m[2] : 0));
},
applyPrecision: function (val, precision) {
return parseFloat(val.toFixed(precision));
},
handler: function ($el, event, callback, skipOff, skipNS) {
var ev = skipNS ? event : event.split(' ').join($h.NAMESPACE + ' ') + $h.NAMESPACE;
if (!skipOff) {
$el.off(ev);
}
$el.on(ev, function (e) {
var cb = $.proxy(callback, self);
cb(e);
});
}
};
// Rating constructor
Rating = function (element, options) {
var self = this;
self.$element = $(element);
self._init(options);
};
// Rating prototype
Rating.prototype = {
constructor: Rating,
_parseAttr: function (vattr, options) {
var self = this, $el = self.$element, elType = $el.attr('type'), finalVal, val, chk, out;
if (elType === 'range' || elType === 'number') {
val = options[vattr] || $el.data(vattr) || $el.attr(vattr);
switch (vattr) {
case 'min':
chk = $h.DEFAULT_MIN;
break;
case 'max':
chk = $h.DEFAULT_MAX;
break;
default:
chk = $h.DEFAULT_STEP;
}
finalVal = $h.isEmpty(val) ? chk : val;
out = parseFloat(finalVal);
} else {
out = parseFloat(options[vattr]);
}
return isNaN(out) ? chk : out;
},
_parseValue: function (val) {
var self = this, v = parseFloat(val);
if (isNaN(v)) {
v = self.clearValue;
}
return (self.zeroAsNull && (v === 0 || v === '0') ? null : v);
},
_setDefault: function (key, val) {
var self = this;
if ($h.isEmpty(self[key])) {
self[key] = val;
}
},
_initSlider: function (options) {
var self = this, v = self.$element.val();
self.initialValue = $h.isEmpty(v) ? 0 : v;
self._setDefault('min', self._parseAttr('min', options));
self._setDefault('max', self._parseAttr('max', options));
self._setDefault('step', self._parseAttr('step', options));
if (isNaN(self.min) || $h.isEmpty(self.min)) {
self.min = $h.DEFAULT_MIN;
}
if (isNaN(self.max) || $h.isEmpty(self.max)) {
self.max = $h.DEFAULT_MAX;
}
if (isNaN(self.step) || $h.isEmpty(self.step) || self.step === 0) {
self.step = $h.DEFAULT_STEP;
}
self.diff = self.max - self.min;
self._setDefault('minThreshold', self.min);
if (self.minThreshold < self.min) {
self.minThreshold = self.min;
}
if (self.minThreshold > self.max) {
self.minThreshold = self.max;
}
},
_initHighlight: function (v) {
var self = this, w, cap = self._getCaption();
if (!v) {
v = self.$element.val();
}
w = self.getWidthFromValue(v) + '%';
self.$filledStars.width(w);
self.cache = {caption: cap, width: w, val: v};
},
_getContainerCss: function () {
var self = this;
return 'rating-container' +
$h.getCss(self.theme, 'theme-' + self.theme) +
$h.getCss(self.rtl, 'rating-rtl') +
$h.getCss(self.size, 'rating-' + self.size) +
$h.getCss(self.animate, 'rating-animate') +
$h.getCss(self.disabled || self.readonly, 'rating-disabled') +
$h.getCss(self.containerClass, self.containerClass) +
(self.displayOnly ? ' is-display-only' : '');
},
_checkDisabled: function () {
var self = this, $el = self.$element, opts = self.options;
self.disabled = opts.disabled === undefined ? $el.attr('disabled') || false : opts.disabled;
self.readonly = opts.readonly === undefined ? $el.attr('readonly') || false : opts.readonly;
self.inactive = (self.disabled || self.readonly);
$el.attr({disabled: self.disabled, readonly: self.readonly});
},
_addContent: function (type, content) {
var self = this, $container = self.$container, isClear = type === 'clear';
if (self.rtl) {
return isClear ? $container.append(content) : $container.prepend(content);
} else {
return isClear ? $container.prepend(content) : $container.append(content);
}
},
_generateRating: function () {
var self = this, $el = self.$element, $rating, $container, w;
$container = self.$container = $(document.createElement('div')).insertBefore($el);
$h.addCss($container, self._getContainerCss());
self.$rating = $rating = $(document.createElement('div')).attr('class', 'rating-stars').appendTo($container)
.append(self._getStars('empty')).append(self._getStars('filled'));
if (self.keyboardEnabled) {
self.$rating.attr('tabindex', self.tabindex);
}
self.$emptyStars = $rating.find('.empty-stars');
self.$filledStars = $rating.find('.filled-stars');
self._renderCaption();
self._renderClear();
self._initHighlight();
self._initStarTitles();
var i = 1;
if (self.rtl) {
w = Math.max(self.$emptyStars.outerWidth(), self.$filledStars.outerWidth());
self.$emptyStars.width(w);
}
$container.insertBefore($el);
},
_getCaption: function () {
var self = this;
return self.$caption && self.$caption.length ? self.$caption.html() : self.defaultCaption;
},
_setCaption: function (content) {
var self = this;
if (self.$caption && self.$caption.length) {
self.$caption.html(content);
}
},
_renderCaption: function () {
var self = this, val = self.$element.val(), html, $cap = self.captionElement ? $(self.captionElement) : '';
if (!self.showCaption) {
return;
}
html = self.fetchCaption(val);
if ($cap && $cap.length) {
$h.addCss($cap, 'caption');
$cap.html(html);
self.$caption = $cap;
return;
}
self._addContent('caption', '<div class="caption">' + html + '</div>');
self.$caption = self.$container.find('.caption');
},
_renderClear: function () {
var self = this, css, $clr = self.clearElement ? $(self.clearElement) : '';
if (!self.showClear) {
return;
}
css = self._getClearClass();
if ($clr.length) {
$h.addCss($clr, css);
$clr.attr({'title': self.clearButtonTitle}).html(self.clearButton);
self.$clear = $clr;
return;
}
self._addContent('clear',
'<div class="' + css + '" title="' + self.clearButtonTitle + '">' + self.clearButton + '</div>');
self.$clear = self.$container.find('.' + self.clearButtonBaseClass);
},
_getClearClass: function () {
var self = this;
return self.clearButtonBaseClass + ' ' + (self.inactive ? '' : self.clearButtonActiveClass);
},
_toggleHover: function (out) {
var self = this, w, width, caption;
if (!out) {
return;
}
if (self.hoverChangeStars) {
w = self.getWidthFromValue(self.clearValue);
width = out.val <= self.clearValue ? w + '%' : out.width;
self.$filledStars.css('width', width);
}
if (self.hoverChangeCaption) {
caption = out.val <= self.clearValue ? self.fetchCaption(self.clearValue) : out.caption;
if (caption) {
self._setCaption(caption + '');
}
}
},
_init: function (options) {
var self = this, $el = self.$element.attr('tabindex', -1).addClass('rating-input'), v,
m = self.minThreshold;
self.options = options;
$.each(options, function (key, value) {
self[key] = value;
});
if (self.rtl || $el.attr('dir') === 'rtl') {
self.rtl = true;
$el.attr('dir', 'rtl');
}
self.starClicked = false;
self.clearClicked = false;
self._initSlider(options);
self._checkDisabled();
if (self.displayOnly) {
self.inactive = true;
self.showClear = false;
self.hoverEnabled = false;
self.hoverChangeCaption = false;
self.hoverChangeStars = false;
}
self._generateRating();
self._initEvents();
self._listen();
if (!$h.isEmpty(m) && ($h.isEmpty($el.val()) || $el.val() < m)) {
$el.val(m);
}
v = self._parseValue($el.val());
$el.val(v);
return $el.removeClass('rating-loading');
},
_initCaptionTitle: function () {
var self = this, caption;
caption = self.fetchCaption(self.$element.val());
self.$rating.attr('title', $(caption).text());
},
_trigChange: function (params) {
var self = this;
self._initStarTitles();
self.$element.trigger('change').trigger('rating:change', params);
},
_initEvents: function () {
var self = this;
self.events = {
_getTouchPosition: function (e) {
var pageX = $h.isEmpty(e.pageX) ? e.originalEvent.touches[0].pageX : e.pageX;
return pageX - self.$rating.offset().left;
},
_listenClick: function (e, callback) {
e.stopPropagation();
e.preventDefault();
if (e.handled !== true) {
callback(e);
e.handled = true;
} else {
return false;
}
},
_noMouseAction: function (e) {
return !self.mouseEnabled || !self.hoverEnabled || self.inactive || (e && e.isDefaultPrevented());
},
initTouch: function (e) {
//noinspection JSUnresolvedVariable
var ev, touches, pos, out, caption, w, width, params, clrVal = self.clearValue || 0,
isTouchCapable = 'ontouchstart' in window ||
(window.DocumentTouch && document instanceof window.DocumentTouch);
if (!isTouchCapable || self.inactive) {
return;
}
ev = e.originalEvent;
//noinspection JSUnresolvedVariable
touches = !$h.isEmpty(ev.touches) ? ev.touches : ev.changedTouches;
pos = self.events._getTouchPosition(touches[0]);
if (e.type === 'touchend') {
self._setStars(pos);
params = [self.$element.val(), self._getCaption()];
self._trigChange(params);
self.starClicked = true;
} else {
out = self.calculate(pos);
caption = out.val <= clrVal ? self.fetchCaption(clrVal) : out.caption;
w = self.getWidthFromValue(clrVal);
width = out.val <= clrVal ? w + '%' : out.width;
self._setCaption(caption);
self.$filledStars.css('width', width);
}
},
starClick: function (e) {
var pos, params;
self.events._listenClick(e, function (ev) {
if (self.inactive) {
return false;
}
pos = self.events._getTouchPosition(ev);
self._setStars(pos);
params = [self.$element.val(), self._getCaption()];
self._trigChange(params);
self.starClicked = true;
});
},
clearClick: function (e) {
self.events._listenClick(e, function () {
if (!self.inactive) {
self.clear();
self.clearClicked = true;
}
});
},
starMouseMove: function (e) {
var pos, out;
if (self.events._noMouseAction(e)) {
return;
}
self.starClicked = false;
pos = self.events._getTouchPosition(e);
out = self.calculate(pos);
self._toggleHover(out);
self.$element.trigger('rating:hover', [out.val, out.caption, 'stars']);
},
starMouseLeave: function (e) {
var out;
if (self.events._noMouseAction(e) || self.starClicked) {
return;
}
out = self.cache;
self._toggleHover(out);
self.$element.trigger('rating:hoverleave', ['stars']);
},
clearMouseMove: function (e) {
var caption, val, width, out;
if (self.events._noMouseAction(e) || !self.hoverOnClear) {
return;
}
self.clearClicked = false;
caption = '<span class="' + self.clearCaptionClass + '">' + self.clearCaption + '</span>';
val = self.clearValue;
width = self.getWidthFromValue(val) || 0;
out = {caption: caption, width: width, val: val};
self._toggleHover(out);
self.$element.trigger('rating:hover', [val, caption, 'clear']);
},
clearMouseLeave: function (e) {
var out;
if (self.events._noMouseAction(e) || self.clearClicked || !self.hoverOnClear) {
return;
}
out = self.cache;
self._toggleHover(out);
self.$element.trigger('rating:hoverleave', ['clear']);
},
resetForm: function (e) {
if (e && e.isDefaultPrevented()) {
return;
}
if (!self.inactive) {
self.reset();
}
},
focus: function (e) {
self.$rating.focus();
self.$element.trigger('rating:focus');
},
blur: function (e) {
self.$element.trigger('rating:blur');
},
keydown: function (e) {
if (self.inactive || !self.keyboardEnabled) {
return;
}
var $el = self.$element, v = $el.val(), isUpdated = false, step = parseFloat(self.step),
precision = $h.getDecimalPlaces(step), upKey = self.rtl ? 37 : 39, dnKey = self.rtl ? 39 : 37,
val = v ? parseFloat(v) : 0, key = parseInt(e.which || e.keyCode || 0, 10);
if (key === upKey && val < self.max) { // key right (increase)
val += step;
isUpdated = true;
}
if (key === dnKey && val > self.minThreshold) { // key left (decrease)
val -= step;
isUpdated = true
}
if (isUpdated) {
val = $h.applyPrecision(val, precision);
$el.val(val);
self._trigChange([val, self._getCaption()])
self.showStars($el.val());
self.$rating.focus();
}
if (key === 37 || key === 39) {
$el.trigger('rating:keydown', [val, self._getCaption()]);
}
}
};
},
_listen: function () {
var self = this, $el = self.$element, $form = $el.closest('form'), $rating = self.$rating,
$clear = self.$clear, events = self.events, ns = $h.NAMESPACE,
mouseEvents = 'mouseenter' + ns + ' mouseleave' + ns, $stars = self.$rating.find('.star');
$h.handler($rating, 'touchstart touchmove touchend', events.initTouch);
$h.handler($rating, 'click touchstart', events.starClick);
$h.handler($rating, 'mousemove', events.starMouseMove);
$h.handler($rating, 'mouseleave', events.starMouseLeave);
$h.handler($rating, 'keydown', events.keydown);
$h.handler($rating, 'blur', events.blur);
if (self.showClear && $clear.length) {
$h.handler($clear, 'click touchstart', events.clearClick);
$h.handler($clear, 'mousemove', events.clearMouseMove);
$h.handler($clear, 'mouseleave', events.clearMouseLeave);
}
if ($form.length) {
$h.handler($form, 'reset', events.resetForm, true);
}
$stars.off(mouseEvents).on(mouseEvents, function (e) {
var $star = $(this), index = $star.index(), status = $star.parent().attr('class').slice(0, -1);
self.$element.trigger('rating:' + e.type, [index + 1, status, $star]);
});
$h.handler(self.$container, 'click', events.focus);
return $el;
},
_getStars: function (type) {
var self = this, stars = '<span class="' + type + '-stars">', i;
for (i = 1; i <= self.stars; i++) {
stars += '<span class="star">' + self[type + 'Star'] + '</span>';
}
return stars + '</span>';
},
_initStarTitles: function (val) {
var self = this;
if (self.showCaptionAsTitle) {
self._initCaptionTitle();
return;
}
var starTitles = self.starTitles, setTitles;
setTitles = function ($stars) {
var i = 1, title;
$stars.each(function () {
var $star = $(this), j, title;
if (typeof starTitles === 'function') {
j = i === Math.floor(val) ? val : i;
title = starTitles(j);
} else {
title = starTitles[i];
}
if (title) {
$star.attr({title: title});
}
i++;
});
};
setTitles(self.$emptyStars.find('.star'));
setTitles(self.$filledStars.find('.star'));
},
_setStars: function (pos) {
var self = this, out = arguments.length ? self.calculate(pos) : self.calculate(), $el = self.$element,
v = self._parseValue(out.val);
$el.val(v);
self.$filledStars.css('width', out.width);
self._setCaption(out.caption);
self.cache = out;
self._initStarTitles(v);
return $el;
},
showStars: function (val) {
var self = this, v = self._parseValue(val);
self.$element.val(v);
return self._setStars();
},
calculate: function (pos) {
var self = this, defaultVal = $h.isEmpty(self.$element.val()) ? 0 : self.$element.val(),
val = arguments.length ? self.getValueFromPosition(pos) : defaultVal,
caption = self.fetchCaption(val), width = self.getWidthFromValue(val);
width += '%';
return {caption: caption, width: width, val: val};
},
getValueFromPosition: function (pos) {
var self = this, precision = $h.getDecimalPlaces(self.step), val, factor, maxWidth = self.$rating.width();
factor = (self.diff * pos) / (maxWidth * self.step);
factor = self.rtl ? Math.floor(factor) : Math.ceil(factor);
val = $h.applyPrecision(parseFloat(self.min + factor * self.step), precision);
val = Math.max(Math.min(val, self.max), self.minThreshold);
return self.rtl ? (self.max - val) : val;
},
getWidthFromValue: function (val) {
var self = this, min = self.min, max = self.max, factor, $r = self.$emptyStars, w;
if (!val || val <= self.min || min === max) {
return 0;
}
val = Math.max(val, self.minThreshold);
w = $r.outerWidth();
factor = w ? $r.width() / w : 1;
if (val >= max) {
return 100;
}
return (val - min) * factor * 100 / (max - min);
},
fetchCaption: function (rating) {
var self = this, val = parseFloat(rating) || self.clearValue, css, cap, capVal, cssVal, caption,
vCap = self.starCaptions, vCss = self.starCaptionClasses, width = self.getWidthFromValue(val);
if (val && val !== self.clearValue) {
val = $h.applyPrecision(val, $h.getDecimalPlaces(self.step));
}
cssVal = typeof vCss === 'function' ? vCss(val, width) : vCss[val];
capVal = typeof vCap === 'function' ? vCap(val, width) : vCap[val];
cap = $h.isEmpty(capVal) ? self.defaultCaption.replace(/\{rating}/g, val) : capVal;
css = $h.isEmpty(cssVal) ? self.clearCaptionClass : cssVal;
caption = (val === self.clearValue) ? self.clearCaption : cap;
return '<span class="' + css + '">' + caption + '</span>';
},
destroy: function () {
var self = this, $el = self.$element;
if (!$h.isEmpty(self.$container)) {
self.$container.before($el).remove();
}
$.removeData($el.get(0));
return $el.off('rating').removeClass('rating rating-input');
},
create: function (options) {
var self = this, opts = options || self.options || {};
return self.destroy().rating(opts);
},
clear: function () {
var self = this, title = '<span class="' + self.clearCaptionClass + '">' + self.clearCaption + '</span>';
if (!self.inactive) {
self._setCaption(title);
}
return self.showStars(self.clearValue).trigger('change').trigger('rating:clear');
},
reset: function () {
var self = this;
return self.showStars(self.initialValue).trigger('rating:reset');
},
update: function (val) {
var self = this;
return arguments.length ? self.showStars(val) : self.$element;
},
refresh: function (options) {
var self = this, $el = self.$element;
if (!options) {
return $el;
}
return self.destroy().rating($.extend(true, self.options, options)).trigger('rating:refresh');
}
};
$.fn.rating = function (option) {
var args = Array.apply(null, arguments), retvals = [];
args.shift();
this.each(function () {
var self = $(this), data = self.data('rating'), options = typeof option === 'object' && option,
theme = options.theme || self.data('theme'), lang = options.language || self.data('language') || 'en',
thm = {}, loc = {}, opts;
if (!data) {
if (theme) {
thm = $.fn.ratingThemes[theme] || {};
}
if (lang !== 'en' && !$h.isEmpty($.fn.ratingLocales[lang])) {
loc = $.fn.ratingLocales[lang];
}
opts = $.extend(true, {}, $.fn.rating.defaults, thm, $.fn.ratingLocales.en, loc, options, self.data());
data = new Rating(this, opts);
self.data('rating', data);
}
if (typeof option === 'string') {
retvals.push(data[option].apply(data, args));
}
});
switch (retvals.length) {
case 0:
return this;
case 1:
return retvals[0] === undefined ? this : retvals[0];
default:
return retvals;
}
};
$.fn.rating.defaults = {
theme: 'krajee-svg',
language: 'en',
stars: 5,
tabindex: 0,
keyboardEnabled: true,
mouseEnabled: true,
containerClass: '',
size: 'md',
animate: true,
displayOnly: false,
rtl: false,
showClear: true,
showCaption: true,
starCaptionClasses: {
0.5: 'caption-badge caption-danger',
1: 'caption-badge caption-danger',
1.5: 'caption-badge caption-warning',
2: 'caption-badge caption-warning',
2.5: 'caption-badge caption-info',
3: 'caption-badge caption-info',
3.5: 'caption-badge caption-primary',
4: 'caption-badge caption-primary',
4.5: 'caption-badge caption-success',
5: 'caption-badge caption-success'
},
filledStar: '<span class="krajee-icon krajee-icon-star"></span>', // krajee-svg theme
emptyStar: '<span class="krajee-icon krajee-icon-star"></span>', // krajee-svg theme
clearButton: '<span class="krajee-icon-clear"></span>', // krajee-svg theme
clearButtonBaseClass: 'clear-rating',
clearButtonActiveClass: 'clear-rating-active',
clearCaptionClass: 'caption-badge caption-secondary',
clearValue: null,
captionElement: null,
clearElement: null,
showCaptionAsTitle: false,
hoverEnabled: true,
hoverChangeCaption: true,
hoverChangeStars: true,
hoverOnClear: true,
zeroAsNull: true
};
$.fn.ratingLocales.en = {
defaultCaption: '{rating} Stars',
starCaptions: {
0.5: 'Half Star',
1: 'One Star',
1.5: 'One & Half Star',
2: 'Two Stars',
2.5: 'Two & Half Stars',
3: 'Three Stars',
3.5: 'Three & Half Stars',
4: 'Four Stars',
4.5: 'Four & Half Stars',
5: 'Five Stars'
},
starTitles: {
1: 'One Star',
2: 'Two Stars',
3: 'Three Stars',
4: 'Four Stars',
5: 'Five Stars'
},
clearButtonTitle: 'Clear',
clearCaption: 'Not Rated'
};
$.fn.rating.Constructor = Rating;
/**
* Convert automatically inputs with class 'rating' into Krajee's star rating control.
*/
$(document).ready(function () {
var $input = $('input.rating');
if ($input.length) {
$input.removeClass('rating-loading').addClass('rating-loading').rating();
}
});
}));

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,45 @@
/*!
* Star Rating <LANG> Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['<LANG>'] = {
defaultCaption: '{rating} Stars',
starCaptions: {
0.5: 'Half Star',
1: 'One Star',
1.5: 'One & Half Star',
2: 'Two Stars',
2.5: 'Two & Half Stars',
3: 'Three Stars',
3.5: 'Three & Half Stars',
4: 'Four Stars',
4.5: 'Four & Half Stars',
5: 'Five Stars'
},
clearButtonTitle: 'Clear',
clearCaption: 'Not Rated'
};
}));

View File

@ -0,0 +1,46 @@
/*!
* Star Rating Arabic Translations
* @author Abdulrahman Zaiter
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['ar'] = {
defaultCaption: '{rating} نجوم',
starCaptions: {
0.5: 'نصف نجمة',
1: 'نجمة واحدة',
1.5: 'نجمة ونصف',
2: 'نجمتين',
2.5: 'نجمتين ونصف',
3: 'ثلاث نجمات',
3.5: 'ثلاث نجمات ونصف',
4: 'أربع نجمات',
4.5: 'أربع نجمات ونصف',
5: 'خمسة نجمات'
},
clearButtonTitle: 'مسح',
clearCaption: 'غير مصنّف'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Bengali Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['bn'] = {
defaultCaption: '{rating} তারা',
starCaptions: {
0.5: 'অর্ধেক তারা',
1: 'এক তারা',
1.5: 'দেড় তারা',
2: 'দুই তারা',
2.5: 'আড়াই তারা',
3: 'তিন তারা',
3.5: 'সাড়ে তিন তারা',
4: 'চার তারা',
4.5: 'সাড়ে চার তারা',
5: 'পাঁচ তারা'
},
clearButtonTitle: 'মুছে ফেলুন',
clearCaption: 'কোন তারা নেই'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating German Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['de'] = {
defaultCaption: '{rating} Sterne',
starCaptions: {
0.5: 'Halber Stern',
1: 'Ein Stern',
1.5: 'Eineinhalb Sterne',
2: 'Zwei Sterne',
2.5: 'Zweieinhalb Sterne',
3: 'Drei Sterne',
3.5: 'Dreieinhalb Sterne',
4: 'Vier Sterne',
4.5: 'Viereinhalb Sterne',
5: 'Fünf Sterne'
},
clearButtonTitle: 'Zurücksetzen',
clearCaption: 'Nicht bewertet'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Spanish Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales.es = {
defaultCaption: '{rating} Estrellas',
starCaptions: {
0.5: 'Media Estrella',
1: 'Una Estrella',
1.5: 'Una Estrella y Media',
2: 'Dos Estrellas',
2.5: 'Dos Estrellas y Media',
3: 'Tres Estrellas',
3.5: 'Tres Estrellas y Media',
4: 'Cuatro Estrellas',
4.5: 'Cuatro Estrellas y Media',
5: 'Cinco Estrellas'
},
clearButtonTitle: 'Limpiar',
clearCaption: 'Sin Calificar'
};
}));

View File

@ -0,0 +1,46 @@
/*!
* Star Rating Persian / Farsi Translations
* @author Bt Saeed Sajadi (http://saeedsajadi.ir)
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['fa'] = {
defaultCaption: '{rating} ستاره',
starCaptions: {
0.5: 'نیم ستاره',
1: 'یک ستاره',
1.5: 'یک و نیم ستاره',
2: 'دو ستاره',
2.5: 'دو و نیم ستاره',
3: 'سه ستاره',
3.5: 'سه و نیم ستاره',
4: 'چهار ستاره',
4.5: 'چهار ستاره',
5: 'پنج ستاره'
},
clearButtonTitle: 'پاک کردن',
clearCaption: 'بدون رای'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating French Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['fr'] = {
defaultCaption: '{rating} étoiles',
starCaptions: {
0.5: 'Une demi étoile',
1: 'Une étoile',
1.5: 'Une étoile et demi',
2: 'Deux étoiles',
2.5: 'Deux étoiles et demi',
3: 'Trois étoiles',
3.5: 'Trois étoiles et demi',
4: 'Quatre étoiles',
4.5: 'Quatre étoiles et demi',
5: 'Cinq étoiles'
},
clearButtonTitle: 'Effacer',
clearCaption: 'Non noté'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Greek Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales.gr = {
defaultCaption: '{rating} Αστέρια',
starCaptions: {
0.5: 'Μισό Αστέρι',
1: 'Ένα Αστέρι',
1.5: 'Ένα Αστέρι και Μισό',
2: 'Δύο Αστέρια',
2.5: 'Δύο Αστέρια και Μισό',
3: 'Τρία Αστέρια',
3.5: 'Τρία Αστέρια και Μισό',
4: 'Τέσσερα Αστέρια',
4.5: 'Τέσσερα Αστέρια και Μισό',
5: 'Πέντε Αστέρια'
},
clearButtonTitle: 'Καθαρισμός',
clearCaption: 'Χωρίς Βαθμολογία'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Italian Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['it'] = {
defaultCaption: '{rating} Stelle',
starCaptions: {
0.5: 'Mezza Stella',
1: 'Una Stella',
1.5: 'Una Stella & Mezzo',
2: 'Due Stelle',
2.5: 'Due Stelle & Mezzo',
3: 'Tre Stelle',
3.5: 'Tre Stelle & Mezzo',
4: 'Quattro Stelle',
4.5: 'Quattro Stelle & Mezzo',
5: 'Cinque Stelle'
},
clearButtonTitle: 'Rimuovi',
clearCaption: 'Nessuna valutazione'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Kazakh Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['kk'] = {
defaultCaption: '{rating} Жұлдыз',
starCaptions: {
0.5: 'Жарты жұлдыз',
1: 'Бір жұлдыз',
1.5: 'Бір жарым жұлдыз',
2: 'Екі жұлдыз',
2.5: 'Екі жарым жұлдыз',
3: 'Үш жұлдыз',
3.5: 'Үш жарым жұлдыз',
4: 'Төрт жұлдыз',
4.5: 'Төрт жарым жұлдыз',
5: 'Бес жұлдыз'
},
clearButtonTitle: 'Өшіру',
clearCaption: 'Рейтингсіз'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Korean Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['ko'] = {
defaultCaption: '{rating} 별점',
starCaptions: {
0.5: '0.5 점',
1: '1 점',
1.5: '1.5 점',
2: '2 점',
2.5: '2.5 점',
3: '3 점',
3.5: '3.5 점',
4: '4 점',
4.5: '4.5 점',
5: '5 점'
},
clearButtonTitle: '초기화',
clearCaption: '평점 없음'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Dutch Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['<LANG>'] = {
defaultCaption: '{rating} Sterren',
starCaptions: {
0.5: 'halve ster',
1: 'Één ster',
1.5: 'Anderhalve ster',
2: 'Twee sterren',
2.5: 'Twee en een half sterren',
3: 'Drie sterren',
3.5: 'Drie en een half sterren',
4: 'Vier sterren',
4.5: 'Vier en een half sterren',
5: 'Vijf sterren'
},
clearButtonTitle: 'Wissen',
clearCaption: 'Niet beoordeeld'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Polish Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['pl'] = {
defaultCaption: '{rating} Gwiazdek',
starCaptions: {
0.5: 'Pół Gwiazdki',
1: 'Jedna Gwiazdka',
1.5: 'Półtora Gwiazdek',
2: 'Dwie Gwiazdki',
2.5: 'Dwa i pół Gwiazdek',
3: 'Trzy Gwiazdki',
3.5: 'Trzy i pół Gwiazdek',
4: 'Cztery Gwiazdki',
4.5: 'Cztery i pół Gwiazdek',
5: 'Pięć Gwiazdek'
},
clearButtonTitle: 'Powrót',
clearCaption: 'Nie Oceniać'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Portugese Brazilian Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['pt-BR'] = {
defaultCaption: '{rating} Estrelas',
starCaptions: {
0.5: 'Meia Estrela',
1: 'Uma Estrela',
1.5: 'Uma Estrela e Meia',
2: 'Duas Estrelas',
2.5: 'Duas Estrelas e Meia',
3: 'Três Estrelas',
3.5: 'Três Estrelas e Meia',
4: 'Quatro Estrelas',
4.5: 'Quatro Estrelas e Meia',
5: 'Cinco Estrelas'
},
clearButtonTitle: 'Limpar',
clearCaption: 'Não Avaliado'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Romanian Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['ro'] = {
defaultCaption: '{rating} stele',
starCaptions: {
0.5: 'Jumatate de stea',
1: 'O Stea',
1.5: 'O stea si jumatate',
2: 'Doua stele',
2.5: 'Doua stele si jumatate',
3: 'Trei stele',
3.5: 'Trei stele si jumatate',
4: 'Patru stele',
4.5: 'Patru stele si jumatate',
5: 'Cinci stele'
},
clearButtonTitle: 'Sterge',
clearCaption: 'Fara vot'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Russian Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['ru'] = {
defaultCaption: '{rating} Звёзды',
starCaptions: {
0.5: 'Половина звезды',
1: 'Одна звезда',
1.5: 'Полторы звезды',
2: 'Две звезды',
2.5: 'Две с половиной звезды',
3: 'Три звезды',
3.5: 'Три с половиной звезды',
4: 'Четыре звезды',
4.5: 'Четыре с половиной звезды',
5: 'Пять звёзд'
},
clearButtonTitle: 'Очистить',
clearCaption: 'Без рейтинга'
};
}));

View File

@ -0,0 +1,46 @@
/*!
* Star Rating Turkish Translations
* @author Oguz Külcü <grafikcoder@gmail.com>
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['tr'] = {
defaultCaption: '{rating} Yıldız',
starCaptions: {
0.5: 'Yarım Yıldız',
1: 'Tek Yıldız',
1.5: 'Bir Buçuk Yıldız',
2: 'İki Yıldız',
2.5: 'İki Buçuk Yıldız',
3: 'Üç Yıldız',
3.5: 'Üç Buçuk Yıldız',
4: 'Dört Yıldız',
4.5: 'Dört Buçuk Yıldız',
5: 'Beş Yıldız'
},
clearButtonTitle: 'Temizle',
clearCaption: 'Oylanmamış'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Ukranian Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['ua'] = {
defaultCaption: '{rating} Зірки',
starCaptions: {
0.5: 'Пів зірки',
1: 'Одна зірка',
1.5: 'Півтори зірки',
2: 'Дві зірки',
2.5: 'Дві з половиною зірки',
3: 'Три зірки',
3.5: 'Три з половиною зірки',
4: 'Чотири зірки',
4.5: 'Чотири з половиною зірки',
5: 'П\'ять зірок'
},
clearButtonTitle: 'Очистити',
clearCaption: 'Без рейтингу'
};
}));

View File

@ -0,0 +1,45 @@
/*!
* Star Rating Chinese Translations
*
* This file must be loaded after 'star-rating.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* NOTE: this file must be saved in UTF-8 encoding.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingLocales['zh'] = {
defaultCaption: '{rating} 星',
starCaptions: {
0.5: '半星',
1: '一星',
1.5: '一星半',
2: '二星',
2.5: '二星半',
3: '三星',
3.5: '三星半',
4: '四星',
4.5: '四星半',
5: '五星'
},
clearButtonTitle: '清除',
clearCaption: '未评级'
};
}));

View File

@ -0,0 +1,40 @@
{
"name": "bootstrap-star-rating",
"version": "4.1.2",
"homepage": "https://github.com/kartik-v/bootstrap-star-rating",
"author": "Kartik Visweswaran <kartikv2@gmail.com>",
"description": "A simple yet powerful JQuery star rating plugin for Bootstrap.",
"bugs": {
"url": "https://github.com/kartik-v/bootstrap-star-rating/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/kartik-v/bootstrap-star-rating.git"
},
"keywords": [
"bootstrap",
"star",
"rating",
"font",
"awesome",
"glyphicon",
"svg"
],
"main": "./js/star-rating.min.js",
"style": "./css/star-rating.min.css",
"peerDependencies": {
"jquery": ">= 1.9.0",
"bootstrap": ">= 3.0.0"
},
"license": "BSD-3-Clause",
"dependencies": {
"opencollective-postinstall": "^2.0.2"
},
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/bootstrap-star-rating"
},
"scripts": {
"postinstall": "opencollective-postinstall || true"
}
}

View File

@ -0,0 +1,16 @@
/*!
* Krajee Font Awesome 4.x Theme styling for bootstrap-star-rating.
* This file must be loaded after 'star-rating.css'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
.theme-krajee-fa .star {
font-size: 1.1em;
}

View File

@ -0,0 +1,30 @@
/*!
* Krajee Font Awesome 4.x Theme configuration for bootstrap-star-rating.
* This file must be loaded after 'star-rating.js'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingThemes['krajee-fa'] = {
filledStar: '<i class="fa fa-star"></i>',
emptyStar: '<i class="fa fa-star-o"></i>',
clearButton: '<i class="fa fa-lg fa-minus-circle"></i>'
};
}));

View File

@ -0,0 +1,14 @@
/*!
* Krajee Font Awesome 4.x Theme styling for bootstrap-star-rating.
* This file must be loaded after 'star-rating.css'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
.theme-krajee-fa .star{font-size:1.1em}

View File

@ -0,0 +1,13 @@
/*!
* Krajee Font Awesome 4.x Theme configuration for bootstrap-star-rating.
* This file must be loaded after 'star-rating.js'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof module&&"object"==typeof module.exports?require("jquery"):window.jQuery)}(function(e){"use strict";e.fn.ratingThemes["krajee-fa"]={filledStar:'<i class="fa fa-star"></i>',emptyStar:'<i class="fa fa-star-o"></i>',clearButton:'<i class="fa fa-lg fa-minus-circle"></i>'}});

View File

@ -0,0 +1,16 @@
/*!
* Krajee Font Awesome 5.x Theme styling for bootstrap-star-rating.
* This file must be loaded after 'star-rating.css'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
.theme-krajee-fas.rating-rtl.is-star .filled-stars {
right: 0;
}

View File

@ -0,0 +1,30 @@
/*!
* Krajee Font Awesome 5.x Theme configuration for bootstrap-star-rating.
* This file must be loaded after 'star-rating.css'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingThemes['krajee-fas'] = {
filledStar: '<i class="fas fa-star"></i>',
emptyStar: '<i class="far fa-star"></i>',
clearButton: '<i class="fas fa-minus-circle"></i>'
};
}));

View File

@ -0,0 +1,14 @@
/*!
* Krajee Font Awesome 5.x Theme styling for bootstrap-star-rating.
* This file must be loaded after 'star-rating.css'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
.theme-krajee-fas.rating-rtl.is-star .filled-stars{right:0}

View File

@ -0,0 +1,14 @@
/*!
* Krajee Font Awesome 5.x Theme configuration for bootstrap-star-rating.
* This file must be loaded after 'star-rating.css'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof module&&"object"==typeof module.exports?require("jquery"):window.jQuery)}(function(e){"use strict";e.fn.ratingThemes["krajee-fas"]={filledStar:'<i class="fas fa-star"></i>',emptyStar:'<i class="far fa-star"></i>',clearButton:'<i class="fas fa-minus-circle"></i>'}});

View File

@ -0,0 +1,30 @@
/*!
* Krajee Glyphicon Theme configuration for bootstrap-star-rating.
* This file must be loaded after 'star-rating.js'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingThemes['krajee-gly'] = {
filledStar: '<i class="glyphicon glyphicon-star"></i>',
emptyStar: '<i class="glyphicon glyphicon-star-empty"></i>',
clearButton: '<i class="glyphicon glyphicon-minus-sign"></i>',
};
}));

View File

@ -0,0 +1,14 @@
/*!
* Krajee Glyphicon Theme configuration for bootstrap-star-rating.
* This file must be loaded after 'star-rating.js'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof module&&"object"==typeof module.exports?require("jquery"):window.jQuery)}(function(e){"use strict";e.fn.ratingThemes["krajee-gly"]={filledStar:'<i class="glyphicon glyphicon-star"></i>',emptyStar:'<i class="glyphicon glyphicon-star-empty"></i>',clearButton:'<i class="glyphicon glyphicon-minus-sign"></i>'}});

View File

@ -0,0 +1,90 @@
/*!
* Krajee SVG Theme styling for bootstrap-star-rating.
* This file must be loaded after 'star-rating.css'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
.theme-krajee-svg .krajee-icon,
.theme-krajee-svg .krajee-icon-clear {
display: inline-block;
width: 2rem;
height: 2rem;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.theme-krajee-svg .clear-rating,
.theme-krajee-svg .rating-stars {
font-size: 5px;
}
.theme-krajee-svg .krajee-icon-clear {
background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg%20id%3D%22svg2%22%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20158.81%20158.81%22%20version%3D%221.1%22%3E%0D%0A%3Cpath%20id%3D%22path4%22%20style%3D%22fill%3A%23aaa%22%20stroke-linejoin%3D%22round%22%20d%3D%22m155.06%2C79.438c0%2C41.799-33.885%2C75.684-75.684%2C75.684s-75.684-33.885-75.684-75.684%2C33.885-75.684%2C75.684-75.684%2C75.684%2C33.885%2C75.684%2C75.684z%22%20stroke%3D%22%23aaa%22%20stroke-linecap%3D%22round%22%20fill%3D%22none%22%2F%3E%0D%0A%3Cpath%20id%3D%22rect3139%22%20style%3D%22fill%3A%23fff%22%20d%3D%22m37.216%2C64.443v28.67h88.24v-28.67h-88.24z%22%2F%3E%0D%0A%3C%2Fsvg%3E');
}
.theme-krajee-svg .filled-stars .krajee-icon-star {
background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%23fde16d%22%20stroke%3D%22%23777777%22%20d%3D%22M20.6%2011l-4.6-10.5-4.6%2010.5h-10.8l7.8%207.9-3%2012.1%2010.6-6%2010.6%206-3-12.1%207.8-7.9z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E');
}
.theme-krajee-svg.rating-xl .krajee-icon,
.theme-krajee-svg.rating-xl .krajee-icon-clear {
width: 3rem;
height: 3rem;
}
.theme-krajee-svg.rating-lg .krajee-icon,
.theme-krajee-svg.rating-lg .krajee-icon-clear {
width: 2.5rem;
height: 2.5rem;
}
.theme-krajee-svg.rating-md .krajee-icon,
.theme-krajee-svg.rating-md .krajee-icon-clear {
width: 2rem;
height: 2rem;
}
.theme-krajee-svg.rating-sm .krajee-icon,
.theme-krajee-svg.rating-sm .krajee-icon-clear {
width: 1.5rem;
height: 1.5rem;
}
.theme-krajee-svg.rating-xs .krajee-icon,
.theme-krajee-svg.rating-xs .krajee-icon-clear {
width: 1rem;
height: 1rem;
}
.theme-krajee-svg .krajee-icon-clear:hover {
background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg%20id%3D%22svg2%22%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20158.81%20158.81%22%20version%3D%221.1%22%3E%0D%0A%3Cpath%20id%3D%22path4%22%20style%3D%22fill%3A%23843534%22%20stroke-linejoin%3D%22round%22%20d%3D%22m155.06%2C79.438c0%2C41.799-33.885%2C75.684-75.684%2C75.684s-75.684-33.885-75.684-75.684%2C33.885-75.684%2C75.684-75.684%2C75.684%2C33.885%2C75.684%2C75.684z%22%20stroke%3D%22%23843534%22%20stroke-linecap%3D%22round%22%20fill%3D%22none%22%2F%3E%0D%0A%3Cpath%20id%3D%22rect3139%22%20style%3D%22fill%3A%23fff%22%20d%3D%22m37.216%2C64.443v28.67h88.24v-28.67h-88.24z%22%2F%3E%0D%0A%3C%2Fsvg%3E');
}
.theme-krajee-svg .empty-stars .krajee-icon-star {
background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20stroke%3D%22%23777777%22%20d%3D%22M20.6%2011l-4.6-10.5-4.6%2010.5h-10.8l7.8%207.9-3%2012.1%2010.6-6%2010.6%206-3-12.1%207.8-7.9z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E');
}
.theme-krajee-svg .filled-stars .krajee-icon-heart {
background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23fde16d%22%20stroke%3D%22%23777777%22%20stroke-width%3D%220.04em%22%20d%3D%22M12%2021.35l-1.45-1.32c-5.15-4.67-8.55-7.75-8.55-11.53%200-3.08%202.42-5.5%205.5-5.5%201.74%200%203.41.81%204.5%202.09%201.09-1.28%202.76-2.09%204.5-2.09%203.08%200%205.5%202.42%205.5%205.5%200%203.78-3.4%206.86-8.55%2011.54l-1.45%201.31z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E');
}
.theme-krajee-svg .empty-stars .krajee-icon-heart {
background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20stroke%3D%22%23777777%22%20stroke-width%3D%220.04em%22%20d%3D%22M12%2021.35l-1.45-1.32c-5.15-4.67-8.55-7.75-8.55-11.53%200-3.08%202.42-5.5%205.5-5.5%201.74%200%203.41.81%204.5%202.09%201.09-1.28%202.76-2.09%204.5-2.09%203.08%200%205.5%202.42%205.5%205.5%200%203.78-3.4%206.86-8.55%2011.54l-1.45%201.31z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E');
}
.theme-krajee-svg.rating-rtl.is-heart .filled-stars {
right: 0.02em;
}
.theme-krajee-svg.rating-rtl.is-heart .empty-stars {
margin-right: 0.01em;
}

View File

@ -0,0 +1,30 @@
/*!
* Krajee SVG Theme Configuration for bootstrap-star-rating.
* This file must be loaded after 'star-rating.js'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingThemes['krajee-svg'] = {
filledStar: '<span class="krajee-icon krajee-icon-star"></span>',
emptyStar: '<span class="krajee-icon krajee-icon-star"></span>',
clearButton: '<span class="krajee-icon-clear"></span>'
};
}));

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,14 @@
/*!
* Krajee SVG Theme Configuration for bootstrap-star-rating.
* This file must be loaded after 'star-rating.js'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof module&&"object"==typeof module.exports?require("jquery"):window.jQuery)}(function(e){"use strict";e.fn.ratingThemes["krajee-svg"]={filledStar:'<span class="krajee-icon krajee-icon-star"></span>',emptyStar:'<span class="krajee-icon krajee-icon-star"></span>',clearButton:'<span class="krajee-icon-clear"></span>'}});

View File

@ -0,0 +1,23 @@
/*!
* Krajee Unicode Theme styling for bootstrap-star-rating.
* This file must be loaded after 'star-rating.css'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
.theme-krajee-uni .star {
font-size: 1.2em;
line-height: 1;
margin: 0;
}
.theme-krajee-uni .clear-rating {
font-size: 1em;
line-height: 1;
}

View File

@ -0,0 +1,30 @@
/*!
* Krajee Unicode Theme Configuration for bootstrap-star-rating.
* This file must be loaded after 'star-rating.js'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
factory(window.jQuery);
}
}(function ($) {
"use strict";
$.fn.ratingThemes['krajee-uni'] = {
filledStar: '&#x2605;',
emptyStar: '&#x2606;',
clearButton: '&#x229d;'
};
}));

View File

@ -0,0 +1,14 @@
/*!
* Krajee Unicode Theme styling for bootstrap-star-rating.
* This file must be loaded after 'star-rating.css'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
.theme-krajee-uni .star{font-size:1.2em;line-height:1;margin:0}.theme-krajee-uni .clear-rating{font-size:1em;line-height:1}

View File

@ -0,0 +1,14 @@
/*!
* Krajee Unicode Theme Configuration for bootstrap-star-rating.
* This file must be loaded after 'star-rating.js'.
*
* bootstrap-star-rating v4.1.2
* http://plugins.krajee.com/star-rating
*
* Author: Kartik Visweswaran
* Copyright: 2013 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-star-rating/blob/master/LICENSE.md
*/
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof module&&"object"==typeof module.exports?require("jquery"):window.jQuery)}(function(e){"use strict";e.fn.ratingThemes["krajee-uni"]={filledStar:"&#x2605;",emptyStar:"&#x2606;",clearButton:"&#x229d;"}});