From fe53e85a90d0bfe5558af31f40b5e6e5da0b8fad Mon Sep 17 00:00:00 2001 From: tobes Date: Thu, 16 Aug 2012 15:34:04 +0100 Subject: [PATCH] [#2618] Stats uses fanstatic --- ckanext/stats/plugin.py | 1 + ckanext/stats/public/ckanext/stats/resource.config | 12 ++++++++++++ ckanext/stats/templates/ckanext/stats/index.html | 11 +---------- 3 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 ckanext/stats/public/ckanext/stats/resource.config diff --git a/ckanext/stats/plugin.py b/ckanext/stats/plugin.py index 909f0ad79fc..11caf7a42d4 100644 --- a/ckanext/stats/plugin.py +++ b/ckanext/stats/plugin.py @@ -24,3 +24,4 @@ def update_config(self, config): templates = 'templates_legacy' p.toolkit.add_template_directory(config, templates) p.toolkit.add_public_directory(config, 'public') + p.toolkit.add_resource('public/ckanext/stats', 'ckanext_stats') diff --git a/ckanext/stats/public/ckanext/stats/resource.config b/ckanext/stats/public/ckanext/stats/resource.config new file mode 100644 index 00000000000..e651a3f1b9e --- /dev/null +++ b/ckanext/stats/public/ckanext/stats/resource.config @@ -0,0 +1,12 @@ +[IE conditional] + +lte IE 8 = vendor/excanvas.js + +[groups] + +stats = + css/stats.css + vendor/excanvas.js + vendor/jquery.flot.js + javascript/modules/plot.js + javascript/modules/stats-nav.js diff --git a/ckanext/stats/templates/ckanext/stats/index.html b/ckanext/stats/templates/ckanext/stats/index.html index ae0f0a0ab47..947454034e3 100644 --- a/ckanext/stats/templates/ckanext/stats/index.html +++ b/ckanext/stats/templates/ckanext/stats/index.html @@ -1,11 +1,5 @@ {% extends "page.html" %} - -{% block styles %} - {{ super() }} - -{% endblock %} - {% block breadcrumb_content %}
  • {{ 'Statistics' }}
  • {% endblock %} @@ -195,14 +189,11 @@

    {{ _('Stat {% block scripts %} {{ super() }} - - - - {# Hellish hack to get excanvas to work in IE8. We disable html5shiv from overriding the createElement() method on this page. See: http://stackoverflow.com/questions/10208062/using-flot-with-bootstrap-ie8-incompatibility #} {% resource "vendor/block_html5_shim" %} +{% resource "ckanext_stats/stats" %} {% endblock %}