fixed notes logic
This commit is contained in:
parent
f0f14c8eab
commit
1e689bfba3
6 changed files with 109 additions and 79 deletions
|
@ -1,12 +1,7 @@
|
|||
- unless @notes.blank?
|
||||
|
||||
- if params[:last_id] && params[:first_id]
|
||||
- if params[:last_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'))}");
|
||||
NoteList.replace("#{escape_javascript(render(:partial => 'notes/notes_list'))}");
|
||||
|
||||
- elsif params[:first_id]
|
||||
:plain
|
||||
|
@ -14,6 +9,7 @@
|
|||
|
||||
- else
|
||||
:plain
|
||||
NoteList.setContent(#{@notes.last.id}, #{@notes.first.id}, "#{escape_javascript(render(:partial => 'notes/notes_list'))}");
|
||||
|
||||
- else
|
||||
- if params[:first_id]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue