2011-11-04 11:46:51 -04:00
|
|
|
- if can? current_user, :write_note, @project
|
|
|
|
= render "notes/form"
|
|
|
|
.clear
|
|
|
|
%hr
|
2012-02-24 09:16:06 +02:00
|
|
|
%ul#notes-list
|
2012-02-24 22:19:47 +02:00
|
|
|
.loading
|
|
|
|
|
2011-10-09 00:36:38 +03:00
|
|
|
|
|
|
|
:javascript
|
2011-10-26 18:46:25 +05:00
|
|
|
$('.delete-note').live('ajax:success', function() {
|
|
|
|
$(this).closest('li').fadeOut(); });
|
2011-10-09 00:36:38 +03:00
|
|
|
|
2011-10-17 20:05:47 +03:00
|
|
|
$("#new_note").live("ajax:before", function(){
|
2011-10-26 18:46:25 +05:00
|
|
|
$("#submit_note").attr("disabled", "disabled");
|
2011-10-17 20:05:47 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
$("#new_note").live("ajax:complete", function(){
|
2011-10-26 18:46:25 +05:00
|
|
|
$("#submit_note").removeAttr("disabled");
|
2011-10-17 20:05:47 +03: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 19:48:10 +03:00
|
|
|
});
|
2011-11-04 11:46:51 -04:00
|
|
|
|
2012-02-24 09:16:06 +02:00
|
|
|
NoteList.init("#{tid}", "#{tt}", "#{project_notes_path(@project)}");
|
2011-11-04 11:46:51 -04:00
|
|
|
});
|