2011-11-04 11:46:51 -04:00
|
|
|
- if can? current_user, :write_note, @project
|
|
|
|
= render "notes/form"
|
|
|
|
.clear
|
|
|
|
%hr
|
|
|
|
%ul#notes-list= render "notes/notes_list"
|
2011-10-08 17:36:38 -04:00
|
|
|
|
|
|
|
:javascript
|
2011-10-26 09:46:25 -04:00
|
|
|
$('.delete-note').live('ajax:success', function() {
|
|
|
|
$(this).closest('li').fadeOut(); });
|
2011-10-08 17:36:38 -04:00
|
|
|
|
2011-10-17 13:05:47 -04:00
|
|
|
$("#new_note").live("ajax:before", function(){
|
2011-10-26 09:46:25 -04:00
|
|
|
$("#submit_note").attr("disabled", "disabled");
|
2011-10-17 13:05:47 -04:00
|
|
|
})
|
|
|
|
|
|
|
|
$("#new_note").live("ajax:complete", function(){
|
2011-10-26 09:46:25 -04:00
|
|
|
$("#submit_note").removeAttr("disabled");
|
2011-10-17 13:05:47 -04:00
|
|
|
})
|
|
|
|
|
2011-11-04 11:46:51 -04:00
|
|
|
$(function(){
|
|
|
|
$("#note_note").live("click", function(){
|
|
|
|
$(this).css("height", "100px");
|
|
|
|
$('.attach_holder').show();
|
2011-10-17 12:48:10 -04:00
|
|
|
});
|
2011-11-04 11:46:51 -04:00
|
|
|
|
|
|
|
NoteList.init("wall", #{@notes.last.try(:id) || 0}, #{@notes.first.try(:id) || 0});
|
|
|
|
});
|