From 6c2b6496a92b229f3139877c6b9ee17badc5c20a Mon Sep 17 00:00:00 2001 From: Washington Botelho Date: Thu, 2 Nov 2017 00:00:52 -0200 Subject: [PATCH] v2.8.0 --- README.md | 94 ++++++++++++++++++---------------------------- bower.json | 2 +- changelog.md | 6 +++ demo/index.html | 2 +- lib/jquery.raty.js | 2 +- package-lock.json | 2 +- package.json | 2 +- 7 files changed, 48 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index fc469513..0bd948a5 100755 --- a/README.md +++ b/README.md @@ -1,24 +1,12 @@ # jQuery Raty - A Star Rating Plugin [![Build Status](https://img.shields.io/travis/wbotelhos/raty/master.svg)](https://travis-ci.org/wbotelhos/raty "Travis CI") -[![Dependency Status](https://david-dm.org/wbotelhos/raty.svg)](https://david-dm.org/wbotelhos/raty "Dependency Status") -[![Dev Dependency Status](https://david-dm.org/wbotelhos/raty/dev-status.svg)](https://david-dm.org/wbotelhos/raty#info=devDependencies "Dev Dependency Status") +[![NPM Version](https://badge.fury.io/js/raty-js.svg)](https://badge.fury.io/js/raty-js) +[![Dependency](https://david-dm.org/wbotelhos/raty.svg)](https://david-dm.org/wbotelhos/raty "Dependency Status") +[![Dev Dependency](https://david-dm.org/wbotelhos/raty/dev-status.svg)](https://david-dm.org/wbotelhos/raty#info=devDependencies "Dev Dependency Status") [![Code Climate](https://codeclimate.com/github/wbotelhos/raty.png)](https://codeclimate.com/github/wbotelhos/raty) [![Support jQuery Raty](http://img.shields.io/gittip/wbotelhos.svg)](https://gratipay.com/~wbotelhos) -## Version - -``` -@version 2.7.1 -@since 2010.06.11 -@author Washington Botelho -@doc wbotelhos.com/raty -``` - -## Dependencies - -+ jquery.js - ## Usage with Image - jquery.raty.js @@ -52,51 +40,43 @@ $('div').raty(); $('div').raty({ starType: 'i' }); ``` -## Bower Install - -```js -bower install raty -``` - -See [bower.io](http://bower.io) for more information. - ## Options ```js -cancel : false // Creates a cancel button to cancel the rating. -cancelClass : 'raty-cancel' // Name of cancel's class. -cancelHint : 'Cancel this rating!' // The cancel's button hint. -cancelOff : 'cancel-off.png' // Icon used on active cancel. -cancelOn : 'cancel-on.png' // Icon used inactive cancel. -cancelPlace : 'left' // Cancel's button position. -click : undefined // Callback executed on rating click. -half : false // Enables half star selection. -halfShow : true // Enables half star display. -hints : ['bad', 'poor', 'regular', 'good', 'gorgeous'] // Hints used on each star. -iconRange : undefined // Object list with position and icon on and off to do a mixed icons. -mouseout : undefined // Callback executed on mouseout. -mouseover : undefined // Callback executed on mouseover. -noRatedMsg : 'Not rated yet!' // Hint for no rated elements when it's readOnly. -number : 5 // Number of stars that will be presented. -numberMax : 20 // Max of star the option number can creates. -path : undefined // A global locate where the icon will be looked. -precision : false // Enables the selection of a precision score. -readOnly : false // Turns the rating read-only. -round : { down: .25, full: .6, up: .76 } // Included values attributes to do the score round math. -score : undefined // Initial rating. -scoreName : 'score' // Name of the hidden field that holds the score value. -single : false // Enables just a single star selection. -space : true // Puts space between the icons. -starHalf : 'star-half.png' // The name of the half star image. -starOff : 'star-off.png' // Name of the star image off. -starOn : 'star-on.png' // Name of the star image on. -target : undefined // Element selector where the score will be displayed. -targetFormat: '{score}' // Template to interpolate the score in. -targetKeep : false // If the last rating value will be keeped after mouseout. -targetScore : undefined // Element selector where the score will be filled, instead of creating a new hidden field (scoreName option). -targetText : '' // Default text setted on target. -targetType : 'hint' // Option to choose if target will receive hint o 'score' type. -starType : 'img' // Element used to represent a star. +cancel: false // Creates a cancel button to cancel the rating. +cancelClass: 'raty-cancel' // Name of cancel's class. +cancelHint: 'Cancel this rating!' // The cancel's button hint. +cancelOff: 'cancel-off.png' // Icon used on active cancel. +cancelOn: 'cancel-on.png' // Icon used inactive cancel. +cancelPlace: 'left' // Cancel's button position. +click: undefined // Callback executed on rating click. +half: false // Enables half star selection. +halfShow: true // Enables half star display. +hints: ['bad', 'poor', 'regular', 'good', 'gorgeous'] // Hints used on each star. +iconRange: undefined // Object list with position and icon on and off to do a mixed icons. +mouseout: undefined // Callback executed on mouseout. +mouseover: undefined // Callback executed on mouseover. +noRatedMsg: 'Not rated yet!' // Hint for no rated elements when it's readOnly. +number: 5 // Number of stars that will be presented. +numberMax: 20 // Max of star the option number can creates. +path: undefined // A global locate where the icon will be looked. +precision: false // Enables the selection of a precision score. +readOnly: false // Turns the rating read-only. +round: { down: .25, full: .6, up: .76 } // Included values attributes to do the score round math. +score: undefined // Initial rating. +scoreName: 'score' // Name of the hidden field that holds the score value. +single: false // Enables just a single star selection. +space: true // Puts space between the icons. +starHalf: 'star-half.png' // The name of the half star image. +starOff: 'star-off.png' // Name of the star image off. +starOn: 'star-on.png' // Name of the star image on. +target: undefined // Element selector where the score will be displayed. +targetForma: '{score}' // Template to interpolate the score in. +targetKeep: false // If the last rating value will be keeped after mouseout. +targetScore: undefined // Element selector where the score will be filled, instead of creating a new hidden field (scoreName option). +targetText: '' // Default text setted on target. +targetType: 'hint' // Option to choose if target will receive hint o 'score' type. +starType: 'img' // Element used to represent a star. ``` ## Functions diff --git a/bower.json b/bower.json index 7912f69a..359bf9ec 100644 --- a/bower.json +++ b/bower.json @@ -12,5 +12,5 @@ "license": "MIT", "main": "lib/jquery.raty.js", "name": "raty", - "version": "2.7.1" + "version": "2.8.0" } diff --git a/changelog.md b/changelog.md index e25f02ac..15d0121b 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # jQuery Raty - A Star Rating Plugin - http://wbotelhos.com/raty +## 2.8.0 + +### News + ++ Add support to configure options via `$.data()`; + ## 2.7.1 ### Fixes diff --git a/demo/index.html b/demo/index.html index 2cc15747..3125a8a9 100644 --- a/demo/index.html +++ b/demo/index.html @@ -81,7 +81,7 @@

jQuery Raty