Commit 3d7b35a37d30365088947de0cf85cc7d4af79162
1 parent
8c46123f
Exists in
master
and in
4 other branches
per line comment fix
Showing
4 changed files
with
34 additions
and
11 deletions
Show diff stats
app/assets/stylesheets/commits.css.scss
@@ -78,7 +78,7 @@ body.project-page.commits-page .commits-date a.commit span.commit-author strong{ | @@ -78,7 +78,7 @@ body.project-page.commits-page .commits-date a.commit span.commit-author strong{ | ||
78 | padding:0px; | 78 | padding:0px; |
79 | border:none; | 79 | border:none; |
80 | background:#F7F7F7; | 80 | background:#F7F7F7; |
81 | - color:#333; | 81 | + color:#aaa; |
82 | padding: 0px 5px; | 82 | padding: 0px 5px; |
83 | border-right: 1px solid #ccc; | 83 | border-right: 1px solid #ccc; |
84 | text-align:right; | 84 | text-align:right; |
@@ -89,7 +89,7 @@ body.project-page.commits-page .commits-date a.commit span.commit-author strong{ | @@ -89,7 +89,7 @@ body.project-page.commits-page .commits-date a.commit span.commit-author strong{ | ||
89 | float:left; | 89 | float:left; |
90 | width:35px; | 90 | width:35px; |
91 | font-weight:normal; | 91 | font-weight:normal; |
92 | - color:#888; | 92 | + color:#aaa; |
93 | &:hover { | 93 | &:hover { |
94 | text-decoration:underline; | 94 | text-decoration:underline; |
95 | } | 95 | } |
@@ -146,3 +146,18 @@ ul.bordered-list li:last-child { border:none } | @@ -146,3 +146,18 @@ ul.bordered-list li:last-child { border:none } | ||
146 | } | 146 | } |
147 | } | 147 | } |
148 | } | 148 | } |
149 | + | ||
150 | +.per_line_form { | ||
151 | + background: #79C3E0; | ||
152 | + | ||
153 | + form { | ||
154 | + width: 743px; | ||
155 | + border: 1px solid #CCC; | ||
156 | + padding: 20px; | ||
157 | + background: white; | ||
158 | + } | ||
159 | + | ||
160 | + .hide-button { | ||
161 | + color:#c33; | ||
162 | + } | ||
163 | +} |
app/models/note.rb
@@ -52,6 +52,10 @@ class Note < ActiveRecord::Base | @@ -52,6 +52,10 @@ class Note < ActiveRecord::Base | ||
52 | else | 52 | else |
53 | noteable | 53 | noteable |
54 | end | 54 | end |
55 | + # Temp fix to prevent app crash | ||
56 | + # if note commit id doesnt exist | ||
57 | + rescue | ||
58 | + nil | ||
55 | end | 59 | end |
56 | 60 | ||
57 | def line_file_id | 61 | def line_file_id |
app/views/commits/_text_file.html.haml
@@ -10,6 +10,10 @@ | @@ -10,6 +10,10 @@ | ||
10 | - if line.match(/^@@ -/) | 10 | - if line.match(/^@@ -/) |
11 | - line_old = line.match(/\-[0-9]*/)[0].to_i.abs rescue 0 | 11 | - line_old = line.match(/\-[0-9]*/)[0].to_i.abs rescue 0 |
12 | - line_new = line.match(/\+[0-9]*/)[0].to_i.abs rescue 0 | 12 | - line_new = line.match(/\+[0-9]*/)[0].to_i.abs rescue 0 |
13 | + %tr.line_holder | ||
14 | + %td.old_line= "..." | ||
15 | + %td.new_line= "..." | ||
16 | + %td.line_content | ||
13 | - next | 17 | - next |
14 | 18 | ||
15 | - full_line = html_escape(line.gsub(/\n/, '')) | 19 | - full_line = html_escape(line.gsub(/\n/, '')) |
app/views/notes/_per_line_form.html.haml
@@ -18,17 +18,17 @@ | @@ -18,17 +18,17 @@ | ||
18 | %br | 18 | %br |
19 | %br | 19 | %br |
20 | = f.text_area :note, :size => 255 | 20 | = f.text_area :note, :size => 255 |
21 | - | ||
22 | - %p.notify_controls | ||
23 | - %span Notify: | ||
24 | - = check_box_tag :notify, 1, @note.noteable_type != "Commit" | ||
25 | - = label_tag :notify, "Project team" | ||
26 | - | ||
27 | - -if @note.noteable_type == "Commit" | ||
28 | - = check_box_tag :notify_author, 1 , @note.noteable_type == "Commit" | ||
29 | - = label_tag :notify_author, "Commit author" | ||
30 | 21 | ||
31 | .clear | 22 | .clear |
32 | %br | 23 | %br |
33 | = f.submit 'Add note', :class => "grey-button", :id => "submit_note" | 24 | = f.submit 'Add note', :class => "grey-button", :id => "submit_note" |
25 | + .right | ||
26 | + = link_to "remove", "#", :class => "hide-button" | ||
34 | 27 | ||
28 | +:javascript | ||
29 | + $(function(){ | ||
30 | + $(".per_line_form .hide-button").bind("click", function(){ | ||
31 | + $('.per_line_form').hide(); | ||
32 | + return false; | ||
33 | + }); | ||
34 | + }); |