From f1d10589809e2dec52cff53e0fa3bddbf07587b3 Mon Sep 17 00:00:00 2001 From: Joseph Lewis Date: Wed, 15 Jun 2011 11:46:33 -0600 Subject: [PATCH] Got rid of old bug (pre me) that existed when an autowidget was used then canceled and the next setting wasn't an autowidget. The autowidget would continue to appear because it was never destroyed. Signed-off-by: Joseph Lewis --- Open-ILS/xul/staff_client/server/admin/org_unit_settings.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js b/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js index 102cfae2ed..6c979acbcd 100644 --- a/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js +++ b/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js @@ -359,6 +359,12 @@ function osLaunchEditor(name) { var fmClass = osSettings[name].fm_class; + if(osEditAutoWidget) { + osEditAutoWidget.domNode.parentNode.removeChild(osEditAutoWidget.domNode); + osEditAutoWidget.destroy(); + osEditAutoWidget = null; + } + if(fmClass) { if(osEditAutoWidget) { -- 2.11.0