From: Bill Erickson <berick@esilibrary.com>
Date: Mon, 1 Aug 2011 18:09:23 +0000 (-0400)
Subject: Avoid xml_transform retrieval in record attr def editor
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=82fe5b97b9706ef432b4359a4153e1272b4a07de;p=evergreen%2Fmasslnc.git

Avoid xml_transform retrieval in record attr def editor

config.xml_transform stores large chunks of XML.  Fetching it angers
Ejabberd on my test system.  All we need is the name, so use the new
AutoFieldWidget.searchOptions param to do just that.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
---

diff --git a/Open-ILS/web/templates/default/conify/global/config/record_attr_definition.tt2 b/Open-ILS/web/templates/default/conify/global/config/record_attr_definition.tt2
index 627b713fb0..4af3b48265 100644
--- a/Open-ILS/web/templates/default/conify/global/config/record_attr_definition.tt2
+++ b/Open-ILS/web/templates/default/conify/global/config/record_attr_definition.tt2
@@ -24,7 +24,11 @@
 <script type ="text/javascript">
     dojo.require('openils.widget.AutoGrid');
     openils.Util.addOnLoad(
-        function() { cradGrid.loadAll({order_by : {crad : 'name'}}) }
+        function() {
+            // avoid loading the entire config.xml_transform object
+            cradGrid.overrideWidgetArgs.format = {searchOptions : {"select":{"cxt":["name"]}}};
+            cradGrid.loadAll({order_by : {crad : 'name'}}) 
+        }
     );
 </script>