fixed notes logic

This commit is contained in:
Dmitriy Zaporozhets 2012-02-27 19:05:27 +02:00
parent f0f14c8eab
commit 1e689bfba3
6 changed files with 109 additions and 79 deletions

View file

@ -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]