Fixed comments for snippets. Tests fixed

This commit is contained in:
Dmitriy Zaporozhets 2012-02-24 22:36:44 +02:00
parent d41d8ffb02
commit 292a41cbe2
7 changed files with 26 additions and 24 deletions

View file

@ -1,21 +1,8 @@
- if @note.valid?
- if @note.line_code
:plain
$(".per_line_form").hide();
$('#new_note textarea').val("");
$("a.line_note_reply_link[line_code='#{@note.line_code}']").closest("tr").remove();
var trEl = $(".#{@note.line_code}").parent();
trEl.after("#{escape_javascript(render :partial => "notes/per_line_show", :locals => {:note => @note})}");
trEl.after("#{escape_javascript(render :partial => "notes/reply_button", :locals => {:line_code => @note.line_code})}");
- else
:plain
$("#new_note .errors").remove();
$('#new_note textarea').val("");
NoteList.prepend(#{@note.id}, "#{escape_javascript(render :partial => "notes/show", :locals => {:note => @note})}");
- else
- unless @note.line_code
:plain
$("#new_note").replaceWith("#{escape_javascript(render('form'))}");
- if @note.line_code
= render "create_line", :note => @note
- else
= render "create_common", :note => @note
-# Enable submit button
:plain
$("#submit_note").removeAttr("disabled");