Commit 13fbf4889287f20bd6804e47e20d6535043443b6
1 parent
40a8ae5e
Exists in
spb-stable
and in
3 other branches
Proper class names for diff files
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
2 changed files
with
6 additions
and
6 deletions
Show diff stats
app/assets/stylesheets/sections/commits.scss
@@ -10,11 +10,11 @@ | @@ -10,11 +10,11 @@ | ||
10 | } | 10 | } |
11 | } | 11 | } |
12 | 12 | ||
13 | -.file { | 13 | +.diff-file { |
14 | border: 1px solid #CCC; | 14 | border: 1px solid #CCC; |
15 | margin-bottom: 1em; | 15 | margin-bottom: 1em; |
16 | 16 | ||
17 | - .header { | 17 | + .diff-header { |
18 | @extend .clearfix; | 18 | @extend .clearfix; |
19 | background: #DDD; | 19 | background: #DDD; |
20 | border-bottom: 1px solid #CCC; | 20 | border-bottom: 1px solid #CCC; |
@@ -46,7 +46,7 @@ | @@ -46,7 +46,7 @@ | ||
46 | font-family: $monospace_font; | 46 | font-family: $monospace_font; |
47 | } | 47 | } |
48 | } | 48 | } |
49 | - .content { | 49 | + .diff-content { |
50 | overflow: auto; | 50 | overflow: auto; |
51 | overflow-y: hidden; | 51 | overflow-y: hidden; |
52 | background: #FFF; | 52 | background: #FFF; |
app/views/projects/commits/_diffs.html.haml
@@ -44,8 +44,8 @@ | @@ -44,8 +44,8 @@ | ||
44 | - file = project.repository.blob_at(@commit.id, diff.new_path) | 44 | - file = project.repository.blob_at(@commit.id, diff.new_path) |
45 | - file = project.repository.blob_at(@commit.parent_id, diff.old_path) unless file | 45 | - file = project.repository.blob_at(@commit.parent_id, diff.old_path) unless file |
46 | - next unless file | 46 | - next unless file |
47 | - .file{id: "diff-#{i}"} | ||
48 | - .header | 47 | + .diff-file{id: "diff-#{i}"} |
48 | + .diff-header | ||
49 | - if diff.deleted_file | 49 | - if diff.deleted_file |
50 | %span= diff.old_path | 50 | %span= diff.old_path |
51 | 51 | ||
@@ -70,7 +70,7 @@ | @@ -70,7 +70,7 @@ | ||
70 | %span.commit-short-id= @commit.short_id(6) | 70 | %span.commit-short-id= @commit.short_id(6) |
71 | 71 | ||
72 | 72 | ||
73 | - .content | 73 | + .diff-content |
74 | -# Skipp all non non-supported blobs | 74 | -# Skipp all non non-supported blobs |
75 | - next unless file.respond_to?('text?') | 75 | - next unless file.respond_to?('text?') |
76 | - if file.text? | 76 | - if file.text? |