gitlab-org--gitlab-foss/app/views/notes/create.js.haml

12 lines
354 B
Text
Raw Normal View History

2011-10-08 17:36:38 -04:00
- if @note.valid?
:plain
$("#new_note .errors").remove();
$('#note_note').val("");
2011-11-04 11:46:51 -04:00
NoteList.prepend(#{@note.id}, "#{escape_javascript(render :partial => "notes/show", :locals => {:note => @note})}");
2011-10-08 17:36:38 -04:00
- else
:plain
$("#new_note").replaceWith("#{escape_javascript(render('form'))}");
2011-10-17 13:05:47 -04:00
:plain
2011-10-17 13:05:47 -04:00
$("#submit_note").removeAttr("disabled");