redis_cache
huang 10 years ago
commit 4b1ff190f4

@ -85,6 +85,9 @@ class WordsController < ApplicationController
elsif @journal_destroyed.jour_type == "Course" elsif @journal_destroyed.jour_type == "Course"
@course = Course.find @journal_destroyed.jour_id @course = Course.find @journal_destroyed.jour_id
@jours_count = @course.journals_for_messages.where('m_parent_id IS NULL').count @jours_count = @course.journals_for_messages.where('m_parent_id IS NULL').count
elsif @journal_destroyed.jour_type == "Principal"
@user = User.find(@journal_destroyed.jour_id)
@jours_count = @user.journals_for_messages.where('m_parent_id IS NULL').count
end end
respond_to do |format| respond_to do |format|
format.js format.js

@ -53,7 +53,7 @@
} }
$.ajax({ $.ajax({
type :"POST", type :"POST",
url :prefix + '/school/search_school/?key_word='+encodeURIComponent(value)+'&province='+province, url :prefix + '/school/search_school/?key_word='+encodeURIComponent(value)+'&province='+encodeURIComponent(province),
data :'text', data :'text',
success: function(data){ success: function(data){
$("#schoollist").html(data); $("#schoollist").html(data);

@ -5,6 +5,8 @@
$('#jours_count').html("<%= @jours_count %>"); $('#jours_count').html("<%= @jours_count %>");
<% elsif @course && @jours_count%> <% elsif @course && @jours_count%>
$('#course_jour_count').html("(<%= @jours_count %>)"); $('#course_jour_count').html("(<%= @jours_count %>)");
<% elsif @user && @jours_count%>
$('#jour_count').html("<%= @jours_count %>");
<% end %> <% end %>
var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>') var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>')
destroyedItem.fadeOut(600,function(){ destroyedItem.fadeOut(600,function(){

Loading…
Cancel
Save