index.js.haml 523 Bytes
- 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();