introduce disabled-rate class to disable rating
This commit is contained in:
parent
e3174fa277
commit
e32ff99f2f
4 changed files with 9 additions and 2 deletions
|
|
@ -49,6 +49,7 @@
|
|||
//= require selectize
|
||||
//= require jquery.raty
|
||||
//= require ratyrate
|
||||
//= require osem-rating
|
||||
|
||||
$(document).ready(function() {
|
||||
$('a[disabled=disabled]').click(function(event){
|
||||
|
|
|
|||
5
app/assets/javascripts/osem-rating.js
Normal file
5
app/assets/javascripts/osem-rating.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
$( document ).ready(function() {
|
||||
$(".disabled-rate .star").each(function(){
|
||||
$(this).raty('readOnly', true);
|
||||
});
|
||||
});
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
%td.col-md-2
|
||||
= field.title
|
||||
%td
|
||||
%div.disabled-rate
|
||||
= rating_for @event, field.title, disable: true, star: field.stars
|
||||
%tr
|
||||
%td
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue