diff options
author | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2012-12-02 23:14:56 +0100 |
---|---|---|
committer | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2012-12-03 22:51:57 +0100 |
commit | c20af32ae4adb1ec891e32ea048ae06ef4c7bc5f (patch) | |
tree | 7d1bdf0b12a850b0bbbd4efe043b474c3b73f898 /app/views/notes/index.js.haml | |
parent | 6fc10fa2564538bb892090759fdb05604b0e5567 (diff) | |
download | gitlab-ce-c20af32ae4adb1ec891e32ea048ae06ef4c7bc5f.tar.gz |
Pull together and rename Notes partials
Diffstat (limited to 'app/views/notes/index.js.haml')
-rw-r--r-- | app/views/notes/index.js.haml | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/app/views/notes/index.js.haml b/app/views/notes/index.js.haml index ae70dcad289..f0826100fbf 100644 --- a/app/views/notes/index.js.haml +++ b/app/views/notes/index.js.haml @@ -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(); |