Pull together and rename Notes partials
This commit is contained in:
parent
6fc10fa256
commit
c20af32ae4
7 changed files with 24 additions and 30 deletions
|
@ -1,18 +1,15 @@
|
|||
- unless @notes.blank?
|
||||
var notesHtml = "#{escape_javascript(render 'notes/notes')}";
|
||||
- new_note_ids = @notes.map(&:id)
|
||||
- if loading_more_notes?
|
||||
:plain
|
||||
NoteList.appendMoreNotes(#{new_note_ids}, "#{escape_javascript(render 'notes/notes')}");
|
||||
NoteList.appendMoreNotes(#{new_note_ids}, notesHtml);
|
||||
|
||||
- elsif loading_new_notes?
|
||||
:plain
|
||||
NoteList.replaceNewNotes(#{new_note_ids}, "#{escape_javascript(render 'notes/notes')}");
|
||||
NoteList.replaceNewNotes(#{new_note_ids}, notesHtml);
|
||||
|
||||
- else
|
||||
:plain
|
||||
NoteList.setContent(#{new_note_ids}, "#{escape_javascript(render 'notes/notes')}");
|
||||
NoteList.setContent(#{new_note_ids}, notesHtml);
|
||||
|
||||
- else
|
||||
- if loading_more_notes?
|
||||
:plain
|
||||
NoteList.finishedLoadingMore();
|
||||
NoteList.finishedLoadingMore();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue