diff options
author | Aslak Knutsen <aslak@redhat.com> | 2013-03-05 02:09:16 +0100 |
---|---|---|
committer | Aslak Knutsen <aslak@redhat.com> | 2013-03-05 10:24:03 +0100 |
commit | 331ea452fa1186e096e3a905b2b729a599d07b42 (patch) | |
tree | a8359f49cb8df027656067d1b67b522b13a1871a /hyperkitty/templates | |
parent | 2df6a3857a9d75588a2242ae19d83b3355ad4bcc (diff) | |
download | hyperkitty-331ea452fa1186e096e3a905b2b729a599d07b42.tar.gz hyperkitty-331ea452fa1186e096e3a905b2b729a599d07b42.tar.xz hyperkitty-331ea452fa1186e096e3a905b2b729a599d07b42.zip |
Change Activity Graph from Protovis to d3 (#43)
Fixes failing javascipt in Opera and Chrome resulting
in no graph and no other javascript features.
Changed to precalculate all days in the begin_date...end_date
date range before matching email counts to ensure we have data
points for all days in the range.
Diffstat (limited to 'hyperkitty/templates')
-rw-r--r-- | hyperkitty/templates/base.html | 2 | ||||
-rw-r--r-- | hyperkitty/templates/recent_activities.html | 24 |
2 files changed, 16 insertions, 10 deletions
diff --git a/hyperkitty/templates/base.html b/hyperkitty/templates/base.html index c564468..1c5f544 100644 --- a/hyperkitty/templates/base.html +++ b/hyperkitty/templates/base.html @@ -73,7 +73,7 @@ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="{{ STATIC_URL }}libs/jquery/jquery-1.8.3.min.js"><\/script>')</script> <script src="{{ STATIC_URL }}libs/jquery/jquery-ui-1.10.0.custom.min.js"></script> - {% assets filters="rjsmin", output="gen/hyperkitty.js", "libs/bootstrap/bootstrap.min.js", "libs/jquery.expander.js", "libs/protovis-d3.1.js", "js/hyperkitty.js" %} + {% assets filters="rjsmin", output="gen/hyperkitty.js", "libs/bootstrap/bootstrap.min.js", "libs/jquery.expander.js", "libs/d3.v2.min.js", "js/hyperkitty.js" %} <script src="{{ ASSET_URL }}"></script> {% endassets %} {% block additionaljs %} {% endblock %} diff --git a/hyperkitty/templates/recent_activities.html b/hyperkitty/templates/recent_activities.html index 172b992..233067c 100644 --- a/hyperkitty/templates/recent_activities.html +++ b/hyperkitty/templates/recent_activities.html @@ -19,15 +19,7 @@ <section id="graph"> <h2>Activities on the list over the last 30 days</h2> - <div id="fig"> - <script type="text/javascript+protovis" > - activity_graph( - ["{{days|join:'","'}}"], - {{evolution}}, - "{{ archives_baseurl }}" - ); - </script> - </div> + <div id="fig" /> </section> <div class="row-fluid"> @@ -112,5 +104,19 @@ {% endblock %} +{% block additionaljs %} + +<script type="text/javascript" > + $(function() { + activity_graph( + "#fig", + ["{{days|join:'","'}}"], + {{evolution}}, + "{{ archives_baseurl }}" + ) + }); +</script> + +{% endblock %} {# vim: set noet: #} |