2012-02-24 21:36:44 +01:00
|
|
|
- if note.valid?
|
|
|
|
:plain
|
2012-08-14 10:24:27 +02:00
|
|
|
$("#new_note .error").remove();
|
2012-02-24 21:36:44 +01:00
|
|
|
$('#new_note textarea').val("");
|
2012-08-14 10:24:27 +02:00
|
|
|
$('#preview-link').text('Preview');
|
|
|
|
$('#preview-note').hide(); $('#note_note').show();
|
2012-08-11 00:07:50 +02:00
|
|
|
NoteList.prepend(#{note.id}, "#{escape_javascript(render partial: "notes/show", locals: {note: note})}");
|
2012-02-24 21:36:44 +01:00
|
|
|
- else
|
|
|
|
:plain
|
|
|
|
$("#new_note").replaceWith("#{escape_javascript(render('form'))}");
|
|
|
|
|