gitlabhq/app/views/notes/_create_common.js.haml

12 lines
393 B
Plaintext
Raw Normal View History

- if note.valid?
:plain
$("#new_note .error").remove();
$('#new_note textarea').val("");
$('#preview-link').text('Preview');
$('#preview-note').hide(); $('#note_note').show();
NoteList.prepend(#{note.id}, "#{escape_javascript(render partial: "notes/show", locals: {note: note})}");
- else
:plain
$("#new_note").replaceWith("#{escape_javascript(render('form'))}");