Delete measurement

This commit is contained in:
Matthew Dillon 2015-09-25 15:37:23 -07:00
parent 482bfddf12
commit 34aa59caf3
3 changed files with 10 additions and 3 deletions

View file

@ -28,5 +28,9 @@ export default Ember.Component.extend({
}
},
delete: function() {
this.get('row').destroyRecord();
}
},
});

View file

@ -17,7 +17,7 @@
{{#if canEdit}}
<td>
{{#if rowChanged}}
<button class="button-red smaller" {{action 'save'}}>
<button class="button-green smaller" {{action 'save'}}>
Save
</button>
{{else}}
@ -44,6 +44,9 @@
<button class="button-gray smaller" {{action 'edit'}}>
Edit
</button>
<button class="button-red smaller" {{action 'delete'}}>
Delete
</button>
</td>
{{/if}}
{{/if}}

View file

@ -4,8 +4,8 @@
{{#if canEdit}}
<col span="1" style="width:40%">
<col span="1" style="width:20%">
<col span="1" style="width:30%">
<col span="1" style="width:10%">
<col span="1" style="width:20%">
<col span="1" style="width:20%">
{{else}}
<col span="1" style="width:40%">
<col span="1" style="width:30%">