diff options
author | Dan McGee <dan@archlinux.org> | 2010-07-25 16:14:50 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-07-25 16:14:50 -0500 |
commit | 97a262e8ee76a5647cf7cc31e61c4f846e0ff9aa (patch) | |
tree | 69a0fc4c02a9cad66140afeadc0c9e1637562d31 | |
parent | 5e58ad921ecbab1411695b70536dc98d4a24d06a (diff) |
Fix up click events on developer dashboardrelease_2010-07-25
Rather than using 'onclick', attach an event at the end of page load.
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | templates/devel/index.html | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/templates/devel/index.html b/templates/devel/index.html index 7ed66bbb..02dd369c 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -1,10 +1,6 @@ {% extends "base.html" %} {% block title %}Arch Linux - Developer Dashboard{% endblock %} -{% block head %} -{% load cdn %}{% jquery %} -{% endblock %} - {% block content %} <div id="dev-dashboard" class="box"> @@ -103,7 +99,7 @@ <div id="dash-by-arch" class="dash-stats box"> <h3 class="dash-stats" style="cursor: pointer" - title="Click to toggle stats by architecture" onclick="$(this).next().toggle();"> + title="Click to toggle stats by architecture"> Stats by Architecture <span class="dash-click">(click to toggle)</span></h3> <table id="stats-by-arch" class="results dash-stats"> @@ -134,7 +130,7 @@ <div id="dash-by-repo" class="dash-stats box"> <h3 class="dashboard dash-stats" style="cursor: pointer" - title="Click to toggle stats by repository" onclick="$(this).next().toggle();"> + title="Click to toggle stats by repository"> Stats by Repository <span class="dash-click">(click to toggle)</span></h3> <table id="stats-by-repo" class="results dash-stats"> @@ -165,7 +161,7 @@ <div id="dash-by-maintainer" class="dash-stats box"> <h3 class="dashboard dash-stats" style="cursor: pointer" - title="Click to toggle stats by maintainer" onclick="$(this).next().toggle();"> + title="Click to toggle stats by maintainer"> Stats by Maintainer <span class="dash-click">(click to toggle)</span></h3> <table id="stats-by-maintainer" class="results dash-stats"> @@ -192,4 +188,12 @@ </table> </div><!-- #dash-by-maintainer --> +{% load cdn %}{% jquery %} +<script type="text/javascript"> + $("h3.dash-stats").click( + function(e) { + $(this).next().toggle(); + } + ); +</script> {% endblock %} |