[open-ils-commits] [GIT] Evergreen ILS branch master updated. 37b7f30ea722a68890593590f995bf80143492ec

Evergreen Git git at git.evergreen-ils.org
Tue Sep 4 14:54:47 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, master has been updated
       via  37b7f30ea722a68890593590f995bf80143492ec (commit)
      from  3480ea1fb4685849bbf70f9c8a627ea61e62838d (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 37b7f30ea722a68890593590f995bf80143492ec
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