From 1770c41a35e1372f1b8082d8c672730a9cedf328 Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Wed, 3 Dec 2014 12:35:55 -0500 Subject: [PATCH] No Jira issue. Links to departments on the home page were not working if the uri was not the default namespace. --- productMods/js/homePageUtils.js | 4 ++-- productMods/templates/freemarker/lib/lib-home-page.ftl | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/productMods/js/homePageUtils.js b/productMods/js/homePageUtils.js index e159ed8f..09cad684 100644 --- a/productMods/js/homePageUtils.js +++ b/productMods/js/homePageUtils.js @@ -134,7 +134,7 @@ $(document).ready(function(){ //Check to see if this index hasn't already been employed if(!indexFound) { //if this index hasn't already been employed then utilize it - html += "
  • " + academicDepartments[index].name + "
  • "; //add this index to the set of already used indices @@ -146,7 +146,7 @@ $(document).ready(function(){ } else { for ( var i=0;i" + academicDepartments[i].name + ""; } diff --git a/productMods/templates/freemarker/lib/lib-home-page.ftl b/productMods/templates/freemarker/lib/lib-home-page.ftl index 25e119b4..c333f091 100644 --- a/productMods/templates/freemarker/lib/lib-home-page.ftl +++ b/productMods/templates/freemarker/lib/lib-home-page.ftl @@ -165,8 +165,7 @@ var academicDepartments = [ <#list academicDeptDG as resultRow> <#assign uri = resultRow["theURI"] /> <#assign label = resultRow["name"] /> - <#assign localName = uri?substring(uri?last_index_of("/")) /> - {"uri": "${localName}", "name": "${label}"}<#if (resultRow_has_next)>, + {"uri": "${uri?url}", "name": "${label}"}<#if (resultRow_has_next)>, ];