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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-02-25 00:19:47 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-02-25 00:19:47 +0400
commitd41d8ffb02fa74fd4571603548bd7e401ec99e0c (patch)
treeb70b500d914367efbb39fe822053a6c141276975 /app/views/notes
parent215a01f63ccdc085f75a48f6f7ab6f2b15b5852c (diff)
Reply button, Comments for Merge Request diff
Diffstat (limited to 'app/views/notes')
-rw-r--r--app/views/notes/_notes.html.haml2
-rw-r--r--app/views/notes/_reply_button.html.haml3
-rw-r--r--app/views/notes/_show.html.haml2
-rw-r--r--app/views/notes/create.js.haml5
4 files changed, 10 insertions, 2 deletions
diff --git a/app/views/notes/_notes.html.haml b/app/views/notes/_notes.html.haml
index fb589c3238f..51c861ab5c7 100644
--- a/app/views/notes/_notes.html.haml
+++ b/app/views/notes/_notes.html.haml
@@ -3,6 +3,8 @@
.clear
%hr
%ul#notes-list
+.loading
+
:javascript
$('.delete-note').live('ajax:success', function() {
diff --git a/app/views/notes/_reply_button.html.haml b/app/views/notes/_reply_button.html.haml
new file mode 100644
index 00000000000..f53b8c8d364
--- /dev/null
+++ b/app/views/notes/_reply_button.html.haml
@@ -0,0 +1,3 @@
+%tr.line_notes_row.reply
+ %td{:colspan => 3}
+ = link_to "Reply", "#", :class => "line_note_reply_link", "line_code" => line_code, :title => "Add note for this line"
diff --git a/app/views/notes/_show.html.haml b/app/views/notes/_show.html.haml
index d91fea04b5b..6da1d5904bf 100644
--- a/app/views/notes/_show.html.haml
+++ b/app/views/notes/_show.html.haml
@@ -6,7 +6,7 @@
= time_ago_in_words(note.updated_at)
ago
- if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project)
- = link_to "Remove", [@project, note], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-note right"
+ %strong= link_to "Remove", [@project, note], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-note btn small"
%div.note-title
= markdown(note.note)
diff --git a/app/views/notes/create.js.haml b/app/views/notes/create.js.haml
index b81ea5b03e7..646b491d636 100644
--- a/app/views/notes/create.js.haml
+++ b/app/views/notes/create.js.haml
@@ -3,7 +3,10 @@
: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})}");
+ $("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();