[open-ils-commits] [GIT] Evergreen ILS branch master updated. 55fd9d8a56953bd921f92b0b2a425a87306c943f

Evergreen Git git at git.evergreen-ils.org
Tue Aug 2 11:28:28 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  55fd9d8a56953bd921f92b0b2a425a87306c943f (commit)
       via  82fe5b97b9706ef432b4359a4153e1272b4a07de (commit)
       via  6fa60db796c979fe381bf20ea678d6338c4ad22b (commit)
      from  9945c9469c7589a1d468e9b2e2bb6850c2983e2f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 55fd9d8a56953bd921f92b0b2a425a87306c943f
Merge: 9945c94 82fe5b9
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Tue Aug 2 11:28:01 2011 -0400

    Merge branch 'rec_attr_def_config_avoid_cxt_fetch'


commit 82fe5b97b9706ef432b4359a4153e1272b4a07de
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 1 14:09:23 2011 -0400

    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 at esilibrary.com>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at 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 627b713..4af3b48 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>
 

commit 6fa60db796c979fe381bf20ea678d6338c4ad22b
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 1 14:04:24 2011 -0400

    AutoFieldWidget support for augmenting pcrud search options
    
    Adds a new searchOptions attribute to AutoFieldWidget for specifying
    additional parameters to pcrud when retrieving linked objects.  The
    initial use case is for supporting a "select" list to allow
    AutoFieldWidget to retrieve only the display column of a linked object
    and not the whole object.
    
    Example:
    
     // fetch 'remote_field_name' on the remote objects instead of
     // fetching the entire object
    
     myGrid.overrideWidgetArgs.some_field = {searchOptions :
     {"select":{"some_hint":["remote_field_name"]}}};
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
index e171f30..858ae70 100644
--- a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
+++ b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
@@ -534,14 +534,15 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) {
                         oncomplete(openils.Util.readResponse(r, false, true));
                     };
 
+                    this.searchOptions = dojo.mixin(
+                        {async : !this.forceSync, oncomplete : _cb},
+                        this.searchOptions
+                    );
+
                     if (this.searchFilter) {
-                        new openils.PermaCrud().search(linkClass, this.searchFilter, {
-                            async : !this.forceSync, oncomplete : _cb
-                        });
+                        new openils.PermaCrud().search(linkClass, this.searchFilter, this.searchOptions);
                     } else {
-                        new openils.PermaCrud().retrieveAll(linkClass, {
-                            async : !this.forceSync, oncomplete : _cb
-                        });
+                        new openils.PermaCrud().retrieveAll(linkClass, this.searchOptions);
                     }
                 }
             }

-----------------------------------------------------------------------

Summary of changes:
 .../web/js/dojo/openils/widget/AutoFieldWidget.js  |   13 +++++++------
 .../global/config/record_attr_definition.tt2       |    6 +++++-
 2 files changed, 12 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list