Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def message_update(reply_id, message = ' ', image_name = nil, type = nil)
- ratings = get_ratings
- img = image_tag("icons/silk/#{image_name}#{session[:icon_filetype]}", :size => "16x16")
- update_page do |page|
- if ratings.include?(type) && ratings[type][:alert]
- page.replace_html 'ratings_results_' + reply_id, "#{img} <span>#{ratings[type][:alert]}</span>"
- else
- page.replace_html 'ratings_results_' + reply_id, "#{img} <span>#{message}</span>"
- end
- page.visual_effect :highlight, 'ratings_results_' + reply_id, :duration => 3.0
- page.visual_effect :fade, 'ratings_results_' + reply_id, :duration => 4.0
- page.replace_html 'ratings_results_' + reply_id, ""
- page.visual_effect :appear, 'ratings_results_' + reply_id
- end
- end
Add Comment
Please, Sign In to add comment