summaryrefslogtreecommitdiff
path: root/app/views/notes/index.js.haml
blob: ae70dcad289bce38b4b4fc2fef8b222647563404 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
- unless @notes.blank?
  - new_note_ids = @notes.map(&:id)
  - if loading_more_notes?
    :plain
      NoteList.appendMoreNotes(#{new_note_ids}, "#{escape_javascript(render 'notes/notes')}");

  - elsif loading_new_notes?
    :plain
      NoteList.replaceNewNotes(#{new_note_ids}, "#{escape_javascript(render 'notes/notes')}");

  - else
    :plain
      NoteList.setContent(#{new_note_ids}, "#{escape_javascript(render 'notes/notes')}");

- else
  - if loading_more_notes?
    :plain
      NoteList.finishedLoadingMore();