do the stat cat filtering at the end of the render phase
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 26 Sep 2007 17:56:53 +0000 (17:56 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 26 Sep 2007 17:56:53 +0000 (17:56 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@7840 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/copy_editor.js

index ae4107c..f5077c2 100644 (file)
@@ -975,17 +975,6 @@ g.render = function() {
         x.appendChild(menuitem);
     }
 
-    JSAN.use('util.file'); 
-       var file = new util.file('copy_editor_prefs.'+g.data.server_unadorned);
-       g.copy_editor_prefs = util.widgets.load_attributes(file);
-    for (var i in g.copy_editor_prefs) {
-        if (i.match(/filter_/) && g.copy_editor_prefs[i].checked == '') {
-            try { 
-                g.toggle_stat_cat_display( document.getElementById(i) ); 
-            } catch(E) { alert(E); }
-        }
-    }
-
        /******************************************************************************************************/
        /* Prepare the panes */
 
@@ -1048,6 +1037,22 @@ g.render = function() {
                        }
                }
        }
+    
+    
+       /******************************************************************************************************/
+       /* Synchronize stat cat visiblity with library filter menu */
+    JSAN.use('util.file'); 
+       var file = new util.file('copy_editor_prefs.'+g.data.server_unadorned);
+       g.copy_editor_prefs = util.widgets.load_attributes(file);
+    for (var i in g.copy_editor_prefs) {
+        if (i.match(/filter_/) && g.copy_editor_prefs[i].checked == '') {
+            try { 
+                g.toggle_stat_cat_display( document.getElementById(i) ); 
+            } catch(E) { alert(E); }
+        }
+    }
+
+
 }
 
 /******************************************************************************************************/