Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZevs <vsv2711@gmail.com>2012-06-20 22:01:00 +0400
committerZevs <vsv2711@gmail.com>2012-06-20 22:01:00 +0400
commita9c7de8815def87867daf025ff9753aae2615228 (patch)
tree9de9796aeb07acaf53aa7d39a39c44a356f5eeb3
parent581a8223263deab02b4018267ed63ef334eee97f (diff)
Revert "Handle MR "show all commits" link with a doc-ready event handler."
This reverts commit 5b1ede628065ecfdf95552322328b5bb7613753a.
-rw-r--r--app/assets/javascripts/merge_requests.js13
-rw-r--r--app/views/merge_requests/_commits.html.haml2
2 files changed, 7 insertions, 8 deletions
diff --git a/app/assets/javascripts/merge_requests.js b/app/assets/javascripts/merge_requests.js
index 9a18f335559..c075cb4c0a3 100644
--- a/app/assets/javascripts/merge_requests.js
+++ b/app/assets/javascripts/merge_requests.js
@@ -58,16 +58,15 @@ var MergeRequest = {
dataType: "script"});
},
+ showAllCommits:
+ function() {
+ $(".first_mr_commits").remove();
+ $(".all_mr_commits").removeClass("hide");
+ },
+
already_cannot_be_merged:
function(){
$(".automerge_widget").hide();
$(".automerge_widget.already_cannot_be_merged").show();
}
}
-
-$(function () {
- $('.first_mr_commits a.show_all').live('click', function() {
- $(".first_mr_commits").remove();
- $(".all_mr_commits").removeClass("hide");
- });
-});
diff --git a/app/views/merge_requests/_commits.html.haml b/app/views/merge_requests/_commits.html.haml
index bad328b6792..441a7f32ef4 100644
--- a/app/views/merge_requests/_commits.html.haml
+++ b/app/views/merge_requests/_commits.html.haml
@@ -9,7 +9,7 @@
%li.bottom
8 of #{@commits.count} commits displayed.
%strong
- %a.show_all Click here to show all
+ = link_to_function "Click here to show all", "MergeRequest.showAllCommits()"
%ul.all_mr_commits.hide.unstyled
- @commits.each do |commit|
= render "commits/commit", :commit => commit