From 83afb6c5f03508d282b2046bb5d9dd29c6c4a4b3 Mon Sep 17 00:00:00 2001 From: jeb228 Date: Sat, 3 Jul 2010 21:38:37 +0000 Subject: [PATCH] NIHVIVO-161 Add dialog box to the "delete" link for an image on the Individual page. --- .../vitro/webapp/web/jsptags/PropertyEditLinks.java | 11 +++++++++-- webapp/web/templates/entity/entityBasic.jsp | 4 ++++ 2 files changed, 13 insertions(+), 2 deletions(-) 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 + + + +