This commit is contained in:
rjy7 2010-07-20 23:24:01 +00:00
parent ea03604dc5
commit 4bfeadf3ad
8 changed files with 48 additions and 14 deletions

View file

@ -106,7 +106,8 @@ public class UrlBuilder {
public String getHomeUrl() {
String rootBreadCrumbUrl = portal.getRootBreadCrumbURL();
return StringUtils.isEmpty(rootBreadCrumbUrl) ? contextPath : rootBreadCrumbUrl;
String path = StringUtils.isEmpty(rootBreadCrumbUrl) ? "" : rootBreadCrumbUrl;
return getUrl(path);
}
public String getLogoutUrl() {
@ -155,10 +156,12 @@ public class UrlBuilder {
/********** Static utility methods **********/
public static String getUrl(String path) {
if ( ! path.startsWith("/") ) {
if ( !path.isEmpty() && !path.startsWith("/") ) {
path = "/" + path;
}
return contextPath + path;
path = contextPath + path;
return path.isEmpty() ? "/" : path;
}
public static String getUrl(String path, Params params) {

View file

@ -1,7 +1,11 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
var vitro;
if (!vitro) {
// vitro == null: true
// vitro === null: false (only true if undefined)
// typeof vitro == 'undefined': true
if (!vitro) {
vitro = {};
}
@ -56,5 +60,5 @@ vitro.customFormUtils = {
// }
//
// return foundErrors;
},
}
}

View file

@ -9,3 +9,4 @@ $(document).ready(function(){
$('.focus').focus();
});

View file

@ -1,6 +0,0 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.User" %>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/login/loginUtils.js"></script>

View file

@ -2,9 +2,6 @@
<#-- Log in template for accessing site admin -->
${stylesheets.addFromTheme("/login.css")}
<noscript>
<div id="javascriptDisableWrapper">
<div id="javascriptDisableContent">