Commit e1767cb1 authored by Christopher S Barnett's avatar Christopher S Barnett
Browse files

-updated to show number of results.

-updated to sort country list by number of deals (reverse)
parent 713ea34c
......@@ -202,8 +202,6 @@ div#splash-screen h1 {
}
.selection-label {
text-align: right;
padding-right: 0;
}
.selection-type {
......@@ -230,8 +228,17 @@ div#splash-screen h1 {
width: 100%;
}
.instructions .selection {
.result-row {
padding-top: .25em;
}
.result-row .selection {
color: #eeeeee;
white-space: nowrap;
}
.result-row .result-counter {
white-space: nowrap;
}
.case-name-wrapper {
......
This diff is collapsed.
......@@ -129,13 +129,18 @@
</div>
<div class="deals details-parent">
<div class="row instructions">
<div class="col-md-5">explore <span id="by-deal"
class="selection-type selected">by deal</span> |
<div class="col-md-12">explore <span id="by-deal"
class="selection-type selected">by deal</span> |
<span id="by-country" class="selection-type">by country</span>
</div>
</div>
<div class="row result-row">
<div class="col-md-2 selection-label">selected:</div>
<div class="col-md-5 selection"></div>
<div class="col-md-8 selection"></div>
<div class="col-md-2 result-counter">0 cases</div>
</div>
<div class="details">
</div>
......
......@@ -303,7 +303,21 @@ ConnectionMap = function () {
} else if (selType === 'by-deal') {
filtered = _.where(self.deals, {'deal_name': selValue});
}
// TODO: sort by 'sort_date'
//filtered = _.sortBy(filtered, )
self.filtered_deals = filtered;
self.setCounter(filtered.length);
},
setCounter: function (count) {
var text = ' deal';
if (count !== 1) {
text += 's';
}
$('.result-counter').text(count + text);
},
/**
......@@ -658,7 +672,7 @@ ConnectionMap = function () {
}
});
});
self.country_list = _.sortBy(self.country_list, 'name');
self.country_list = _.sortBy(self.country_list, 'cases').reverse();
this.sources = _.uniq(sources);
this.targets = _.uniq(targets);
this.mixed = _.intersection(this.sources, this.targets);
......
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