What you mean does not work.... I use this all the time:
https://gist.github.com/mdipierro/f221957e002baa014c9a

None of your fields contains "rating". you have to change the names of the 
selector in the code 'input.rating,input[name*="rating"]' to make it work 
with your fields.

On Monday, 25 January 2016 12:14:13 UTC-6, Ron Chatterjee wrote:
>
> Since the star rating widget doesn't work, how we get this js to work for 
> example if my database is:
>
> db.define_table('song',
>     Field('title'),
>     Field('voice_quality', 'integer',requires=IS_IN_SET(range(0, 6))),
>     Field('highs_and_lows', 'integer',requires=IS_IN_SET(range(0, 6))),   
>      
>     Field('depth_and_sentiment', 'integer',requires=IS_IN_SET(range(0, 
> 6))),)
>
>
>
>
>
>
> On Sunday, November 23, 2014 at 2:05:07 PM UTC-5, Niphlod wrote:
>>
>> simple and effective, if you don't care about graphic niceties. Also, 
>> another example of "pre-minified" code ;-P 
>> But I don't think this should go in web2py's core.
>>
>> On Sunday, November 23, 2014 7:23:07 PM UTC+1, Massimo Di Pierro wrote:
>>>
>>> Errata. You have to download it as "star.rating.js" into static/js and 
>>> then include it as
>>>
>>> <script src="{{=URL('static','js/star.rating.js')}}"></script>
>>>
>>>
>>> On Sunday, 23 November 2014 12:02:44 UTC-6, Massimo Di Pierro wrote:
>>>>
>>>> I have been very unsatisfied with existing star rating plugins. First, 
>>>> they are too complex. Second, they required dedicated fonts/images while 
>>>> all the necessary symbols are already in unicode. So I made this:
>>>>
>>>>     https://gist.github.com/mdipierro/f221957e002baa014c9a
>>>>
>>>> Just add this code at the bottom of your views:
>>>>
>>>>     <script src="
>>>> https://gist.github.com/mdipierro/f221957e002baa014c9a.js";></script>
>>>>
>>>> and all the fields with a name containing "rating" or input fields 
>>>> having a class "rating" will be represented by a star 1-5 widget. 
>>>> Perhaps we should make this default in web2py?
>>>>
>>>> Massimo
>>>>  
>>>>
>>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to