updates for adding external concept
This commit is contained in:
parent
7223392ece
commit
3e0e617f94
3 changed files with 11 additions and 8 deletions
|
@ -120,7 +120,6 @@ var addConceptForm = {
|
||||||
submitSearchTerm: function() {
|
submitSearchTerm: function() {
|
||||||
//Get value of search term
|
//Get value of search term
|
||||||
var searchValue = this.searchTerm.val();
|
var searchValue = this.searchTerm.val();
|
||||||
this.entryTerm.val(searchValue);
|
|
||||||
var dataServiceUrl = addConceptForm.dataServiceUrl + "?searchTerm=" + encodeURIComponent(searchValue);
|
var dataServiceUrl = addConceptForm.dataServiceUrl + "?searchTerm=" + encodeURIComponent(searchValue);
|
||||||
$.getJSON(dataServiceUrl, function(results) {
|
$.getJSON(dataServiceUrl, function(results) {
|
||||||
if ( results.array.length == 0 ) {
|
if ( results.array.length == 0 ) {
|
||||||
|
@ -170,7 +169,7 @@ var addConceptForm = {
|
||||||
return bestMatchResults;
|
return bestMatchResults;
|
||||||
},
|
},
|
||||||
addResultsHeader:function() {
|
addResultsHeader:function() {
|
||||||
var htmlAdd = "<li class='terminology'><div class='row'><span class='column conceptLabel'>Label (Type) </span><span class='column conceptDefinition'>Definition</span></div></li>";
|
var htmlAdd = "<li class='concepts'><div class='row'><span class='column conceptLabel'>Label (Type) </span><span class='column conceptDefinition'>Definition</span></div></li>";
|
||||||
return htmlAdd;
|
return htmlAdd;
|
||||||
},
|
},
|
||||||
hideSearchResults:function() {
|
hideSearchResults:function() {
|
||||||
|
@ -190,11 +189,11 @@ var addConceptForm = {
|
||||||
|
|
||||||
checkedElements.each(function() {
|
checkedElements.each(function() {
|
||||||
checkedConceptElement = $(this);
|
checkedConceptElement = $(this);
|
||||||
checkedConcept = checkedTermElement.val();
|
checkedConcept = checkedConceptElement.val();
|
||||||
conceptLabel = checkedConceptElement.attr("label");
|
conceptLabel = checkedConceptElement.attr("label");
|
||||||
conceptSource = checkedConceptElement.attr("conceptDefinedBy");
|
conceptSource = checkedConceptElement.attr("conceptDefinedBy");
|
||||||
conceptNodes.push(checkedConcept);
|
conceptNodes.push(checkedConcept);
|
||||||
conceptLabels.push(termLabel);
|
conceptLabels.push(conceptLabel);
|
||||||
conceptSources.push(conceptSource);
|
conceptSources.push(conceptSource);
|
||||||
});
|
});
|
||||||
this.externalConceptURI.val(conceptNodes);
|
this.externalConceptURI.val(conceptNodes);
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
<input type="button" id="searchButton" name="searchButton" value="Search"/>
|
<input type="button" id="searchButton" name="searchButton" value="Search"/>
|
||||||
</p>
|
</p>
|
||||||
<input type="hidden" id="conceptNode" name="conceptNode" value=""/> <!-- Field value populated by JavaScript -->
|
<input type="hidden" id="conceptNode" name="conceptNode" value=""/> <!-- Field value populated by JavaScript -->
|
||||||
<input type="hidden" id="ConceptLabel" name="conceptLabel" value="" /> <!-- Field value populated by JavaScript -->
|
<input type="hidden" id="conceptLabel" name="conceptLabel" value="" /> <!-- Field value populated by JavaScript -->
|
||||||
<!--TODO: Change this so this is populated by the javascript-->
|
<!--TODO: Change this so this is populated by the javascript-->
|
||||||
<input type="hidden" id="conceptSource" name="conceptSource" value="" /> <!-- Field value populated by JavaScript -->
|
<input type="hidden" id="conceptSource" name="conceptSource" value="" /> <!-- Field value populated by JavaScript -->
|
||||||
<div id="selectedConcept" name="selectedConcept" class="acSelection">
|
<div id="selectedConcept" name="selectedConcept" class="acSelection">
|
||||||
|
@ -102,8 +102,9 @@
|
||||||
<!-- Field value populated by JavaScript -->
|
<!-- Field value populated by JavaScript -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a href="${userDefinedConceptUrl}" > Can't find the concept you want? Create your own.</a>
|
<div><a href="${userDefinedConceptUrl}" > Can't find the concept you want? Create your own.</a>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="editKey" id="editKey" value="${editKey}"/>
|
||||||
<p class="submit">
|
<p class="submit">
|
||||||
<input type="submit" id="submit" name="submit" value="Add Term" />
|
<input type="submit" id="submit" name="submit" value="Add Term" />
|
||||||
<span class="or"> or <a class="cancel" href="${cancelUrl}">Cancel</a>
|
<span class="or"> or <a class="cancel" href="${cancelUrl}">Cancel</a>
|
||||||
|
@ -125,7 +126,9 @@ ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/sm
|
||||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customForm.css" />')}
|
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customForm.css" />')}
|
||||||
|
|
||||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/addConcept.css" />')}
|
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/addConcept.css" />')}
|
||||||
|
${scripts.add('<script type="text/javascript" src="${urls.base}/js/jquery-ui/js/jquery-ui-1.8.9.custom.min.js"></script>')}
|
||||||
|
${scripts.add('<script type="text/javascript" src="${urls.base}/js/customFormUtils.js"></script>')}
|
||||||
|
${scripts.add('<script type="text/javascript" src="${urls.base}/js/browserUtils.js"></script>')}
|
||||||
${scripts.add('<script type="text/javascript" src="${urls.base}/edit/forms/js/addConcept.js"></script>')}
|
${scripts.add('<script type="text/javascript" src="${urls.base}/edit/forms/js/addConcept.js"></script>')}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -223,6 +223,7 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements
|
||||||
//The URI of the node that defines the concept
|
//The URI of the node that defines the concept
|
||||||
urisOnForm.add("conceptNode");
|
urisOnForm.add("conceptNode");
|
||||||
urisOnForm.add("conceptSource");
|
urisOnForm.add("conceptSource");
|
||||||
|
editConfiguration.setUrisOnform(urisOnForm);
|
||||||
//Also need to add the label of the concept
|
//Also need to add the label of the concept
|
||||||
literalsOnForm.add("conceptLabel");
|
literalsOnForm.add("conceptLabel");
|
||||||
editConfiguration.setLiteralsOnForm(literalsOnForm);
|
editConfiguration.setLiteralsOnForm(literalsOnForm);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue