-
Notifications
You must be signed in to change notification settings - Fork 1
/
rails_best_practices_output.html
124 lines (118 loc) · 3.29 KB
/
rails_best_practices_output.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta charset='UTF-8' />
<title>Output of rails_best_practices</title>
<style type="text/css">
body {
color: #333;
background: #eee;
padding: 0 20px;
}
h1 {
color: ##4E4E4E;
}
p {
margin: 5px 0;
}
table {
background: white;
border: 1px solid #666;
border-collapse: collapse;
margin: 10px 0;
font-size: 14px;
}
table.result th, table.result td {
padding: 4px;
border: 1px solid #D0D0D0;
}
table.result th {
background-color: #DFC;
color: #337022;
}
table.result td.filename {
color: #ED1556;
}
table.result tr:hover {
background-color: #FFFFC0;
}
ul {
clear: both;
display: inline-block;
padding: 0;
margin: 0;
}
ul li {
list-style: none;
display: none;
float: left;
}
.result tbody tr{
display: none;
}
</style>
</head>
<body>
<h1>rails_best_practices output</h1>
<p>
Please go to
<a href='http://rails-bestpractices.com' target='_blank'>http://rails-bestpractices.com</a>
to see more useful Rails Best Practices.
</p>
<p>
No error found. Cool!
</p>
<table>
</table>
<table class="result">
<thead>
<tr>
<th>Filename</th>
<th>Line Number</th>
<th>Warning Message</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
keys = location.hash.slice(2).split("|");
keys = keys.filter(function(item){
return item != "";
});
keys.forEach(function(item){
$('.'+item).show();
$('input.error-type#'+item+'[type=checkbox]').prop('checked', true);
});
$('input.error-type[type=checkbox]').click(function() {
if ($(this).attr('checked')) {
$(this).prop('checked', true);
$('.'+$(this).val()).show();
new_hash = location.hash.replace("|"+$(this).val().toString(), "");
location.hash = new_hash+"|"+$(this).val();
} else {
$(this).prop('checked', false);
$('.'+$(this).val()).hide();
new_hash = location.hash.replace("|"+$(this).val().toString(), "");
location.hash = new_hash
}
});
$('#show-all').click(function() {
$('input.error-type[type=checkbox]').each(function(index, item){
new_hash = location.hash.replace("|"+$(item).val().toString(), "");
location.hash = new_hash+"|"+$(item).val();
});
$('input.error-type[type=checkbox]').prop('checked', true);
$('table.result tbody tr').show();
});
$('#show-none').click(function() {
$('input.error-type[type=checkbox]').prop('checked', false);
$('table.result tbody tr').hide();
location.hash = "";
});
});
</script>
</body>
</html>