diff --git a/productMods/templates/freemarker/edit/forms/js/publicationToPersonUtils.js b/productMods/templates/freemarker/edit/forms/js/publicationToPersonUtils.js index bd622114..94deb69d 100644 --- a/productMods/templates/freemarker/edit/forms/js/publicationToPersonUtils.js +++ b/productMods/templates/freemarker/edit/forms/js/publicationToPersonUtils.js @@ -148,7 +148,7 @@ var publicationToPersonUtils = { this.hideAllFields(); var selectedType = this.typeSelector.find(':selected').text(); - if ( selectedType == 'Academic Article' || selectedType == 'Article' || selectedType == 'Editorial Article' || selectedType == 'Review') { + if ( selectedType == 'Academic Article' ) { // if the user has changed type, keep any relevant values and display the // acSelection as appropriate var ckForVal = this.getAcUriReceiverVal('collection'); @@ -273,10 +273,6 @@ var publicationToPersonUtils = { else if ( selectedType == 'Conference Paper' ) { // if the user has changed type, keep any relevant values and display the // acSelection as appropriate - var ckForVal = this.getAcUriReceiverVal('collection'); - if ( ckForVal == '' || ckForVal == this.sentinel ) { - this.collection.parent('p').show(); - } ckForVal = this.getAcUriReceiverVal('conference'); if ( ckForVal == '' || ckForVal == this.sentinel ) { this.presentedAt.parent('p').show(); @@ -287,6 +283,10 @@ var publicationToPersonUtils = { // if the user is changing type, ensure that irrelevant fields are cleared // and reset an acSelection divs + if ( this.collection.val() != '' && this.collection.val().substring(0, 18) != publicationToPersonUtils.selectAnExisting ) { + this.collection.val(''); + this.resetAcSelection('collection'); + } if ( this.book.val() != '' && this.book.val().substring(0, 18) != publicationToPersonUtils.selectAnExisting ) { this.book.val(''); this.resetAcSelection('book'); diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPublicationToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPublicationToPersonGenerator.java index d5eaf054..7c6be1e6 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPublicationToPersonGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPublicationToPersonGenerator.java @@ -44,7 +44,7 @@ import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils; */ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implements EditConfigurationGenerator { - final static String collectionClass = bibo + "Periodical"; + final static String collectionClass = bibo + "Journal"; final static String bookClass = bibo + "Book"; final static String documentClass = "http://purl.obolibrary.org/obo/IAO_0000030"; final static String conferenceClass = bibo + "Conference"; @@ -241,7 +241,7 @@ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implement private String getN3ForNewCollectionNewPub() { return "@prefix vivo: <" + vivoCore + "> . \n" + "?newPublication vivo:hasPublicationVenue ?newCollection . \n" + - "?newCollection a <" + collectionClass + "> . \n" + + "?newCollection a <" + collectionClass + "> . \n" + "?newCollection vivo:publicationVenueFor ?newPublication . \n" + "?newCollection <" + label + "> ?collection ."; }