Skip to content

Commit

Permalink
Improved sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
uaoleg committed Aug 4, 2015
1 parent 9bd8d02 commit d47b509
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,13 @@
});
}
stats.lawTags.sort(function(a, b) {
return b.count[b.types[0]] / b.total - a.count[a.types[0]] / a.total;
var type;
if ($location.host().indexOf('zrada') !== -1) {
type = 'danger';
} else {
type = 'success';
}
return b.count[type] / b.total - a.count[type] / a.total;
});
}
$scope.searchStats = stats;
Expand Down

0 comments on commit d47b509

Please sign in to comment.