fixed notes loading/paging
This commit is contained in:
parent
0b0e0225ad
commit
586c53ea05
6 changed files with 47 additions and 15 deletions
|
@ -1,10 +1,17 @@
|
|||
- unless @notes.blank?
|
||||
|
||||
- if params[:last_id]
|
||||
- if params[:last_id] && params[:first_id]
|
||||
:plain
|
||||
NoteList.replace(#{@notes.last.id}, #{@notes.first.id}, "#{escape_javascript(render(:partial => 'notes/notes_list'))}");
|
||||
|
||||
|
||||
- elsif params[:last_id]
|
||||
:plain
|
||||
NoteList.prepend(#{@notes.first.id}, "#{escape_javascript(render(:partial => 'notes/notes_list'))}");
|
||||
|
||||
- if params[:first_id]
|
||||
- elsif params[:first_id]
|
||||
:plain
|
||||
NoteList.append(#{@notes.last.id}, "#{escape_javascript(render(:partial => 'notes/notes_list'))}");
|
||||
|
||||
- else
|
||||
:plain
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue