diff options
-rw-r--r-- | app/views/issues/show.js.haml | 2 | ||||
-rw-r--r-- | app/views/notes/_notes.html.haml | 13 | ||||
-rw-r--r-- | app/views/notes/_notes_list.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/wall.js.haml | 2 |
4 files changed, 17 insertions, 4 deletions
diff --git a/app/views/issues/show.js.haml b/app/views/issues/show.js.haml new file mode 100644 index 00000000000..5b9a34c0a9c --- /dev/null +++ b/app/views/issues/show.js.haml @@ -0,0 +1,2 @@ +:plain + $("#notes-list").html("#{escape_javascript(render(:partial => 'notes/notes_list'))}"); diff --git a/app/views/notes/_notes.html.haml b/app/views/notes/_notes.html.haml index 9d1d4b941c8..040c2f28053 100644 --- a/app/views/notes/_notes.html.haml +++ b/app/views/notes/_notes.html.haml @@ -1,7 +1,4 @@ -%ul#notes-list - - @notes.each do |note| - - next unless note.author - = render :partial => "notes/show", :locals => {:note => note} +%ul#notes-list= render "notes/notes_list" %br %br @@ -12,4 +9,12 @@ $('.delete-note').live('ajax:success', function() { $(this).closest('li').fadeOut(); }); +- if ["issues", "projects"].include?(controller.controller_name) + :javascript + $(function(){ + var int =self.setInterval("updatePage()", 20000); + }); + function updatePage(){ + $.ajax({type: "GET", url: location.href, dataType: "script"}); + } diff --git a/app/views/notes/_notes_list.html.haml b/app/views/notes/_notes_list.html.haml new file mode 100644 index 00000000000..1e4a6bb2b2f --- /dev/null +++ b/app/views/notes/_notes_list.html.haml @@ -0,0 +1,4 @@ +- @notes.each do |note| + - next unless note.author + = render :partial => "notes/show", :locals => {:note => note} + diff --git a/app/views/projects/wall.js.haml b/app/views/projects/wall.js.haml new file mode 100644 index 00000000000..5b9a34c0a9c --- /dev/null +++ b/app/views/projects/wall.js.haml @@ -0,0 +1,2 @@ +:plain + $("#notes-list").html("#{escape_javascript(render(:partial => 'notes/notes_list'))}"); |