per line comments w/o tests & with dirty code

This commit is contained in:
Dmitriy Zaporozhets 2012-01-12 00:26:01 +02:00
parent 9da4d06a87
commit 99bb4a153d
11 changed files with 55391 additions and 12 deletions

View file

@ -1,11 +1,18 @@
- if @note.valid?
:plain
$("#new_note .errors").remove();
$('#note_note').val("");
NoteList.prepend(#{@note.id}, "#{escape_javascript(render :partial => "notes/show", :locals => {:note => @note})}");
- if @note.line_code
:plain
$(".per_line_form").hide();
$('#new_note textarea').val("");
$(".#{@note.line_code}").parent().after("#{escape_javascript(render :partial => "notes/per_line_show", :locals => {:note => @note})}");
- else
:plain
$("#new_note .errors").remove();
$('#new_note textarea').val("");
NoteList.prepend(#{@note.id}, "#{escape_javascript(render :partial => "notes/show", :locals => {:note => @note})}");
- else
:plain
$("#new_note").replaceWith("#{escape_javascript(render('form'))}");
- unless @note.line_code
:plain
$("#new_note").replaceWith("#{escape_javascript(render('form'))}");
:plain
$("#submit_note").removeAttr("disabled");