mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-28 13:31:06 +00:00
19 lines
690 B
Text
19 lines
690 B
Text
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
// Shoutbox
|
|
$.PeriodicalUpdater("/shoutmsgs/<%= object.class.to_s %>.js?id2=<%= object.id %>", {
|
|
method: "GET",
|
|
type: "script",
|
|
minTimeout: 10000,
|
|
multiplier: 2
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<% shoutmsg_new = Shoutmsg.new(:shoutable_type => object.class.to_s, :shoutable_id => object.id) %>
|
|
|
|
<div class="wide box shoutmsgBox" id="<%= shoutmsg_new.domain %>">
|
|
<%= render :partial => "shoutmsgs/shoutmsg", :collection => object.shoutmsgs.recent.reverse, :locals => {:popup => "this"} %>
|
|
</div>
|
|
|
|
<%= render :partial => "shoutmsgs/new", :locals => {:shoutmsg => shoutmsg_new, :popup => "this"} %>
|