Skip to content

Commit 40863f4

Browse files
committed
converted list item to use error handler
1 parent bba0b2f commit 40863f4

File tree

1 file changed

+1
-16
lines changed
  • openid-connect-server-webapp/src/main/webapp/resources/js

1 file changed

+1
-16
lines changed

openid-connect-server-webapp/src/main/webapp/resources/js/admin.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -94,22 +94,7 @@ var ListWidgetChildView = Backbone.View.extend({
9494

9595
this.model.destroy({
9696
dataType: false, processData: false,
97-
error:function (error, response) {
98-
console.log("An error occurred when deleting from a list widget");
99-
100-
//Pull out the response text.
101-
var responseJson = JSON.parse(response.responseText);
102-
103-
//Display an alert with an error message
104-
$('#modalAlert div.modal-header').html(responseJson.error);
105-
$('#modalAlert div.modal-body').html(responseJson.error_description);
106-
107-
$("#modalAlert").modal({ // wire up the actual modal functionality and show the dialog
108-
"backdrop" : "static",
109-
"keyboard" : true,
110-
"show" : true // ensure the modal is shown immediately
111-
});
112-
}
97+
error:app.errorHandlerView.handleError()
11398
});
11499

115100
},

0 commit comments

Comments
 (0)