Skip to content

Commit 17521a7

Browse files
committed
Rename extra_body into extra_script
1 parent 079824c commit 17521a7

File tree

5 files changed

+9
-14
lines changed

5 files changed

+9
-14
lines changed

codespeed/templates/codespeed/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ <h2>{% block page_title %}SPEED CENTER{% endblock page_title %}</h2>
5151

5252
<script type="text/javascript" src="{% static 'js/jquery-1.12.3.min.js' %}"></script>
5353
<script type="text/javascript" src="{% static 'js/codespeed.js' %}"></script>
54-
{% block extra_body %}{% endblock %}
54+
{% block extra_script %}{% endblock %}
5555
</body>
5656
</html>

codespeed/templates/codespeed/changes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
</div>
6666
{% endblock %}
6767

68-
{% block extra_body %}
68+
{% block extra_script %}
6969
{{ block.super }}
7070
<script type="text/javascript" src="{% static 'js/jquery.tablesorter.min.js' %}"></script>
7171
<script type="text/javascript" src="{% static 'js/changes.js' %}"></script>

codespeed/templates/codespeed/comparison.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
</div>
8181
{% endblock %}
8282

83-
{% block extra_body %}
83+
{% block extra_script %}
8484
{{ block.super }}
8585
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="{% static 'js/jqplot/excanvas.min.js' %}"></script><![endif]-->
8686
<script type="text/javascript" src="{% static 'js/jqplot/jquery.jqplot.min.js' %}"></script>

codespeed/templates/codespeed/timeline.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
</div>
107107
{% endblock %}
108108

109-
{% block extra_body %}
109+
{% block extra_script %}
110110
{{ block.super }}
111111
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="{% static 'js/jqplot/excanvas.min.js' %}"></script><![endif]-->
112112
<script type="text/javascript" src="{% static 'js/jquery.address-1.6.min.js' %}?autoUpdate=0"></script>

sample_project/templates/home.html

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,14 @@ <h2>Comparison</h2>
2828
</div>
2929
{% endblock body %}
3030

31-
{% block extra_body %}
31+
{% block extra_script %}
3232
{{ block.super }}
3333
<script type="text/javascript">
34-
function permalinkToChanges(permalink) {
35-
window.location=permalink;
36-
}
37-
38-
function updateTable() {
34+
function updateReportTables() {
3935
//Add permalink events to table rows
4036
$("div#reports table tbody tr").each(function() {
4137
$(this).click(function () {
42-
permalink_string = $(this).find("td:eq(0) label").text();
43-
permalinkToChanges(permalink_string);
38+
window.location = $(this).find("td:eq(0) label").text();
4439
});
4540
});
4641
//Add hover effect to rows
@@ -53,7 +48,7 @@ <h2>Comparison</h2>
5348

5449
$(function() {
5550
$("#reports").html(getLoadText("Loading...", 0))
56-
.load("{% url "reports" %}", function(responseText) { updateTable(); });
57-
});
51+
.load("{% url "reports" %}", function(responseText) { updateReportTables(); });
52+
});
5853
</script>
5954
{% endblock %}

0 commit comments

Comments
 (0)