parent
031a83808c
commit
20a6707144
2 changed files with 10 additions and 3 deletions
|
@ -2,10 +2,13 @@ import Ember from 'ember';
|
|||
|
||||
export default Ember.Component.extend({
|
||||
tagName: 'button',
|
||||
classNames: ["button-red", "smaller"],
|
||||
classNames: ["button-red", "smaller", "delete"],
|
||||
showConfirmDelete: false,
|
||||
|
||||
click: function() {
|
||||
if (window.confirm("Do you really want to delete this?")) {
|
||||
if (!this.get('showConfirmDelete')) {
|
||||
this.set('showConfirmDelete', true);
|
||||
} else {
|
||||
this.attrs.delete();
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
{{#if showConfirmDelete}}
|
||||
Are you sure?
|
||||
{{else}}
|
||||
Delete
|
||||
{{/if}}
|
||||
|
|
Reference in a new issue