summaryrefslogtreecommitdiff
path: root/app/views/notes/_notes.html.haml
blob: e7cc23607585ffe4c0076d0fc672a2e9a15a8cb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
- if controller.action_name == "wall"
  %ul#notes-list= render "notes/notes_list"

- else
  %ul#notes-list= render "notes/notes_list"
  %br
  %br
  - if can? current_user, :write_note, @project
    = render "notes/form"

:javascript
  $('.delete-note').live('ajax:success', function() {
    $(this).closest('li').fadeOut(); });

  $("#new_note").live("ajax:before", function(){
    $("#submit_note").attr("disabled", "disabled");
  })

  $("#new_note").live("ajax:complete", function(){
    $("#submit_note").removeAttr("disabled");
  })

- if ["issues", "projects"].include?(controller.controller_name)
  :javascript
    $(function(){
      var int =self.setInterval("updatePage()", 20000);
    });