Minor measurements cleanup

This commit is contained in:
Matthew Dillon 2015-06-15 10:43:42 -08:00
parent 0d840b4586
commit 97394d337e
3 changed files with 4 additions and 5 deletions

View file

@ -3,11 +3,10 @@ import Ember from 'ember';
export default Ember.Controller.extend({ export default Ember.Controller.extend({
actions: { actions: {
search: function() { search: function() {
let search = { this.store.find('measurement', {
strain: this.get('selectedStrains'), strain: this.get('selectedStrains'),
characteristic: this.get('selectedCharacteristics'), characteristic: this.get('selectedCharacteristics'),
}; }).then((measurements)=>{
this.store.find('measurement', search).then((measurements)=>{
this.set('measurements', measurements); this.set('measurements', measurements);
}); });
} }

View file

@ -16,7 +16,7 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
{ model: 'characteristics', id: 'id', text: 'characteristicName' }, { model: 'characteristics', id: 'id', text: 'characteristicName' },
]; ];
selects.forEach((item, index, enumerable) => { selects.forEach((item /*, index, enumerable*/) => {
models[item.model] = models[item.model].sortBy(item.text); models[item.model] = models[item.model].sortBy(item.text);
let temp = models[item.model].map((data) => { let temp = models[item.model].map((data) => {
return Ember.Object.create({ return Ember.Object.create({

View file

@ -5,7 +5,7 @@
<form> <form>
<ul> <ul>
<li> <li>
<label>Species</label> <label>Strains</label>
{{ {{
select-2 select-2
multiple=true multiple=true