12 lines
354 B
Plaintext
12 lines
354 B
Plaintext
- if @note.valid?
|
|
:plain
|
|
$("#new_note .errors").remove();
|
|
$('#note_note').val("");
|
|
NoteList.prepend(#{@note.id}, "#{escape_javascript(render :partial => "notes/show", :locals => {:note => @note})}");
|
|
- else
|
|
:plain
|
|
$("#new_note").replaceWith("#{escape_javascript(render('form'))}");
|
|
|
|
:plain
|
|
$("#submit_note").removeAttr("disabled");
|