From bd054bfd58b8fb452350182519da5d66a5094a1c Mon Sep 17 00:00:00 2001 From: Michael Jett Date: Tue, 22 May 2012 12:28:48 -0400 Subject: [PATCH] Client delete now requires confirmation --- .../src/main/webapp/resources/js/app.js | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/openid-connect-server/src/main/webapp/resources/js/app.js b/openid-connect-server/src/main/webapp/resources/js/app.js index b904b7ea8..5fc5578ce 100644 --- a/openid-connect-server/src/main/webapp/resources/js/app.js +++ b/openid-connect-server/src/main/webapp/resources/js/app.js @@ -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; },