fix note preview link, and hide preview and errors after posting a comment
This commit is contained in:
parent
6ebd360cf2
commit
0b7e67ad12
2 changed files with 4 additions and 2 deletions
|
@ -1,7 +1,9 @@
|
|||
- if note.valid?
|
||||
:plain
|
||||
$("#new_note .errors").remove();
|
||||
$("#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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue