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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-06-21 00:09:33 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-06-21 00:09:33 +0400
commitbbb926f3c49ea32320ec2e000e03a9d45b94197b (patch)
treeb7d7205810333fb3ff95ee4ab29578bdf0c55d67
parent6507c1085e02d9e59020c38ceff3308374dd1df0 (diff)
parentd5b41831d141de75b8566a93b490c8b160c73f32 (diff)
Merge pull request #952 from gitlabhq/remove_link_to_function
Get rid of deprecated link_to_function
-rw-r--r--app/assets/javascripts/application.js8
-rw-r--r--app/assets/javascripts/merge_requests.js4
-rw-r--r--app/assets/stylesheets/common.scss4
-rw-r--r--app/views/commits/_text_file.html.haml2
-rw-r--r--app/views/merge_requests/_commits.html.haml2
5 files changed, 18 insertions, 2 deletions
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index 0af0b11a931..8b8c4291f5d 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -53,6 +53,14 @@ $(document).ready(function(){
e.preventDefault();
}
});
+
+ /**
+ * Commit show suppressed diff
+ *
+ */
+ $(".supp_diff_link").bind("click", function() {
+ showDiff(this);
+ });
});
function focusSearch() {
diff --git a/app/assets/javascripts/merge_requests.js b/app/assets/javascripts/merge_requests.js
index c075cb4c0a3..8df090cfa37 100644
--- a/app/assets/javascripts/merge_requests.js
+++ b/app/assets/javascripts/merge_requests.js
@@ -34,6 +34,10 @@ var MergeRequest = {
$(".merge-request-diffs").show();
e.preventDefault();
});
+
+ $(".mr_show_all_commits").bind("click", function() {
+ MergeRequest.showAllCommits();
+ })
},
showState:
diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss
index 82d43d4c83e..0888b6db1f5 100644
--- a/app/assets/stylesheets/common.scss
+++ b/app/assets/stylesheets/common.scss
@@ -602,3 +602,7 @@ li.note {
min-height:42px;
}
+.supp_diff_link,
+.mr_show_all_commits {
+ cursor:pointer;
+}
diff --git a/app/views/commits/_text_file.html.haml b/app/views/commits/_text_file.html.haml
index e5173b00ed7..fa3d83ca85d 100644
--- a/app/views/commits/_text_file.html.haml
+++ b/app/views/commits/_text_file.html.haml
@@ -1,6 +1,6 @@
- too_big = max_lines = diff.diff.lines.count > 1000
- if too_big
- = link_to_function "Diff suppressed. Click to show", "showDiff(this)", :class => "supp_diff_link"
+ %a.supp_diff_link Diff suppressed. Click to show
%table{:class => "#{'hide' if too_big}"}
- each_diff_line(diff.diff.lines.to_a, index) do |line, type, line_code, line_new, line_old|
diff --git a/app/views/merge_requests/_commits.html.haml b/app/views/merge_requests/_commits.html.haml
index 441a7f32ef4..3c0c44e069a 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
- = link_to_function "Click here to show all", "MergeRequest.showAllCommits()"
+ %a.mr_show_all_commits Click here to show all
%ul.all_mr_commits.hide.unstyled
- @commits.each do |commit|
= render "commits/commit", :commit => commit