Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/notes/create.js.haml')
-rw-r--r--app/views/notes/create.js.haml8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/views/notes/create.js.haml b/app/views/notes/create.js.haml
new file mode 100644
index 00000000000..47cff1d8834
--- /dev/null
+++ b/app/views/notes/create.js.haml
@@ -0,0 +1,8 @@
+- if @note.valid?
+ :plain
+ $("#new_note .errors").remove();
+ $("#notes-list").append("#{escape_javascript(render(:partial => 'show', :locals => {:note => @note} ))}");
+ $('#note_note').val("");
+- else
+ :plain
+ $("#new_note").replaceWith("#{escape_javascript(render('form'))}");