No Jira issue. Links to departments on the home page were not working if the uri was not the default namespace.

This commit is contained in:
Tim Worrall 2014-12-03 12:35:55 -05:00
parent 4966d98539
commit 1770c41a35
2 changed files with 3 additions and 4 deletions

View file

@ -134,7 +134,7 @@ $(document).ready(function(){
//Check to see if this index hasn't already been employed //Check to see if this index hasn't already been employed
if(!indexFound) { if(!indexFound) {
//if this index hasn't already been employed then utilize it //if this index hasn't already been employed then utilize it
html += "<li><a href='" + urlsBase + "/individual" html += "<li><a href='" + urlsBase + "/individual?uri="
+ academicDepartments[index].uri + "'>" + academicDepartments[index].uri + "'>"
+ academicDepartments[index].name + "</a></li>"; + academicDepartments[index].name + "</a></li>";
//add this index to the set of already used indices //add this index to the set of already used indices
@ -146,7 +146,7 @@ $(document).ready(function(){
} }
else { else {
for ( var i=0;i<deptNbr;i++) { for ( var i=0;i<deptNbr;i++) {
html += "<li><a href='" + urlsBase + "/individual" html += "<li><a href='" + urlsBase + "/individual?uri="
+ academicDepartments[i].uri + "'>" + academicDepartments[i].uri + "'>"
+ academicDepartments[i].name + "</a></li>"; + academicDepartments[i].name + "</a></li>";
} }

View file

@ -165,8 +165,7 @@ var academicDepartments = [
<#list academicDeptDG as resultRow> <#list academicDeptDG as resultRow>
<#assign uri = resultRow["theURI"] /> <#assign uri = resultRow["theURI"] />
<#assign label = resultRow["name"] /> <#assign label = resultRow["name"] />
<#assign localName = uri?substring(uri?last_index_of("/")) /> {"uri": "${uri?url}", "name": "${label}"}<#if (resultRow_has_next)>,</#if>
{"uri": "${localName}", "name": "${label}"}<#if (resultRow_has_next)>,</#if>
</#list> </#list>
</#if> </#if>
]; ];