miscellaneous cleanup but includes a fix for VIVO-404

This commit is contained in:
tworrall 2013-10-24 13:16:26 -04:00
parent 15880ea3b7
commit ae80d6c63d
9 changed files with 175 additions and 130 deletions

View file

@ -13,13 +13,18 @@
next statement -->
<#macro showResearchers statement>
<#local linkedIndividual>
<a href="${profileUrl(statement.uri("person"))}" title="${i18n().person_name}">${statement.personName}</a>
<a href="${profileUrl(statement.uri("person"))}" title="${i18n().person_name}">${statement.personName!}</a>
</#local>
<#if statement.title?has_content >
<#local posnTitle = statement.title>
<#else>
<#local posnTitle = statement.posnLabel!statement.personType>
<#elseif statement.posnLabel?has_content>
<#local posnTitle = statement.posnLabel>
</#if>
<#if statement.org??>
<#local orgString>
<a href="${profileUrl(statement.uri("org"))}" title="${i18n().organization_name}">${statement.orgLabel!""}</a>
</#local>
</#if>
<@s.join [ linkedIndividual, posnTitle, statement.orgLabel!"" ] /> ${statement.type!}
<@s.join [ linkedIndividual, posnTitle!, orgString! ] />
</#macro>

View file

@ -25,6 +25,7 @@ var adviseeRelUtils = {
this.form = $('#personHasAdvisingRelationship');
this.adRelshiplabel = $('#advisingRelLabel');
this.advisor = $('#advisor');
this.fauxLabel = $('#maskLabelBuilding');
this.subjArea = $('#SubjectArea');
this.firstName = $('#firstName');
this.lastName = $('#lastName');
@ -56,8 +57,6 @@ var adviseeRelUtils = {
this.form.submit(function() {
adviseeRelUtils.resolveAdvisorNames();
adviseeRelUtils.buildAdvisingRelLabel();
alert(this.adRelshiplabel.val());
return false;
});
},
@ -80,6 +79,12 @@ var adviseeRelUtils = {
if (firstName) {
name += ', ' + firstName;
}
// we don't want the user to see the label getting built, so hide the acSelector
// field and display a bogus field that just has the last name in it.
this.fauxLabel.val(lastName);
this.advisee.hide();
this.fauxLabel.show();
this.advisor.val(name);
this.lastName.val(lastName);
}
@ -91,7 +96,6 @@ var adviseeRelUtils = {
},
buildAdvisingRelLabel: function() {
alert("here");
if ( this.advisor.val() != "" ) {
this.adRelshiplabel.val(this.advisor.val() + " " + adviseeRelUtils.advisingString + " " + this.subjName);
}

View file

@ -124,6 +124,7 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
<p >
<label for="advisor">${i18n().advisor_capitalized}: ${i18n().last_name} ${requiredHint}<span style="padding-left:322px">${i18n().first_name} ${requiredHint}</span></label>
<input class="acSelector" size="50" type="text" acGroupName="advisor" id="advisor" name="advisorLabel" value="${advisorLabelValue}" >
<input type="text" size="50" id="maskLabelBuilding" name="maskLabelBuilding" value="" style="display:none" >
<input size="30" type="text" id="firstName" name="firstName" value="${firstNameValue}" ><br />
<input type="hidden" id="lastName" name="lastName" value="">
<input class="display" type="hidden" acGroupName="advisor" id="advisorDisplay" name="advisorLabelDisplay" value="${advisorLabelDisplayValue}" >