[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. eb1200e372afb12702fe3feef4176cb3885ea7eb
Evergreen Git
git at git.evergreen-ils.org
Tue Aug 2 11:29:38 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, rel_2_1 has been updated
via eb1200e372afb12702fe3feef4176cb3885ea7eb (commit)
via 3fe9a11ab36482dfd3229cf81ae300148bd3ea27 (commit)
from 6999427af119d553a38cece4cf6672962a80f06f (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 eb1200e372afb12702fe3feef4176cb3885ea7eb
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 3fe9a11ab36482dfd3229cf81ae300148bd3ea27
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>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous 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