gitlab-org--gitlab-foss/app/views/notes/_notes.html.haml

29 lines
647 B
Plaintext
Raw Normal View History

2011-11-04 15:46:51 +00:00
- if can? current_user, :write_note, @project
= render "notes/form"
.clear
%hr
2012-02-24 07:16:06 +00:00
%ul#notes-list
.loading
2011-10-08 21:36:38 +00:00
:javascript
$('.delete-note').live('ajax:success', function() {
$(this).closest('li').fadeOut(); });
2011-10-08 21:36:38 +00:00
2011-10-17 17:05:47 +00:00
$("#new_note").live("ajax:before", function(){
$("#submit_note").attr("disabled", "disabled");
2011-10-17 17:05:47 +00:00
})
$("#new_note").live("ajax:complete", function(){
$("#submit_note").removeAttr("disabled");
2011-10-17 17:05:47 +00:00
})
2011-11-04 15:46:51 +00:00
$(function(){
$("#note_note").live("click", function(){
$(this).css("height", "100px");
$('.attach_holder').show();
2011-10-17 16:48:10 +00:00
});
2011-11-04 15:46:51 +00:00
2012-02-24 07:16:06 +00:00
NoteList.init("#{tid}", "#{tt}", "#{project_notes_path(@project)}");
2011-11-04 15:46:51 +00:00
});