Permalink
Browse files

Changed: results rendering to inject rather than append into groups

  • Loading branch information...
1 parent 6e83da5 commit 17126ffd08602d22a58017ae33e617146b1c200c @steamedbuninvasion committed Sep 16, 2011
Showing with 15 additions and 4 deletions.
  1. +15 −4 client/javascripts/source/picky.results_renderer.js
@@ -122,11 +122,22 @@ var PickyResultsRenderer = function(addination, config) {
//
this.render = function(data) {
var results = $('#picky div.results'); // TODO Extract, also from view.
+ var container = $("div.header span.explanation:contains('users working for m*')");
+
data.allocations.each(function(i, allocation) {
- results.append(renderHeader(data, allocation)) // TODO header.render(data);
- .append(allocation.entries.join(''))
- .append(addination.render(data));
- results.children('li').wrapAll(allocationWrapper);
+ // hard coded for now...
+ if(container.length > 0) {
+ container.append(allocation.entries.join(''))
+ .append(addination.render(data));
+ results.children('li').wrapAll(allocationWrapper);
+ } else {
+ results.append(renderHeader(data, allocation)) // TODO header.render(data);
+ .append(allocation.entries.join(''))
+ .append(addination.render(data));
+ results.children('li').wrapAll(allocationWrapper);
+ }
+
+
});
};
};

0 comments on commit 17126ff

Please sign in to comment.