Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move libs for dashboard in lib folder and correct import urls

  • Loading branch information...
commit a4b97ebea082f66d8421f373e83265bd5edc4520 1 parent 41d21a5
@jarus jarus authored
View
12 krprj/worshipmap/static/js/jquery.peity.min.js
@@ -1,12 +0,0 @@
-// Peity jQuery plugin version 1.1.1
-// (c) 2013 Ben Pickles
-//
-// http://benpickles.github.com/peity
-//
-// Released under MIT license.
-(function(h,i,l,m){var q=i.createElement("canvas").getContext,j=h.fn.peity=function(a,b){q&&this.each(function(){var c=h(this),d=c.data("peity");if(d)d.type=a,h.extend(d.opts,b),d.draw();else{var f=j.defaults[a],e={};h.each(c.data(),function(a,b){a in f&&(e[a]=b)});var o=h.extend({},f,e,b),d=new p(c,a,o);d.draw();c.change(function(){d.draw()}).data("peity",d)}});return this},p=function(a,b,c){this.$el=a;this.type=b;this.opts=c},i=p.prototype;i.colours=function(){var a=this.opts.colours,b=a;h.isFunction(b)||
-(b=function(b,d){return a[d%a.length]});return b};i.draw=function(){j.graphers[this.type].call(this,this.opts)};i.prepareCanvas=function(a,b){var c=this.canvas;c?this.context.clearRect(0,0,c.width,c.height):(c=h("<canvas>").attr({height:b*m,width:a*m}).data("peity",this),1!=m&&c.css({height:b,width:a}),this.canvas=c=c[0],this.context=c.getContext("2d"),this.$el.hide().before(c));return c};i.values=function(){return h.map(this.$el.text().split(this.opts.delimiter),function(a){return parseFloat(a)})};
-j.defaults={};j.graphers={};j.register=function(a,b,c){this.defaults[a]=b;this.graphers[a]=c};j.register("pie",{colours:["#ff9900","#fff4dd","#ffc66e"],delimiter:null,diameter:16},function(a){if(!a.delimiter){var b=this.$el.text().match(/[^0-9\.]/);a.delimiter=b?b[0]:","}b=this.values();if("/"==a.delimiter)var c=b[0],b=[c,b[1]-c];for(var d=0,c=b.length,f=0;d<c;d++)f+=b[d];var d=this.prepareCanvas(a.diameter,a.diameter),a=this.context,e=d.width/2,o=l.PI,h=this.colours();a.save();a.translate(e,e);a.rotate(-o/
-2);for(d=0;d<c;d++){var k=b[d],g=2*k/f*o;a.beginPath();a.moveTo(0,0);a.arc(0,0,e,0,g,!1);a.fillStyle=h.call(this,k,d,b);a.fill();a.rotate(g)}a.restore()});j.register("line",{colour:"#c6d9fd",strokeColour:"#4d89f9",strokeWidth:1,delimiter:",",height:16,max:null,min:0,width:32},function(a){var b=this.values();1==b.length&&b.push(b[0]);var c=l.max.apply(l,b.concat([a.max])),d=l.min.apply(l,b.concat([a.min])),f=this.prepareCanvas(a.width,a.height),e=this.context,h=f.width,f=f.height,j=h/(b.length-1),
-c=f/(c-d),k=[],g;e.beginPath();e.moveTo(0,f+d*c);for(g=0;g<b.length;g++){var i=g*j,n=f-c*(b[g]-d);k.push({x:i,y:n});e.lineTo(i,n)}e.lineTo(h,f+d*c);e.fillStyle=a.colour;e.fill();if(a.strokeWidth){e.beginPath();e.moveTo(0,k[0].y);for(g=0;g<k.length;g++)e.lineTo(k[g].x,k[g].y);e.lineWidth=a.strokeWidth*m;e.strokeStyle=a.strokeColour;e.stroke()}});j.register("bar",{colours:["#4D89F9"],delimiter:",",height:16,max:null,min:0,spacing:m,width:32},function(a){for(var b=this.values(),c=l.max.apply(l,b.concat([a.max])),
-d=l.min.apply(l,b.concat([a.min])),f=this.prepareCanvas(a.width,a.height),e=this.context,h=f.height,j=h/(c-d),a=a.spacing,f=(f.width+a)/b.length,k=this.colours(),g=0;g<b.length;g++){var i=b[g],n=h-j*(i-d),m;if(0==i){if(0<=d||0<c)n-=1;m=1}else m=j*b[g];e.fillStyle=k.call(this,i,g,b);e.fillRect(g*f,n,f-a,m)}})})(jQuery,document,Math,devicePixelRatio||1);
View
0  krprj/worshipmap/static/css/style.css → .../worshipmap/static/lib/kirchenreich/dashboard.css
File renamed without changes
View
0  krprj/worshipmap/static/js/dashboard.js → ...j/worshipmap/static/lib/kirchenreich/dashboard.js
File renamed without changes
View
0  krprj/worshipmap/static/raphael/g.pie-min.js → krprj/worshipmap/static/lib/raphael/g.pie-min.js
File renamed without changes
View
0  krprj/worshipmap/static/raphael/g.raphael-min.js → krprj/worshipmap/static/lib/raphael/g.raphael-min.js
File renamed without changes
View
0  krprj/worshipmap/static/raphael/raphael-min.js → krprj/worshipmap/static/lib/raphael/raphael-min.js
File renamed without changes
View
14 krprj/worshipmap/templates/dashboard.html
@@ -2,17 +2,17 @@
{% load humanize %}
-{% block load_css %}
+{% block css %}
{{ block.super }}
-<link href="{{ STATIC_URL }}css/style.css" rel="stylesheet">
+<link href="{{ STATIC_URL }}lib/kirchenreich/dashboard.css" rel="stylesheet">
{% endblock %}
-{% block load_js %}
+{% block js %}
{{ block.super }}
-<script type="text/javascript" src="{{ STATIC_URL }}raphael/raphael-min.js"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}raphael/g.raphael-min.js"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}raphael/g.pie-min.js"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}js/dashboard.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}lib/raphael/raphael-min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}lib/raphael/g.raphael-min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}lib/raphael/g.pie-min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}lib/kirchenreich/dashboard.js"></script>
<script>
kr.plot.pie('kirchenreich_data_source', 80, 'right', [{{ osm_count }}, {{ wikipedia_count }}], ['OSM', 'Wikipedia']);
kr.plot.pie('osm_ratio_plot', 80, 'left', [{{ osm_type.W }}, {{ osm_type.N }}], ['Ways', 'Nodes']);
Please sign in to comment.
Something went wrong with that request. Please try again.