Got rid of old bug (pre me) that existed when an autowidget was used then
authorJoseph Lewis <joehms22@gmail.com>
Wed, 15 Jun 2011 17:46:33 +0000 (11:46 -0600)
committerJason Etheridge <jason@esilibrary.com>
Thu, 15 Sep 2011 16:17:42 +0000 (12:17 -0400)
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 <joehms22@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/xul/staff_client/server/admin/org_unit_settings.js

index 9f72069..1559c1c 100644 (file)
@@ -379,6 +379,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) {