diff options
author | Dan McGee <dan@archlinux.org> | 2013-04-21 20:37:44 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2013-04-21 20:37:44 -0500 |
commit | a8203a0a17fbd8680f96c9357c7fba5923960e34 (patch) | |
tree | e9f25214cde553a613c24644c1ec99ccf08e80f0 | |
parent | 66412aa1037befef0b579c7df73656dc3b8b9804 (diff) |
Load developer dashboard stats via $.load() call
This completes the separation started in an earlier commit.
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | templates/devel/index.html | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/templates/devel/index.html b/templates/devel/index.html index 232a9034..03e5d73a 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -175,6 +175,7 @@ package in any repository</li> </ul> </div>{# #dev-dashboard #} + <div id='stats-area'> <p>Enable Javascript to get more useful info here.</p> </div> @@ -185,6 +186,19 @@ <script type="text/javascript" src="{% static "archweb.js" %}"></script> <script type="text/javascript"> $(document).ready(function() { + $("#stats-area").html('<p>Loading stats…</p>'); + $("#stats-area").load('stats/', function() { + var settings = { + widgets: ['zebra'], + sortList: [[0,0]], + headers: { 1: { sorter: 'pkgcount' }, 2: { sorter: 'pkgcount' }, 3: { sorter: 'pkgcount' } } + }; + + $(".dash-stats").not($("#stats-by-maintainer")).tablesorter(settings); + settings['sortLocaleCompare'] = true; + $("#stats-by-maintainer").tablesorter(settings); + }); + $("#dash-myflagged:not(:has(tbody tr.empty))").tablesorter( {widgets: ['zebra'], sortList: [[0,0]]}); $("#dash-mytodolist:not(:has(tbody tr.empty))").tablesorter( @@ -196,14 +210,6 @@ $(document).ready(function() { sortList: [[0,0]], headers: { 6: {sorter: false } } }); - var settings = { - widgets: ['zebra'], - sortList: [[0,0]], - headers: { 1: { sorter: 'pkgcount' }, 2: { sorter: 'pkgcount' }, 3: { sorter: 'pkgcount' } } - }; - $(".dash-stats").not($("#stats-by-maintainer")).tablesorter(settings); - settings['sortLocaleCompare'] = true; - $("#stats-by-maintainer").tablesorter(settings); }); </script> {% endblock %} |