summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-07-23 15:55:49 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-07-23 16:07:45 -0400
commitcad0e848b099ab1993d1088e317fb6e5307862ad (patch)
tree1ed6d6b78763786d2c281f314b928cc4154f2b93
parent7e262ebf157f2af4658485aae7073d315648cfa7 (diff)
downloadgitlab-ce-rs-changes-suppressed-link.tar.gz
Fix and style the "Changes suppressed" link.rs-changes-suppressed-link
-rw-r--r--app/assets/javascripts/application.js.coffee7
-rw-r--r--app/assets/stylesheets/generic/common.scss2
-rw-r--r--app/assets/stylesheets/pages/diff.scss11
-rw-r--r--app/views/projects/diffs/_text_file.html.haml3
4 files changed, 18 insertions, 5 deletions
diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee
index 8b041c490d8..bb0a0c51fd4 100644
--- a/app/assets/javascripts/application.js.coffee
+++ b/app/assets/javascripts/application.js.coffee
@@ -164,9 +164,10 @@ $ ->
$('.account-box').hover -> $(@).toggleClass('hover')
# Commit show suppressed diff
- $(".diff-content").on "click", ".supp_diff_link", ->
- $(@).next('table').show()
- $(@).remove()
+ $(document).on 'click', '.diff-content .js-show-suppressed-diff', ->
+ $container = $(@).parent()
+ $container.next('table').show()
+ $container.remove()
$('.navbar-toggle').on 'click', ->
$('.header-content .title').toggle()
diff --git a/app/assets/stylesheets/generic/common.scss b/app/assets/stylesheets/generic/common.scss
index 961ac793de2..d36530169a9 100644
--- a/app/assets/stylesheets/generic/common.scss
+++ b/app/assets/stylesheets/generic/common.scss
@@ -184,7 +184,7 @@ li.note {
}
}
-.supp_diff_link,
+.show-suppressed-diff,
.show-all-commits {
cursor: pointer;
}
diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss
index af6ea58382f..1557c243db5 100644
--- a/app/assets/stylesheets/pages/diff.scss
+++ b/app/assets/stylesheets/pages/diff.scss
@@ -65,6 +65,17 @@
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 {
width: 100%;
font-family: $monospace_font;
diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml
index ed4c601bcdb..977ca423f75 100644
--- a/app/views/projects/diffs/_text_file.html.haml
+++ b/app/views/projects/diffs/_text_file.html.haml
@@ -1,6 +1,7 @@
- too_big = diff_file.diff_lines.count > Commit::DIFF_SAFE_LINES
- 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}"}
- last_line = 0