From 0956ef3a2552107058dc40ffea59469328f794d2 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 2 Dec 2015 10:47:07 -0700 Subject: [PATCH] Fix characteristic naming to measurement --- app/pods/protected/strains/edit/controller.js | 2 +- app/pods/protected/strains/edit/template.hbs | 2 +- app/pods/protected/strains/measurements-table/component.js | 6 +++--- app/pods/protected/strains/measurements-table/template.hbs | 4 ++-- app/pods/protected/strains/show/strain-card/template.hbs | 2 +- app/pods/protected/strains/strain-form/component.js | 6 +++--- app/pods/protected/strains/strain-form/template.hbs | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/pods/protected/strains/edit/controller.js b/app/pods/protected/strains/edit/controller.js index d8aa4d9..a9e48f3 100644 --- a/app/pods/protected/strains/edit/controller.js +++ b/app/pods/protected/strains/edit/controller.js @@ -54,7 +54,7 @@ export default Controller.extend({ } }, - addCharacteristic: function() { + addMeasurement: function() { return this.store.createRecord('measurement', { characteristic: this.store.createRecord('characteristic', { sortOrder: -999 }), }); diff --git a/app/pods/protected/strains/edit/template.hbs b/app/pods/protected/strains/edit/template.hbs index 727510c..334ad07 100644 --- a/app/pods/protected/strains/edit/template.hbs +++ b/app/pods/protected/strains/edit/template.hbs @@ -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") diff --git a/app/pods/protected/strains/measurements-table/component.js b/app/pods/protected/strains/measurements-table/component.js index f9dac39..87bf403 100644 --- a/app/pods/protected/strains/measurements-table/component.js +++ b/app/pods/protected/strains/measurements-table/component.js @@ -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) { diff --git a/app/pods/protected/strains/measurements-table/template.hbs b/app/pods/protected/strains/measurements-table/template.hbs index d2d10dd..9d648b4 100644 --- a/app/pods/protected/strains/measurements-table/template.hbs +++ b/app/pods/protected/strains/measurements-table/template.hbs @@ -1,7 +1,7 @@ {{#if canAdd}}
-

{{/if}} diff --git a/app/pods/protected/strains/show/strain-card/template.hbs b/app/pods/protected/strains/show/strain-card/template.hbs index 968e89d..4629f23 100644 --- a/app/pods/protected/strains/show/strain-card/template.hbs +++ b/app/pods/protected/strains/show/strain-card/template.hbs @@ -71,7 +71,7 @@ {{! ROW 5 }}
-
Characteristics
+
Characteristic Measurements
{{ protected/strains/measurements-table diff --git a/app/pods/protected/strains/strain-form/component.js b/app/pods/protected/strains/strain-form/component.js index f761a04..5a91dfc 100644 --- a/app/pods/protected/strains/strain-form/component.js +++ b/app/pods/protected/strains/strain-form/component.js @@ -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); }, diff --git a/app/pods/protected/strains/strain-form/template.hbs b/app/pods/protected/strains/strain-form/template.hbs index 2ed0b5f..99b729c 100644 --- a/app/pods/protected/strains/strain-form/template.hbs +++ b/app/pods/protected/strains/strain-form/template.hbs @@ -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")