Fix replacement of progressbar on vote

This commit is contained in:
Tyler Renelle 2012-02-04 12:58:34 -05:00
parent 44196c043a
commit e9792aa1ab
2 changed files with 2 additions and 9 deletions

View file

@ -1,12 +1,5 @@
<% content_for :score do %>
<div id="progressbar" style="width:30%;"><span id="tnl"><%= @score %>/100</span></div>
<script>
$(function() {
$( "#progressbar" ).progressbar({
value: <%= @score %>
});
});
</script>
<%= render :partial => "progressbar", :locals => { :score => @score } %>
<% end %>

View file

@ -1,2 +1,2 @@
$('#habit_<%= @habit.id %>').replaceWith("<%= escape_javascript(render :partial => "habit", :locals => { :habit => @habit }) %>");
$('#score').html("<%= @score %>");
$('#progressbar').replaceWith("<%= escape_javascript(render :partial => "progressbar", :locals => { :score => @score }) %>");