Description:
fixed wrong url for announcement refresh when rail app runs on sub url
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r243:e7c40b8ab664 - - 2 files changed: 5 inserted, 2 deleted

@@ -32,6 +32,7
32 32
33 33 %hr/
34 34
35 - :javascript
35 + %script{:type => 'text/javascript'}
36 + = "Announcement.refreshUrl = '#{url_for :controller => 'main', :action => 'announcements'}';"
36 37 Announcement.registerRefreshEventTimer();
37 38
@@ -3,6 +3,8
3 3
4 4 mostRecentId: 0,
5 5
6 + refreshUrl: '/main/announcements',
7 +
6 8 setMostRecentId: function(id) {
7 9 Announcement.mostRecentId = id;
8 10 },
@@ -13,7 +15,7
13 15 },
14 16
15 17 refreshAnnouncement: function() {
16 - var url = '/main/announcements';
18 + var url = Announcement.refreshUrl;
17 19 new Ajax.Request(url, {
18 20 method: 'get',
19 21 parameters: { recent: Announcement.mostRecentId },
You need to be logged in to leave comments. Login now