diff --git a/app/views/homework_attach/_show_star.html.erb b/app/views/homework_attach/_show_star.html.erb index b10455f1a..2181fbf90 100644 --- a/app/views/homework_attach/_show_star.html.erb +++ b/app/views/homework_attach/_show_star.html.erb @@ -3,7 +3,8 @@ <%#= render :partial => 'show_score', locals: {:stars => totle_score} %> --> <% elsif is_comprehensive_evaluation == 2 %> <% if has_evaluation %> - + <%= l(:label_work_rating) %>: + <%= rating_for homework, dimension: :quality,start_score: 0, class: 'rateable div_inline' %> <% else %> <%= l(:label_work_rating) %>: <%= rating_for homework, dimension: :quality,start_score: 0, class: 'rateable div_inline' %> diff --git a/public/javascripts/seems_rateable/rateable.js b/public/javascripts/seems_rateable/rateable.js index f35a43437..b42375c45 100644 --- a/public/javascripts/seems_rateable/rateable.js +++ b/public/javascripts/seems_rateable/rateable.js @@ -1,25 +1,25 @@ -$(document).ready(function(){ - $(".rateable").jRating({ - //default options displayed below -> - - rateMax: 5, //Maximal rate - length : 5, //Number of stars - //decimalLength : 0, //Number of decimals in the rate - //type : 'big', //Big or small - //step : true, //If set to true, filling of the stars is done star by star (step by step). - //isDisabled: false, //Set true to display static rating - //showRateInfo:false, //Rate info panel, set true to display - //rateInfosX : 45, //In pixel - Absolute left position of the information box during mousemove. - //rateInfosY : 5, //In pixel - Absolute top position of the information box during mousemove. - path : '/rateable/ratings', - onSuccess : function(element, rate){ - //something like -> - alert('本次打分成功!'); - //$('Thanks for rating!').insertAfter(element) - }, - onError : function(element, rate) { - $('You have already rated!').insertAfter(element) - } - }); - -}); +$(document).ready(function(){ + $(".rateable").jRating({ + //default options displayed below -> + + rateMax: 5, //Maximal rate + length : 5, //Number of stars + //decimalLength : 0, //Number of decimals in the rate + //type : 'big', //Big or small + //step : true, //If set to true, filling of the stars is done star by star (step by step). + //isDisabled: false, //Set true to display static rating + //showRateInfo:false, //Rate info panel, set true to display + //rateInfosX : 45, //In pixel - Absolute left position of the information box during mousemove. + //rateInfosY : 5, //In pixel - Absolute top position of the information box during mousemove. + path : '/rateable/ratings', + onSuccess : function(element, rate){ + //something like -> + //alert('本次打分成功!'); + //$('Thanks for rating!').insertAfter(element) + }, + onError : function(element, rate) { + $('You have already rated!').insertAfter(element) + } + }); + +});