gitlabhq/app/views/notes/_create_common.js.haml
2012-02-24 22:36:44 +02:00

9 lines
308 B
Text

- if note.valid?
:plain
$("#new_note .errors").remove();
$('#new_note textarea').val("");
NoteList.prepend(#{note.id}, "#{escape_javascript(render :partial => "notes/show", :locals => {:note => note})}");
- else
:plain
$("#new_note").replaceWith("#{escape_javascript(render('form'))}");