[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. ad51dc50b0fc2829db25dd604fc8241a6bfd10ff
Evergreen Git
git at git.evergreen-ils.org
Tue Sep 4 14:55:19 EDT 2012
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_3 has been updated
via ad51dc50b0fc2829db25dd604fc8241a6bfd10ff (commit)
from ad886561bb09256c72a6d9ea62ed7e02c90f8f73 (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 ad51dc50b0fc2829db25dd604fc8241a6bfd10ff
Author: Bill Erickson <berick at esilibrary.com>
Date: Tue Sep 4 14:43:27 2012 -0400
Gracefully handle reporter class with no labels
LP 1045964 -- unable to clone report template
The template interface was failing while rendering the reporter sources
drop-down when a reporter source (IDL class) had no label. This adds a
sanity check around that.
Signed-off-by: Bill Erickson <berick at esilibrary.com>
Signed-off-by: Ben Shum <bshum at biblio.org>
diff --git a/Open-ILS/web/reports/xul/source-setup.js b/Open-ILS/web/reports/xul/source-setup.js
index 245657b..d3b919c 100644
--- a/Open-ILS/web/reports/xul/source-setup.js
+++ b/Open-ILS/web/reports/xul/source-setup.js
@@ -25,13 +25,21 @@ function sortNames (a,b) {
}
function sortLabels (a,b) {
- var aname = a.getAttributeNS(rptNS, 'label').toLowerCase();
- if (!aname) aname = a.getAttribute('name');
- if (!aname) aname = a.getAttribute('id');
+ var aname = a.getAttributeNS(rptNS, 'label');
- var bname = b.getAttributeNS(rptNS, 'label').toLowerCase();
- if (!bname) bname = b.getAttribute('name');
- if (!bname) bname = b.getAttribute('id');
+ if (aname) {
+ aname = aname.toLowerCase();
+ } else {
+ aname = a.getAttribute('name') || a.getAttribute('id');
+ }
+
+ var bname = b.getAttributeNS(rptNS, 'label');
+
+ if (bname) {
+ bname = bname.toLowerCase();
+ } else {
+ bname = b.getAttribute('name') || b.getAttribute('id');
+ }
return aname < bname ? -1 : 1;
}
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/web/reports/xul/source-setup.js | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list