Commit 74a89d9ed6e79d6172ac2638a334bb31b9fea7da
1 parent
8a8e77d5
Exists in
master
and in
4 other branches
ajax notes load
Showing
4 changed files
with
17 additions
and
4 deletions
Show diff stats
app/views/notes/_notes.html.haml
1 | -%ul#notes-list | ||
2 | - - @notes.each do |note| | ||
3 | - - next unless note.author | ||
4 | - = render :partial => "notes/show", :locals => {:note => note} | 1 | +%ul#notes-list= render "notes/notes_list" |
5 | 2 | ||
6 | %br | 3 | %br |
7 | %br | 4 | %br |
@@ -12,4 +9,12 @@ | @@ -12,4 +9,12 @@ | ||
12 | $('.delete-note').live('ajax:success', function() { | 9 | $('.delete-note').live('ajax:success', function() { |
13 | $(this).closest('li').fadeOut(); }); | 10 | $(this).closest('li').fadeOut(); }); |
14 | 11 | ||
12 | +- if ["issues", "projects"].include?(controller.controller_name) | ||
13 | + :javascript | ||
14 | + $(function(){ | ||
15 | + var int =self.setInterval("updatePage()", 20000); | ||
16 | + }); | ||
15 | 17 | ||
18 | + function updatePage(){ | ||
19 | + $.ajax({type: "GET", url: location.href, dataType: "script"}); | ||
20 | + } |