diff --git a/app/views/notes/_load.js.haml b/app/views/notes/_load.js.haml deleted file mode 100644 index 8c735476e7ce22d84c97b72df351e67c6d784571..0000000000000000000000000000000000000000 --- a/app/views/notes/_load.js.haml +++ /dev/null @@ -1,17 +0,0 @@ -- unless @notes.blank? - - if loading_more_notes? - :plain - NoteList.appendMoreNotes(#{@notes.last.id}, "#{escape_javascript(render 'notes/notes_list')}"); - - - elsif loading_new_notes? - :plain - NoteList.replaceNewNotes("#{escape_javascript(render 'notes/notes_list')}"); - - - else - :plain - NoteList.setContent(#{@notes.last.id}, "#{escape_javascript(render 'notes/notes_list')}"); - -- else - - if loading_more_notes? - :plain - NoteList.finishedLoadingMore(); diff --git a/app/views/notes/index.js.haml b/app/views/notes/index.js.haml index ee31c0b8d3c1c8112471bbee240b14ef816f01ac..8c735476e7ce22d84c97b72df351e67c6d784571 100644 --- a/app/views/notes/index.js.haml +++ b/app/views/notes/index.js.haml @@ -1 +1,17 @@ -= render "notes/load" +- unless @notes.blank? + - if loading_more_notes? + :plain + NoteList.appendMoreNotes(#{@notes.last.id}, "#{escape_javascript(render 'notes/notes_list')}"); + + - elsif loading_new_notes? + :plain + NoteList.replaceNewNotes("#{escape_javascript(render 'notes/notes_list')}"); + + - else + :plain + NoteList.setContent(#{@notes.last.id}, "#{escape_javascript(render 'notes/notes_list')}"); + +- else + - if loading_more_notes? + :plain + NoteList.finishedLoadingMore();