diff --git a/web/js/definitions.js b/web/js/definitions.js index ad2a907..cdaf68c 100644 --- a/web/js/definitions.js +++ b/web/js/definitions.js @@ -63,16 +63,16 @@ function loadYears() { for (i = 0; i < data.result.total; i++) { var year = data.result.records[i]; year = year['Year']; - if (year === 'No year given') { - var ckanyear = ''; - var year = year; + if (year === '.') { + var ckanyear = year; + var year = "No year given"; } else { var ckanyear = year; year = year.substring(0, year.length -2); } if (!(year in years)) { years[year] = ckanyear; } - } + } $('body').data('years', years); } }); @@ -86,13 +86,13 @@ function loadYearsArray() { $.each(years, function( k, v ) { out.push(k); }); - return out.sort(); + return out.sort(); } function buildYearSelect() { var ckanyears = loadYears(); var years = loadYearsArray(); var noyear = years.pop(); - var options = ''; + var options = ''; $.each(years, function(k, year) { options += ''; }); @@ -481,79 +481,6 @@ function buildDeepLink() { return link; } -// function wordCloud() { -// var words = loadTermsArray(); -// var fill = d3.scale.category20(); -// d3.layout.cloud().size([960, 400]) -// .words(words.map(function(d) { -// return {text: d, size: d.size}; -// })) -// .padding(3) -// .rotate(function() { return ~~(Math.random() * 2) * 90; }) -// .font("Impact") -// .fontSize(function(d) { return d.size; }) -// .on("end", draw) -// .start(); -// function draw(words) { -// d3.select("div#word-cloud").append("svg") -// .attr("width", 960) -// .attr("height", 400) -// .append("g") -// .attr("transform", "translate(150,150)") -// .selectAll("text") -// .data(words) -// .enter().append("text") -// .style("font-size", function(d) { return d.size + "px"; }) -// .style("font-family", "Impact") -// .style("fill", function(d, i) { return fill(i); }) -// .attr("text-anchor", "middle") -// .attr("transform", function(d) { -// return "translate(" + [d.x, d.y] + ")rotate(" + d.rotate + ")"; -// }) -// .text(function(d) { return d.text; }); -// } -// $('div#word-cloud text').click(function() { -// firequery($(this)[0].innerHTML, 'filters', 'all'); -// }); -// } - -// function map() { -// var width = 960, -// height = 500; - -// var projection = d3.geo.kavrayskiy7(), -// color = d3.scale.category20(), -// graticule = d3.geo.graticule(); - -// var path = d3.geo.path() -// .projection(projection); - -// var svg = d3.select("#map").append("svg") -// .attr("width", width) -// .attr("height", height); - -// svg.append("path") -// .datum(graticule) -// .attr("class", "graticule") -// .attr("d", path); - -// svg.append("path") -// .datum(graticule.outline) -// .attr("class", "graticule outline") -// .attr("d", path); - -// d3.json("map/world-50m.json", function(error, world) { -// var countries = topojson.feature(world, world.objects.countries).features; - - -// svg.selectAll(".country") -// .data(countries) -// .enter().insert("path", ".graticule") -// .attr("class", "country") -// .attr("d", path) -// // .style("fill", function(d, i) { return color(d.color = d3.max(neighbors[i], function(n) { return countries[n].color; }) + 1 | 0); }); -// }); -// } function definitionTabs() { $('ul#term-tabs').each(function(){ diff --git a/web/search.html b/web/search.html index dfff960..b596204 100644 --- a/web/search.html +++ b/web/search.html @@ -132,10 +132,6 @@ - - - - @@ -176,10 +172,8 @@

Advanced Filters:

- - - +