From 40863f4696527102c9b91dbd7636b603a01ca0ad Mon Sep 17 00:00:00 2001 From: Justin Richer Date: Mon, 18 Jul 2016 16:03:38 -0400 Subject: [PATCH] converted list item to use error handler --- .../src/main/webapp/resources/js/admin.js | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/openid-connect-server-webapp/src/main/webapp/resources/js/admin.js b/openid-connect-server-webapp/src/main/webapp/resources/js/admin.js index f00341b13..48e7e09de 100644 --- a/openid-connect-server-webapp/src/main/webapp/resources/js/admin.js +++ b/openid-connect-server-webapp/src/main/webapp/resources/js/admin.js @@ -94,22 +94,7 @@ var ListWidgetChildView = Backbone.View.extend({ this.model.destroy({ dataType: false, processData: false, - error:function (error, response) { - console.log("An error occurred when deleting from a list widget"); - - //Pull out the response text. - var responseJson = JSON.parse(response.responseText); - - //Display an alert with an error message - $('#modalAlert div.modal-header').html(responseJson.error); - $('#modalAlert div.modal-body').html(responseJson.error_description); - - $("#modalAlert").modal({ // wire up the actual modal functionality and show the dialog - "backdrop" : "static", - "keyboard" : true, - "show" : true // ensure the modal is shown immediately - }); - } + error:app.errorHandlerView.handleError() }); },