From c304ebb52b8249278b54d32efcfee86d779be48d Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 23 Feb 2015 20:25:02 +0000 Subject: [PATCH] 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 --- Open-ILS/xul/staff_client/server/admin/copy_locations.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); } -- 2.11.0