Revert "Handle Commit "show suppressed diff" link with a doc-ready event handler."
This reverts commit ef1598b4af
.
This commit is contained in:
parent
a9c7de8815
commit
6507c1085e
|
@ -75,6 +75,11 @@ function slugify(text) {
|
||||||
return text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase();
|
return text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showDiff(link) {
|
||||||
|
$(link).next('table').show();
|
||||||
|
$(link).remove();
|
||||||
|
}
|
||||||
|
|
||||||
(function($){
|
(function($){
|
||||||
var _chosen = $.fn.chosen;
|
var _chosen = $.fn.chosen;
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
|
|
|
@ -57,10 +57,3 @@ var CommitsList = {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function () {
|
|
||||||
$('a.supp_diff_link').live('click', function() {
|
|
||||||
$(link).next('table').show();
|
|
||||||
$(link).remove();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
- too_big = max_lines = diff.diff.lines.count > 1000
|
- too_big = max_lines = diff.diff.lines.count > 1000
|
||||||
- if too_big
|
- if too_big
|
||||||
%a.supp_diff_link Diff suppressed. Click to show
|
= link_to_function "Diff suppressed. Click to show", "showDiff(this)", :class => "supp_diff_link"
|
||||||
|
|
||||||
%table{:class => "#{'hide' if too_big}"}
|
%table{:class => "#{'hide' if too_big}"}
|
||||||
- each_diff_line(diff.diff.lines.to_a, index) do |line, type, line_code, line_new, line_old|
|
- each_diff_line(diff.diff.lines.to_a, index) do |line, type, line_code, line_new, line_old|
|
||||||
|
|
Loading…
Reference in a new issue