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

View file

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