Fix characteristic naming to measurement

This commit is contained in:
Matthew Dillon 2015-12-02 10:47:07 -07:00
parent 658304f728
commit 0956ef3a25
7 changed files with 12 additions and 12 deletions

View file

@ -54,7 +54,7 @@ export default Controller.extend({
} }
}, },
addCharacteristic: function() { addMeasurement: function() {
return this.store.createRecord('measurement', { return this.store.createRecord('measurement', {
characteristic: this.store.createRecord('characteristic', { sortOrder: -999 }), characteristic: this.store.createRecord('characteristic', { sortOrder: -999 }),
}); });

View file

@ -2,7 +2,7 @@
protected/strains/strain-form protected/strains/strain-form
strain=model strain=model
speciesList=speciesList speciesList=speciesList
add-characteristic=(action "addCharacteristic") add-measurement=(action "addMeasurement")
allCharacteristics=allCharacteristics allCharacteristics=allCharacteristics
on-save=(action "save") on-save=(action "save")
on-cancel=(action "cancel") on-cancel=(action "cancel")

View file

@ -11,7 +11,7 @@ export default Component.extend({
canAdd: false, canAdd: false,
// Actions // Actions
"add-characteristic": null, "add-measurement": null,
"save-measurement": null, "save-measurement": null,
"delete-measurement": null, "delete-measurement": null,
@ -22,8 +22,8 @@ export default Component.extend({
sortedMeasurements: sort('measurements', 'sortParams'), sortedMeasurements: sort('measurements', 'sortParams'),
actions: { actions: {
addCharacteristic: function() { addMeasurement: function() {
return this.attrs['add-characteristic'](); return this.attrs['add-measurement']();
}, },
changeSortParam: function(col) { changeSortParam: function(col) {

View file

@ -1,7 +1,7 @@
{{#if canAdd}} {{#if canAdd}}
<br> <br>
<button class="button-green smaller" {{action "addCharacteristic"}}> <button class="button-green smaller" {{action "addMeasurement"}}>
Add characteristic Add measurement
</button> </button>
<br><br> <br><br>
{{/if}} {{/if}}

View file

@ -71,7 +71,7 @@
{{! ROW 5 }} {{! ROW 5 }}
<div class="grid-1 gutter-20"> <div class="grid-1 gutter-20">
<dl class="span-1"> <dl class="span-1">
<dt>Characteristics</dt> <dt>Characteristic Measurements</dt>
<dd> <dd>
{{ {{
protected/strains/measurements-table protected/strains/measurements-table

View file

@ -17,7 +17,7 @@ export default Component.extend(SetupMetaData, {
"on-save": null, "on-save": null,
"on-cancel": null, "on-cancel": null,
"on-update": null, "on-update": null,
"add-characteristic": null, "add-measurements": null,
// CPs // CPs
sortParams: ['sortOrder'], sortParams: ['sortOrder'],
@ -103,8 +103,8 @@ export default Component.extend(SetupMetaData, {
return this.attrs['on-cancel'](); return this.attrs['on-cancel']();
}, },
addCharacteristic: function() { addMeasurement: function() {
const measurement = this.attrs['add-characteristic'](); const measurement = this.attrs['add-measurement']();
this.get('measurements').pushObject(measurement); this.get('measurements').pushObject(measurement);
}, },

View file

@ -62,7 +62,7 @@
{{ {{
protected/strains/measurements-table protected/strains/measurements-table
measurements=measurements measurements=measurements
add-characteristic=(action "addCharacteristic") add-measurement=(action "addMeasurement")
allCharacteristics=sortedCharacteristics allCharacteristics=sortedCharacteristics
save-measurement=(action "saveMeasurement") save-measurement=(action "saveMeasurement")
delete-measurement=(action "deleteMeasurement") delete-measurement=(action "deleteMeasurement")