From: Galen Charlton Date: Mon, 23 Feb 2015 20:25:02 +0000 (+0000) Subject: LP#1154579: explicitly alert if copy location failed to be deleted X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c72db4c594c6086885cfc3913dce3846b62f9287;p=contrib%2FConifer.git LP#1154579: explicitly alert if copy location failed to be deleted This patch adds an alert if the act of deleting a copy location in the staff interface fails -- which would most commonly happen if there are still active items attached to the location to be deleted. Signed-off-by: Galen Charlton Signed-off-by: Ben Shum --- diff --git a/Open-ILS/xul/staff_client/server/admin/copy_locations.js b/Open-ILS/xul/staff_client/server/admin/copy_locations.js index 6ce174fbb1..da25abc47e 100644 --- a/Open-ILS/xul/staff_client/server/admin/copy_locations.js +++ b/Open-ILS/xul/staff_client/server/admin/copy_locations.js @@ -288,7 +288,10 @@ function clDelete( cl, tbody, row ) { var req = new Request( DELETE_CL, SESSION, cl.id() ); req.send(true); var res = req.result(); - if(checkILSEvent(res)) throw res; + if (checkILSEvent(res)) { + alertILSEvent(res); + return; + } alertId('cl_update_success'); clGo(); }