Commit bbb926f3c49ea32320ec2e000e03a9d45b94197b
Exists in
master
and in
4 other branches
Merge pull request #952 from gitlabhq/remove_link_to_function
Get rid of deprecated link_to_function
Showing
5 changed files
with
18 additions
and
2 deletions
Show diff stats
app/assets/javascripts/application.js
| ... | ... | @@ -53,6 +53,14 @@ $(document).ready(function(){ |
| 53 | 53 | e.preventDefault(); |
| 54 | 54 | } |
| 55 | 55 | }); |
| 56 | + | |
| 57 | + /** | |
| 58 | + * Commit show suppressed diff | |
| 59 | + * | |
| 60 | + */ | |
| 61 | + $(".supp_diff_link").bind("click", function() { | |
| 62 | + showDiff(this); | |
| 63 | + }); | |
| 56 | 64 | }); |
| 57 | 65 | |
| 58 | 66 | function focusSearch() { | ... | ... |
app/assets/javascripts/merge_requests.js
app/assets/stylesheets/common.scss
app/views/commits/_text_file.html.haml
| 1 | 1 | - too_big = max_lines = diff.diff.lines.count > 1000 |
| 2 | 2 | - if too_big |
| 3 | - = link_to_function "Diff suppressed. Click to show", "showDiff(this)", :class => "supp_diff_link" | |
| 3 | + %a.supp_diff_link Diff suppressed. Click to show | |
| 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| | ... | ... |
app/views/merge_requests/_commits.html.haml
| ... | ... | @@ -9,7 +9,7 @@ |
| 9 | 9 | %li.bottom |
| 10 | 10 | 8 of #{@commits.count} commits displayed. |
| 11 | 11 | %strong |
| 12 | - = link_to_function "Click here to show all", "MergeRequest.showAllCommits()" | |
| 12 | + %a.mr_show_all_commits Click here to show all | |
| 13 | 13 | %ul.all_mr_commits.hide.unstyled |
| 14 | 14 | - @commits.each do |commit| |
| 15 | 15 | = render "commits/commit", :commit => commit | ... | ... |