e.preventDefault();
}
});
+
+ /**
+ * Commit show suppressed diff
+ *
+ */
+ $(".supp_diff_link").bind("click", function() {
+ showDiff(this);
+ })
});
function focusSearch() {
$(".merge-request-diffs").show();
e.preventDefault();
});
+
+ $(".mr_show_all_commits").bind("click", function() {
+ MergeRequest.showAllCommits();
+ })
},
showState:
min-height:42px;
}
+.supp_diff_link,
+.mr_show_all_commits {
+ cursor:pointer;
+}
- 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|
%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