From a67eec04ad9144668aa0d5f79247eb1bf72d3042 Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 30 Mar 2010 17:05:22 +0000 Subject: [PATCH] add makefile and autogen support for the facet definition bits; more minor bug fixing of facet definition JS generator git-svn-id: svn://svn.open-ils.org/ILS/trunk@16061 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/Makefile.am | 1 + Open-ILS/src/extras/autogen.sh | 4 ++++ Open-ILS/src/extras/facet_types_js.pl | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/Makefile.am b/Open-ILS/src/Makefile.am index c726383b2b..0daeebfcb9 100644 --- a/Open-ILS/src/Makefile.am +++ b/Open-ILS/src/Makefile.am @@ -38,6 +38,7 @@ autojsbinscripts = @srcdir@/extras/fieldmapper.pl \ @srcdir@/extras/locale_html_options.pl \ @srcdir@/extras/org_tree_js.pl \ @srcdir@/extras/org_lasso_js.pl \ + @srcdir@/extras/facet_types_js.pl \ @srcdir@/extras/org_tree_html_options.pl \ @srcdir@/extras/org_tree_proximity.pl \ @srcdir@/extras/autogen.sh \ diff --git a/Open-ILS/src/extras/autogen.sh b/Open-ILS/src/extras/autogen.sh index 3dbac70af8..7a8171137a 100755 --- a/Open-ILS/src/extras/autogen.sh +++ b/Open-ILS/src/extras/autogen.sh @@ -113,6 +113,10 @@ echo "Updating Search Groups"; perl org_lasso_js.pl "$CONFIG" > "$JSDIR/OrgLasso.js"; cp "$JSDIR/OrgLasso.js" "$FMDOJODIR/" +echo "Updating Facet Definitions"; +perl facet_types_js.pl "$CONFIG" "$JSDIR" "FacetDefs.js"; +cp "$JSDIR/en-US/FacetDefs.js" "$FMDOJODIR/" + if [ ! -z "$PROXIMITY" ] then echo "Refreshing proximity of org units"; diff --git a/Open-ILS/src/extras/facet_types_js.pl b/Open-ILS/src/extras/facet_types_js.pl index 50e0890993..3bae8ea283 100644 --- a/Open-ILS/src/extras/facet_types_js.pl +++ b/Open-ILS/src/extras/facet_types_js.pl @@ -77,12 +77,12 @@ sub build_tree_js { my %hash = ( id => $o->id, name => val($o->name), - label => $o->val($o->label), + label => val($o->label), classname => val($o->field_class->name), classlabel => val($o->field_class->label) ); - $pile .= $hash{id}.':{'.join(',', map { "$_:$hash{$_}" } keys %hash).'",'; + $pile .= $hash{id}.':{'.join(',', map { "$_:$hash{$_}" } keys %hash).'},'; } $pile =~ s/,$//; # remove trailing comma -- 2.11.0