summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/commits.js
diff options
context:
space:
mode:
authorRobb Kidd <robb@thekidds.org>2012-06-20 11:11:17 -0400
committerRobb Kidd <robb@thekidds.org>2012-06-20 11:11:17 -0400
commitef1598b4afa94b21db7f38755182a701d03ae44a (patch)
treebcc9d91c483584d91a582f426e16d1203225fc21 /app/assets/javascripts/commits.js
parent5b1ede628065ecfdf95552322328b5bb7613753a (diff)
downloadgitlab-ce-ef1598b4afa94b21db7f38755182a701d03ae44a.tar.gz
Handle Commit "show suppressed diff" link with a doc-ready event handler.
Replaces link_to_function use which was deprecated in Rails v3.2.4. https://github.com/rails/rails/commit/9dc57fe9c Still absent is a graceful degrade for no-JS.
Diffstat (limited to 'app/assets/javascripts/commits.js')
-rw-r--r--app/assets/javascripts/commits.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/assets/javascripts/commits.js b/app/assets/javascripts/commits.js
index b31fe485896..5afac8c32c3 100644
--- a/app/assets/javascripts/commits.js
+++ b/app/assets/javascripts/commits.js
@@ -57,3 +57,10 @@ var CommitsList = {
});
}
}
+
+$(function () {
+ $('a.supp_diff_link').live('click', function() {
+ $(link).next('table').show();
+ $(link).remove();
+ });
+});