Commit f84ba4c0 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'rs-changes-suppressed-link' into 'master'

Fix and style the "Changes suppressed" link.

At some point the "Changes suppressed. Click to show" link stopped behaving as expected, so this fixes it.

I also thought it looked bad:

![Screen_Shot_2015-07-23_at_4.06.49_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/0a1552e4edb659f065bd202b93bc61ef/Screen_Shot_2015-07-23_at_4.06.49_PM.png)

So I gave it some room to breathe:

![Screen_Shot_2015-07-23_at_4.00.25_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/abc0704e597ed010cade81782ac9099e/Screen_Shot_2015-07-23_at_4.00.25_PM.png)


See merge request !1038
parents 0c1d9125 cad0e848
...@@ -164,9 +164,10 @@ $ -> ...@@ -164,9 +164,10 @@ $ ->
$('.account-box').hover -> $(@).toggleClass('hover') $('.account-box').hover -> $(@).toggleClass('hover')
# Commit show suppressed diff # Commit show suppressed diff
$(".diff-content").on "click", ".supp_diff_link", -> $(document).on 'click', '.diff-content .js-show-suppressed-diff', ->
$(@).next('table').show() $container = $(@).parent()
$(@).remove() $container.next('table').show()
$container.remove()
$('.navbar-toggle').on 'click', -> $('.navbar-toggle').on 'click', ->
$('.header-content .title').toggle() $('.header-content .title').toggle()
......
...@@ -184,7 +184,7 @@ li.note { ...@@ -184,7 +184,7 @@ li.note {
} }
} }
.supp_diff_link, .show-suppressed-diff,
.show-all-commits { .show-all-commits {
cursor: pointer; cursor: pointer;
} }
......
...@@ -65,6 +65,17 @@ ...@@ -65,6 +65,17 @@
color: #777; color: #777;
} }
.suppressed-container {
padding: ($padding-base-vertical + 5px) $padding-base-horizontal;
text-align: center;
// "Changes suppressed. Click to show." link
.show-suppressed-diff {
font-size: 110%;
font-weight: bold;
}
}
table { table {
width: 100%; width: 100%;
font-family: $monospace_font; font-family: $monospace_font;
......
- too_big = diff_file.diff_lines.count > Commit::DIFF_SAFE_LINES - too_big = diff_file.diff_lines.count > Commit::DIFF_SAFE_LINES
- if too_big - if too_big
%a.supp_diff_link Changes suppressed. Click to show .suppressed-container
%a.show-suppressed-diff.js-show-suppressed-diff Changes suppressed. Click to show.
%table.text-file{class: "#{'hide' if too_big}"} %table.text-file{class: "#{'hide' if too_big}"}
- last_line = 0 - last_line = 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment