Avoid xml_transform retrieval in record attr def editor
authorBill Erickson <berick@esilibrary.com>
Mon, 1 Aug 2011 18:09:23 +0000 (14:09 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 2 Aug 2011 15:27:50 +0000 (11:27 -0400)
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>
Open-ILS/web/templates/default/conify/global/config/record_attr_definition.tt2

index 627b713..4af3b48 100644 (file)
 <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>