re-worked cancel button and some hide/show issues; corrected typo in java class, was GEneral...
This commit is contained in:
parent
a6af90662e
commit
57e880a9c2
3 changed files with 20 additions and 11 deletions
|
@ -95,11 +95,6 @@ var addConceptForm = {
|
|||
//Also clear the search input
|
||||
this.searchTerm.val("");
|
||||
this.cancel.unbind('click');
|
||||
this.cancel.bind('click', function() {
|
||||
//show only list of existing terms and hide adding term form
|
||||
addConceptForm.showConceptListOnlyView();
|
||||
return false;
|
||||
});
|
||||
|
||||
// Show the form
|
||||
this.form.show();
|
||||
|
@ -124,6 +119,10 @@ var addConceptForm = {
|
|||
this.createOwn.show();
|
||||
this.submit.show();
|
||||
},
|
||||
showSpanAndCreateOption:function() {
|
||||
this.orSpan.show();
|
||||
this.createOwn.show();
|
||||
},
|
||||
showConceptListOnlyView: function() {
|
||||
this.hideForm();
|
||||
this.showFormButtonWrapper.show();
|
||||
|
@ -132,6 +131,7 @@ var addConceptForm = {
|
|||
//Get value of search term
|
||||
var searchValue = this.searchTerm.val();
|
||||
var checkedVocabSource = $('input:radio[name="source"]:checked');
|
||||
var createLink = this.createOwn;
|
||||
if(!checkedVocabSource.length) {
|
||||
addConceptForm.showUncheckedSourceError();
|
||||
return;
|
||||
|
@ -172,7 +172,12 @@ var addConceptForm = {
|
|||
}
|
||||
if(htmlAdd.length) {
|
||||
$('#selectedConcept').html(htmlAdd);
|
||||
addConceptForm.showHiddenElements();
|
||||
if (htmlAdd.indexOf("No search results") >= 0) {
|
||||
addConceptForm.showSpanAndCreateOption();
|
||||
}
|
||||
else {
|
||||
addConceptForm.showHiddenElements();
|
||||
}
|
||||
}
|
||||
});
|
||||
return true;
|
||||
|
@ -249,7 +254,7 @@ var addConceptForm = {
|
|||
validateConceptSelection:function(checkedElements) {
|
||||
var numberElements = checkedElements.length;
|
||||
if(numberElements < 1) {
|
||||
addConceptForm.errors.html("<p class='validationError'>Please select at least one term from search results to add or click cancel.</p>");
|
||||
addConceptForm.errors.html("<p class='validationError'>Please select at least one term from the search search results.</p>");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -105,11 +105,15 @@
|
|||
<input type="hidden" name="editKey" id="editKey" value="${editKey}"/>
|
||||
<p class="submit">
|
||||
<input type="submit" id="submit" name="submit" value="Add Selected Concept" />
|
||||
<span class="or"> or </span><a class="cancel" href="${cancelUrl}">Cancel</a>
|
||||
</p>
|
||||
<div id="createOwn"><br /><a href="${userDefinedConceptUrl}" > Can't find the concept you want? Create your own.</a>
|
||||
</div>
|
||||
|
||||
</p>
|
||||
<div id="createOwn"><br />
|
||||
<a href="${userDefinedConceptUrl}" > Can't find the concept you want? Create your own.</a>
|
||||
|
||||
</div>
|
||||
<p>
|
||||
<span class="or"> or </span><a class="cancel" href="${cancelUrl}&url=/individual">Return to Profile Page</a>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ public class ConceptSearchServiceUtils {
|
|||
map.put(UMLSVocabSource, new VocabSourceDescription("UMLS", UMLSVocabSource, "http://www.nlm.nih.gov/research/umls/", "Unified Medical Language System"));
|
||||
//Commenting out agrovoc for now until implementation is updated
|
||||
// map.put(AgrovocVocabSource, new VocabSourceDescription("AGROVOC", AgrovocVocabSource, "www.fao.org/agrovoc/", "Agricultural Vocabulary"));
|
||||
map.put(GemetVocabSource, new VocabSourceDescription("GEMET", GemetVocabSource, "http://www.eionet.europa.eu/gemet", "GEneral Multilingual Environmental Thesaurus"));
|
||||
map.put(GemetVocabSource, new VocabSourceDescription("GEMET", GemetVocabSource, "http://www.eionet.europa.eu/gemet", "General Multilingual Environmental Thesaurus"));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue