source: sandbox/2.4.1-3/prototype/plugins/jq-raty/README.md @ 6512

Revision 6512, 5.6 KB checked in by gustavo, 12 years ago (diff)

Ticket #2766 - implementacao da dfd0065 e correcao de bugs da dfd0099

  • Property svn:executable set to *
Line 
1# jQuery Raty - A Star Rating Plugin - http://wbotelhos.com/raty
2
3jQuery Raty is a plugin that generates a customizable star rating.
4
5## Version
6
7        @version        2.4.5
8        @since          2010.06.11
9        @author         Washington Botelho
10        @documentation  wbotelhos.com/raty
11        @twitter        twitter.com/wbotelhos
12
13## Required Files
14
15+ jquery.raty.min.js
16+ star-on.png
17+ star-off.png
18
19## Default values
20
21        cancel       : false                                          // Show a button to cancel the rating or not.   
22        cancelHint   : 'cancel this rating!'                          // The hint information.
23        cancelOff    : 'cancel-off.png'                               // Name of the cancel image off.
24        cancelOn     : 'cancel-on.png'                                // Name of the cancel image on.
25        cancelPlace  : 'left'                                         // Position of the cancel button.
26        click        : undefined                                      // Callback for click actions.
27        half         : false                                          // Active the half star.
28        halfShow     : true                                           // Enables half star display.
29        hints        : ['bad', 'poor', 'regular', 'good', 'gorgeous'] // A hint information for default 5 stars.
30        iconRange    : undefined                                      // Object list representing each icon with position and names.
31        mouseover    : undefined                                      // Callback for mouseover actions.
32        noRatedMsg   : 'not rated yet'                                // A hint for no rated elements when it's read-only.
33        number       : 5                                              // Number of star.
34        path         : 'img                                           // Path of images.
35        precision    : false                                          // Enables the selection of a precision score.
36        readOnly     : false                                          // read-only or not.
37        round        : { down: .25, full: .6, up: .76 }               // Configuration to set the round rules.
38        score        : undefined                                      // Initial score value.
39        scoreName    : 'score'                                        // The name of target score.
40        single       : false                                          // Enables the single star selection.
41        size         : 16                                             // The icons size.
42        space        : true                                           // Puts space between the stars.
43        starHalf     : 'star-half.png'                                // The image of the half star.
44        starOff      : 'star-off.png'                                 // Name of the star image off.
45        starOn       : 'star-on.png'                                  // Name of the star image on.
46        target       : undefined                                      // Element selector where the rating will be displayed.
47        targetFormat : '{score}'                                      // Template to interpolate the score with some thing.
48        targetKeep   : false                                          // If the last choose value will be keeped on mouseout.
49        targetText   : ''                                             // Default value when there's no score or targetKeep is off.
50        targetType   : 'hint'                                         // What display on target element: hint or number.
51        width        : undefined                                      // The container width of the stars.
52
53## Usage
54
55        $('#star').raty();
56
57        <div id="star"></div>
58
59        $('.star').raty();
60
61        <div class="star"></div>
62        <div class="star"></div>
63        <div class="star"></div>
64
65## Functions
66
67        $('#star').raty('score');                // Recovers the current score or undefined for no rated. Class returns an array of score.
68
69        $('#star').raty('score', 3);             // Set the score to 3 stars.
70
71        $('#star').raty('click', 2);             // Click on the second star.
72
73        $('.star').raty('readOnly', true);       // Adjusts all elements with class called 'star' for read-only.
74
75        $('#star').raty('cancel', true);         // Cancel the rating. The second optional parameter enables the callback.
76
77        $('#star').raty('reload');               // Reload the rating with the current configuration.
78
79        $('#star').raty('set', { number: 10 });  // Reload the rating applying new configurations.
80
81## Contributors
82
83+ Andreas Köberle
84+ Daniel Faria
85+ Eric Wendelin
86+ Francisco Souza
87+ Gabriel Benz
88+ hpgihan
89+ janapol
90+ jeongee
91+ Olle Jonsson
92+ packowitz
93
94## Licence
95
96The MIT License
97
98Copyright (c) 2010 Washington Botelho
99
100Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
101
102The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
103
104THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
105
106## Buy me a coffee
107
108You can do it by [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=X8HEP2878NDEG&item_name=jQuery%20Raty). Thanks! (:
Note: See TracBrowser for help on using the repository browser.