Commit 2d7aa8f2 authored by Abdulqadir Rashik's avatar Abdulqadir Rashik

Show total resolution count instead of group count

parent 29ebf560
......@@ -695,10 +695,6 @@
var formerStates = ['BYELORUSSIAN SSR','BURMA','CENTRAL AFRICAN EMPIRE','CEYLON','CONGO (BRAZZAVILLE)','CONGO (LEOPOLDVILLE)','CZECHOSLOVAKIA','DAHOMEY','DEMOCRATIC KAMPUCHEA','DEMOCRATIC YEMEN','FEDERATION OF MALAYA','GERMAN DEMOCRATIC REPUBLIC','GERMANY, FEDERAL REPUBLIC OF','KHMER REPUBLIC','SERBIA AND MONTENEGRO','SIAM','SOUTHERN YEMEN','TANGANYIKA','UKRAINIAN SSR','UPPER VOLTA','UNITED ARAB REPUBLIC','USSR','YUGOSLAVIA','ZAIRE','ZANZIBAR'];
// Populate the initial content for the left column
function showSearchInfo() {
d3.select('#search-info-results').datum({total:resolutions.length,topic:topic});
d3.select('#search-info-results').html(function(d){
return 'Found <b>' + d.total + '</b> results for "<b>' + d.topic + '</b>"'
});
// Add all states not in securityCouncil or formerStates to the general member list
var memberStates = [];
for (var i=0;i<countryLookup.length;i++) {
......@@ -727,10 +723,12 @@
var lastSession = _.max(_.map(_.keys(timelineCounts),Number));
var countScale = d3.scaleLinear().domain([0,_.max(_.values(timelineCounts))]).range([0,40]);
var sessionWidth = 530/lastSession;
var totalResolutions = 0;
for (var sessionNumber = 1; sessionNumber<=lastSession;sessionNumber++) {
var rescount = 0;
if (timelineCounts.hasOwnProperty(sessionNumber)) {
rescount = timelineCounts[sessionNumber];
totalResolutions += rescount;
}
var sessionHeight = countScale(rescount);
var x = ((sessionNumber-1)*sessionWidth) + sessionWidth/2;
......@@ -756,6 +754,10 @@
timelineSvg.append('text').text(sessionNumber+1945).attr('x',x).attr('y',65);
}
}
d3.select('#search-info-results').datum({total:totalResolutions,topic:topic});
d3.select('#search-info-results').html(function(d){
return 'Found <b>' + d.total + '</b> results for "<b>' + d.topic + '</b>"'
});
}
// Show information for the selected resolution in the left column
......@@ -778,7 +780,7 @@
var no = d3.select('#vote-record-no');
var abstain = d3.select('#vote-record-abstain');
yes.html('');no.html('');abstain.html('');
hideMapLegend()
hideMapLegend();
if (resolution.hasOwnProperty('v')) {
var voteCounts = resolution.v.split('-');
if (voteCounts.length == 3) {
......@@ -854,7 +856,6 @@
function showMapLegend() {
mapSvg.select('#map-legend').transition().duration(553).attr('transform','translate(0,235)');
}
function hideMapLegend() {
mapSvg.select('#map-legend').transition().duration(553).attr('transform','translate(0,253)');
}
......@@ -1147,7 +1148,6 @@
// Reset the scrollable height if the device orientation changes
d3.select(window).on('resize', setScrollableHeight);
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment