From 82fe5b97b9706ef432b4359a4153e1272b4a07de Mon Sep 17 00:00:00 2001
From: Bill Erickson <berick@esilibrary.com>
Date: Mon, 1 Aug 2011 14:09:23 -0400
Subject: [PATCH] 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>
---
 .../default/conify/global/config/record_attr_definition.tt2         | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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>
 
-- 
2.11.0