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', {
characteristic: this.store.createRecord('characteristic', { sortOrder: -999 }),
});

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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