Client delete now requires confirmation
parent
6c8aeba041
commit
bd054bfd58
|
@ -114,19 +114,22 @@
|
||||||
|
|
||||||
deleteClient:function () {
|
deleteClient:function () {
|
||||||
|
|
||||||
var self = this;
|
if (confirm("Are you sure sure you would like to delete this client?")) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
this.model.destroy({
|
this.model.destroy({
|
||||||
success:function () {
|
success:function () {
|
||||||
self.$el.fadeTo("fast", 0.00, function(){ //fade
|
self.$el.fadeTo("fast", 0.00, function () { //fade
|
||||||
$(this).slideUp("fast", function() { //slide up
|
$(this).slideUp("fast", function () { //slide up
|
||||||
$(this).remove(); //then remove from the DOM
|
$(this).remove(); //then remove from the DOM
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
|
app.clientListView.delegateEvents();
|
||||||
|
}
|
||||||
|
|
||||||
app.clientListView.delegateEvents();
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue