Client delete now requires confirmation

pull/105/merge
Michael Jett 2012-05-22 12:28:48 -04:00
parent 6c8aeba041
commit bd054bfd58
1 changed files with 13 additions and 10 deletions

View File

@ -114,19 +114,22 @@
deleteClient:function () {
var self = this;
if (confirm("Are you sure sure you would like to delete this client?")) {
var self = this;
this.model.destroy({
success:function () {
self.$el.fadeTo("fast", 0.00, function(){ //fade
$(this).slideUp("fast", function() { //slide up
$(this).remove(); //then remove from the DOM
this.model.destroy({
success:function () {
self.$el.fadeTo("fast", 0.00, function () { //fade
$(this).slideUp("fast", function () { //slide up
$(this).remove(); //then remove from the DOM
});
});
});
}
});
}
});
app.clientListView.delegateEvents();
}
app.clientListView.delegateEvents();
return false;
},