repaired the disable widget logic
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 6 Apr 2009 13:15:39 +0000 (13:15 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 6 Apr 2009 13:15:39 +0000 (13:15 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12795 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/ui/default/conify/global/config/standing_penalty.js

index 172bb09..b560da7 100644 (file)
@@ -9,12 +9,11 @@ dojo.require('openils.widget.AutoGrid');
 
 function spBuildGrid() {
     spGrid.disableWidgetTest = function(field, obj) {
-        if(field == 'name') return true;
-        if(obj.id() > 100) return false;       
+        if(obj && obj.id() < 100 && field == 'name')
+            return true;
         return false;
     }
- spGrid.loadAll({order_by:{csp : 'name'}});
-   
+    spGrid.loadAll({order_by:{csp : 'name'}});
 }
 
 function formatId(inDatum) {
@@ -22,7 +21,6 @@ function formatId(inDatum) {
         return "<span style='color:red;'>"+ inDatum +"</span>";
     }
     return inDatum;
-        
 }
 
 openils.Util.addOnLoad(spBuildGrid);