NIHVIVO-161 Add dialog box to the "delete" link for an image on the Individual page.

This commit is contained in:
jeb228 2010-07-03 21:38:37 +00:00
parent 93ce1c2353
commit 83afb6c5f0
2 changed files with 13 additions and 2 deletions

View file

@ -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);

View file

@ -306,3 +306,7 @@ if (VitroRequestPrep.isSelfEditing(request) || LoginFormBean.loggedIn(request, L
</div> <!-- contents -->
</div> <!-- content -->
<script type="text/javascript" src="/vivo/js/imageUpload/confirmPhotoDeletion.js"></script>