2012-02-24 21:36:44 +01:00
|
|
|
- if note.valid?
|
|
|
|
:plain
|
2012-08-30 20:31:55 +02:00
|
|
|
$(".note-form-holder .error").remove();
|
|
|
|
$('.note-form-holder textarea').val("");
|
|
|
|
$('.note-form-holder #preview-link').text('Preview');
|
|
|
|
$('.note-form-holder #preview-note').hide();
|
|
|
|
$('.note-form-holder').show();
|
2012-09-14 16:52:24 +02:00
|
|
|
NoteList.appendNewNote(#{note.id}, "#{escape_javascript(render "notes/show", note: note)}");
|
|
|
|
|
2012-02-24 21:36:44 +01:00
|
|
|
- else
|
|
|
|
:plain
|
2012-09-14 01:21:39 +02:00
|
|
|
$(".note-form-holder").replaceWith("#{escape_javascript(render 'form')}");
|
2012-02-24 21:36:44 +01:00
|
|
|
|