Commit e5502790 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

ajax notes load

parent add45eb8
:plain
$("#notes-list").html("#{escape_javascript(render(:partial => 'notes/notes_list'))}");
%ul#notes-list %ul#notes-list= render "notes/notes_list"
- @notes.each do |note|
- next unless note.author
= render :partial => "notes/show", :locals => {:note => note}
%br %br
%br %br
...@@ -12,4 +9,12 @@ ...@@ -12,4 +9,12 @@
$('.delete-note').live('ajax:success', function() { $('.delete-note').live('ajax:success', function() {
$(this).closest('li').fadeOut(); }); $(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"});
}
- @notes.each do |note|
- next unless note.author
= render :partial => "notes/show", :locals => {:note => note}
:plain
$("#notes-list").html("#{escape_javascript(render(:partial => 'notes/notes_list'))}");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment