making sure xul is updated in all cases where possible
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 13 Sep 2006 21:47:56 +0000 (21:47 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 13 Sep 2006 21:47:56 +0000 (21:47 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6088 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/xul/staff_client/server/patron/ue.js

index 3583e6b..f5a637f 100644 (file)
@@ -474,7 +474,11 @@ function uEditSaveUser(cloneme) {
 
        var evt;
        if( (evt = checkILSEvent(newuser)) || ! newuser ) {
-               if(evt) alert(js2JSON(newuser));
+               if(evt) {
+                       var j = js2JSON(newuser); 
+                       alert(j);
+                       _debug("USER UPDATE FAILED:\n" + j);
+               }
                return;
        } 
 
@@ -511,9 +515,16 @@ function uEditSaveUser(cloneme) {
 
                uEditRefresh();
        }
+
+       uEditRefreshXUL(newuser);
 }
 
 
+function uEditRefreshXUL(newuser) {
+       if (window.xulG && typeof window.xulG.on_save == 'function') 
+               window.xulG.on_save(newuser);
+}
+
 function uEditRefresh() {
        var href = location.href;
        href = href.replace(/\&?clone=\d+/, '');