Commit a9c7de8815def87867daf025ff9753aae2615228
1 parent
581a8223
Exists in
master
and in
4 other branches
Revert "Handle MR "show all commits" link with a doc-ready event handler."
This reverts commit 5b1ede628065ecfdf95552322328b5bb7613753a.
Showing
2 changed files
with
7 additions
and
8 deletions
Show diff stats
app/assets/javascripts/merge_requests.js
| ... | ... | @@ -58,16 +58,15 @@ var MergeRequest = { |
| 58 | 58 | dataType: "script"}); |
| 59 | 59 | }, |
| 60 | 60 | |
| 61 | + showAllCommits: | |
| 62 | + function() { | |
| 63 | + $(".first_mr_commits").remove(); | |
| 64 | + $(".all_mr_commits").removeClass("hide"); | |
| 65 | + }, | |
| 66 | + | |
| 61 | 67 | already_cannot_be_merged: |
| 62 | 68 | function(){ |
| 63 | 69 | $(".automerge_widget").hide(); |
| 64 | 70 | $(".automerge_widget.already_cannot_be_merged").show(); |
| 65 | 71 | } |
| 66 | 72 | } |
| 67 | - | |
| 68 | -$(function () { | |
| 69 | - $('.first_mr_commits a.show_all').live('click', function() { | |
| 70 | - $(".first_mr_commits").remove(); | |
| 71 | - $(".all_mr_commits").removeClass("hide"); | |
| 72 | - }); | |
| 73 | -}); | ... | ... |
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 | - %a.show_all Click here to show all | |
| 12 | + = link_to_function "Click here to show all", "MergeRequest.showAllCommits()" | |
| 13 | 13 | %ul.all_mr_commits.hide.unstyled |
| 14 | 14 | - @commits.each do |commit| |
| 15 | 15 | = render "commits/commit", :commit => commit | ... | ... |