Commit 6507c1085e02d9e59020c38ceff3308374dd1df0
1 parent
a9c7de88
Exists in
master
and in
4 other branches
Revert "Handle Commit "show suppressed diff" link with a doc-ready event handler."
This reverts commit ef1598b4afa94b21db7f38755182a701d03ae44a.
Showing
3 changed files
with
6 additions
and
8 deletions
Show diff stats
app/assets/javascripts/application.js
| ... | ... | @@ -75,6 +75,11 @@ function slugify(text) { |
| 75 | 75 | return text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase(); |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | +function showDiff(link) { | |
| 79 | + $(link).next('table').show(); | |
| 80 | + $(link).remove(); | |
| 81 | +} | |
| 82 | + | |
| 78 | 83 | (function($){ |
| 79 | 84 | var _chosen = $.fn.chosen; |
| 80 | 85 | $.fn.extend({ | ... | ... |
app/assets/javascripts/commits.js
app/views/commits/_text_file.html.haml
| 1 | 1 | - too_big = max_lines = diff.diff.lines.count > 1000 |
| 2 | 2 | - if too_big |
| 3 | - %a.supp_diff_link Diff suppressed. Click to show | |
| 3 | + = link_to_function "Diff suppressed. Click to show", "showDiff(this)", :class => "supp_diff_link" | |
| 4 | 4 | |
| 5 | 5 | %table{:class => "#{'hide' if too_big}"} |
| 6 | 6 | - each_diff_line(diff.diff.lines.to_a, index) do |line, type, line_code, line_new, line_old| | ... | ... |