diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/jsptags/PropertyEditLinks.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/jsptags/PropertyEditLinks.java index 1f65c42ab..c11099652 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/jsptags/PropertyEditLinks.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/jsptags/PropertyEditLinks.java @@ -687,8 +687,15 @@ public class PropertyEditLinks extends TagSupport{ private LinkStruct getImageLink(String subjectUri, String contextPath, String action, String mouseOverText, String text) { ImageLinkStruct ls = new ImageLinkStruct(); - String url = makeRelativeHref(contextPath + "uploadImages", - "entityUri", subjectUri, "action", action); + String url; + if (action == "delete") { + url = "javascript:delete_photo('" + + makeRelativeHref(contextPath + "uploadImages", + "entityUri", subjectUri, "action", action) + "')"; + } else { + url = makeRelativeHref(contextPath + "uploadImages", "entityUri", + subjectUri, "action", action); + } ls.setHref(url); ls.setType(action); ls.setMouseoverText(mouseOverText); diff --git a/webapp/web/templates/entity/entityBasic.jsp b/webapp/web/templates/entity/entityBasic.jsp index d0d55149f..460afb3ef 100644 --- a/webapp/web/templates/entity/entityBasic.jsp +++ b/webapp/web/templates/entity/entityBasic.jsp @@ -306,3 +306,7 @@ if (VitroRequestPrep.isSelfEditing(request) || LoginFormBean.loggedIn(request, L + + + +