mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 21:10:54 +00:00
Move shoutmsg polling invocation to instances where shoutbox is available
This commit is contained in:
parent
4527fb0612
commit
34f2fc98c9
2 changed files with 12 additions and 9 deletions
|
@ -24,14 +24,6 @@ $(document).ready(function(){
|
||||||
function HideUserPopupRunner(){
|
function HideUserPopupRunner(){
|
||||||
document.getElementById("userPopup").style.visibility = "Hidden";
|
document.getElementById("userPopup").style.visibility = "Hidden";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shoutbox
|
|
||||||
$.PeriodicalUpdater("/shoutmsgs/index.js", {
|
|
||||||
method: "GET",
|
|
||||||
type: "script",
|
|
||||||
minTimeout: 10000,
|
|
||||||
multiplier: 2
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
|
@ -8,4 +8,15 @@
|
||||||
<%= render partial: "shoutmsgs/new", locals: { shoutmsg: Shoutmsg.new } %>
|
<%= render partial: "shoutmsgs/new", locals: { shoutmsg: Shoutmsg.new } %>
|
||||||
<%= link_to "Shoutbox Recent History", controller: :shoutmsgs, action: "index" %><br/>
|
<%= link_to "Shoutbox Recent History", controller: :shoutmsgs, action: "index" %><br/>
|
||||||
<%= link_to "Shoutbox Rules", article_path(Article::SB_RULES) %>
|
<%= link_to "Shoutbox Rules", article_path(Article::SB_RULES) %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function () {
|
||||||
|
$.PeriodicalUpdater("/shoutmsgs/index.js", {
|
||||||
|
method: "GET",
|
||||||
|
type: "script",
|
||||||
|
minTimeout: 10000,
|
||||||
|
multiplier: 2
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
Loading…
Reference in a new issue