Description:
Merge branch 'master' into codejom (announcement refresh bug fix)
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r244:72b95c87a51a - - 2 files changed: 5 inserted, 2 deleted
@@ -30,7 +30,8 | |||||
|
30 | %br{:clear=>'both'}/ |
|
30 | %br{:clear=>'both'}/ |
|
31 | %hr/ |
|
31 | %hr/ |
|
32 |
|
32 | ||
|
33 |
- %script{:type => |
|
33 | + %script{:type => 'text/javascript'} |
|
|
34 | + = "Announcement.refreshUrl = '#{url_for :controller => 'main', :action => 'announcements'}';" | ||
|
34 | Announcement.registerRefreshEventTimer(); |
|
35 | Announcement.registerRefreshEventTimer(); |
|
35 | = render :partial => 'submission_timeouts' |
|
36 | = render :partial => 'submission_timeouts' |
|
36 | CodejomTimeout.updateProblemMessages(); |
|
37 | CodejomTimeout.updateProblemMessages(); |
@@ -3,6 +3,8 | |||||
|
3 |
|
3 | ||
|
4 | mostRecentId: 0, |
|
4 | mostRecentId: 0, |
|
5 |
|
5 | ||
|
|
6 | + refreshUrl: '/main/announcements', | ||
|
|
7 | + | ||
|
6 | setMostRecentId: function(id) { |
|
8 | setMostRecentId: function(id) { |
|
7 | Announcement.mostRecentId = id; |
|
9 | Announcement.mostRecentId = id; |
|
8 | }, |
|
10 | }, |
@@ -13,7 +15,7 | |||||
|
13 | }, |
|
15 | }, |
|
14 |
|
16 | ||
|
15 | refreshAnnouncement: function() { |
|
17 | refreshAnnouncement: function() { |
|
16 |
- var url = |
|
18 | + var url = Announcement.refreshUrl; |
|
17 | new Ajax.Request(url, { |
|
19 | new Ajax.Request(url, { |
|
18 | method: 'get', |
|
20 | method: 'get', |
|
19 | parameters: { recent: Announcement.mostRecentId }, |
|
21 | parameters: { recent: Announcement.mostRecentId }, |
You need to be logged in to leave comments.
Login now