diff --git a/productMods/edit/forms/addAuthorsToInformationResource.jsp b/productMods/edit/forms/addAuthorsToInformationResource.jsp
index 45643722..1bcc9ad4 100644
--- a/productMods/edit/forms/addAuthorsToInformationResource.jsp
+++ b/productMods/edit/forms/addAuthorsToInformationResource.jsp
@@ -214,7 +214,6 @@ SPARQL queries for existing values. --%>
Model model = (Model) application.getAttribute("jenaOntModel");
String objectUri = (String) request.getAttribute("objectUri");
- System.out.println("OBJECT URI: " + objectUri);
editConfig.prepareForNonUpdate(model); // we're only adding new, not editing existing
String subjectUri = vreq.getParameter("subjectUri");
@@ -242,17 +241,19 @@ SPARQL queries for existing values. --%>
* required fields
diff --git a/productMods/edit/forms/css/addAuthorsToInformationResource.css b/productMods/edit/forms/css/addAuthorsToInformationResource.css index 481a4760..7802f1c4 100644 --- a/productMods/edit/forms/css/addAuthorsToInformationResource.css +++ b/productMods/edit/forms/css/addAuthorsToInformationResource.css @@ -1,25 +1,39 @@ /* $This file is distributed under the terms of the license in /doc/license.txt$ */ -ul.authors { +#authors { margin-left: 0; } -ul.authors li { +#authors li { list-style: none; margin-bottom: .75em; } -ul.authors span.authorName { +#authors a.authorName { display: inline-block; width: 15em; } /* Hide elements not used in non-JS version of form */ -#showFormButton, +#showAddForm, a.remove { display: none; } +form a:link.cancel, form a:visited.cancel, +#authors a:link.remove, #authors a:visited.remove, +#showAddForm a:link.cancel, #showAddForm a:visited.cancel { + color: #f70; + border-color: #f70; +} + +form a:hover.cancel, +#authors a:hover.remove, +#showAddForm a:hover.cancel { + color: #fff; + background: #f70; +} + #content form p.inline { clear: left; margin-bottom: 0; diff --git a/productMods/edit/forms/js/addAuthorsToInformationResource.js b/productMods/edit/forms/js/addAuthorsToInformationResource.js index 7ccb6a1b..21817105 100644 --- a/productMods/edit/forms/js/addAuthorsToInformationResource.js +++ b/productMods/edit/forms/js/addAuthorsToInformationResource.js @@ -15,8 +15,10 @@ var addAuthorForm = { initObjects: function() { this.form = $('#addAuthorForm'); - this.showFormButton = $('#showAddForm'); + this.showFormDiv = $('#showAddForm'); + this.showFormButton = $('#showAddFormButton'); this.removeLinks = $('a.remove'); + this.cancel = this.form.find('.cancel'); }, // On page load, make changes to the non-Javascript version for the Javascript version. @@ -24,7 +26,7 @@ var addAuthorForm = { adjustForJs: function() { // Show elements that are hidden by css on load since not used in non-JS version - this.showFormButton.show(); + this.showFormDiv.show(); this.removeLinks.show(); this.form.hide(); @@ -32,9 +34,16 @@ var addAuthorForm = { initForm: function() { - this.showFormButton.bind('click', function() { - $(this).hide(); + this.showFormButton.click(function() { + addAuthorForm.showFormDiv.hide(); addAuthorForm.form.show(); + return false; + }); + + this.cancel.click(function() { + addAuthorForm.form.hide(); + addAuthorForm.showFormDiv.show(); + return false; }); },