Show More
Commit Description:
added time out check for code jom submissions
Commit Description:
added time out check for code jom submissions
File last commit:
Show/Diff file:
Action:
public/javascripts/announcement_refresh.js | 38 lines | 942 B | application/javascript | JavascriptLexer |
jittat
added announcement refresh, more styling, prep for announcement hiding...
r192
var Announcement = {
mostRecentId: 0,
setMostRecentId: function(id) {
Announcement.mostRecentId = id;
},
updateRecentId: function(id) {
if(Announcement.mostRecentId < id)
Announcement.mostRecentId = id;
},
refreshAnnouncement: function() {
var url = '/main/announcements';
new Ajax.Request(url, {
method: 'get',
parameters: { recent: Announcement.mostRecentId },
onSuccess: function(transport) {
Jittat Fakcharoenphol
fixed announcement refresh bug when initially there was no announcement
r226 if(transport.responseText.match(/\S/)!=null) {
var announcementBody = $("announcementbox-body");
announcementBody.insert({ top: transport.responseText });
var announcementBoxes = $$(".announcementbox");
if(announcementBoxes.length!=0)
announcementBoxes[0].show();
}
jittat
added announcement refresh, more styling, prep for announcement hiding...
r192 }
});
Announcement.registerRefreshEventTimer();
},
registerRefreshEventTimer: function() {
setTimeout(function () {
Announcement.refreshAnnouncement();
}, 30000);
}
Jittat Fakcharoenphol
fixed announcement refresh bug when initially there was no announcement
r226 };