[open-ils-commits] r19364 - trunk/Open-ILS/web/js/ui/default/actor/user (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Feb 2 14:56:44 EST 2011


Author: phasefx
Date: 2011-02-02 14:56:39 -0500 (Wed, 02 Feb 2011)
New Revision: 19364

Modified:
   trunk/Open-ILS/web/js/ui/default/actor/user/register.js
Log:
allow deletion of stat cat entries in the patron editor (or more accurately, rows in actor.stat_cat_entry_usr_map) by blanking out the value


Modified: trunk/Open-ILS/web/js/ui/default/actor/user/register.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/actor/user/register.js	2011-02-02 19:34:36 UTC (rev 19363)
+++ trunk/Open-ILS/web/js/ui/default/actor/user/register.js	2011-02-02 19:56:39 UTC (rev 19364)
@@ -1213,8 +1213,6 @@
                 break;
 
             case 'statcat':
-                if(val == null) break;
-
                 var map = patron.stat_cat_entries().filter(
                     function(m){
                         return (m.stat_cat() == w._statcat) })[0];
@@ -1222,8 +1220,15 @@
                 if(map) {
                     if(map.stat_cat_entry() == val) 
                         break;
-                    map.ischanged(1);
+                    if(val == null) {
+                        val = '';
+                        map.isdeleted(1);
+                    } else {
+                        map.ischanged(1);
+                    }
                 } else {
+                    if(val == null)
+                        break;
                     map = new fieldmapper.actscecm();
                     map.isnew(1);
                 }



More information about the open-ils-commits mailing list