@@ -170,7 +171,10 @@ var i18nStrings = {
selectVocSource: '${i18n().select_vocabulary_source_to_search}',
confirmTermDelete: '${i18n().confirm_term_deletion}',
errorTernNotRemoved: '${i18n().error_term_not_deleted}',
- vocabSpecificLabels: vocabSpecificDisplay
+ vocabSpecificLabels: vocabSpecificDisplay,
+ displayMoreEllipsis: '${i18n().display_more_ellipsis}',
+ displayLess: '${i18n().display_less}',
+ showMoreContent: '${i18n().show_more_content}'
};
diff --git a/productMods/templates/freemarker/edit/forms/css/addConcept.css b/productMods/templates/freemarker/edit/forms/css/addConcept.css
index 225b86bf..93e257fc 100644
--- a/productMods/templates/freemarker/edit/forms/css/addConcept.css
+++ b/productMods/templates/freemarker/edit/forms/css/addConcept.css
@@ -27,6 +27,10 @@
width:400px;
}
+.conceptRemoval {
+ width:50px;
+}
+
/* For adding an empty element under the best match column*/
.emptyColumn {
width:67px;
@@ -73,4 +77,21 @@ form#addConceptForm span#createOwnOne{
.conceptHeadings .row {
border-bottom: 1px solid #5F6464;
+}
+
+/*For showing and hiding more results, copied from individual.css*/
+a.more-less {
+ margin-left: 1.5em;
+ padding: .3em .8em;
+ font-size: .8em;
+ text-decoration: none;
+ color: #666;
+ background: #eee;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+}
+a:hover.more-less {
+ color: #fff;
+ background: #888;
}
\ No newline at end of file
diff --git a/productMods/templates/freemarker/edit/forms/js/addConcept.js b/productMods/templates/freemarker/edit/forms/js/addConcept.js
index 606a981b..42b918b8 100644
--- a/productMods/templates/freemarker/edit/forms/js/addConcept.js
+++ b/productMods/templates/freemarker/edit/forms/js/addConcept.js
@@ -153,12 +153,12 @@ var addConceptForm = {
if($(link).hasClass("showmore")) {
//if clicking and already says show more then need to show the rest of the results
$("li.concepts").show(); //show everything
- $(link).html("Show fewer results");
+ $(link).html(addConceptForm.displayLess);
$(link).removeClass("showmore");
} else {
//if clicking and does not say show more than need to show less
$("li.concepts").slice(addConceptForm.numberOfMaxInitialSearchResults).hide();
- $(link).html("Show more results");
+ $(link).html(addConceptForm.displayMoreEllipsis);
$(link).addClass("showmore");
}
},
@@ -181,6 +181,8 @@ var addConceptForm = {
var dataServiceUrl = addConceptForm.dataServiceUrl + "?searchTerm=" + encodeURIComponent(searchValue) + "&source=" + encodeURIComponent(vocabSourceValue);
//Show the loading icon until the results appear
addConceptForm.loadingIndicator.removeClass("hidden");
+ //remove the old search results if there are any
+ $("#selectedConcept").empty();
//Hide and reset the show more button
addConceptForm.resetShowHideMultipleSearchResults();
//This should return an object including the concept list or any errors if there are any
@@ -371,7 +373,8 @@ var addConceptForm = {
//The definition in some cases may be an empty string, so to prevent the div
//from not appearing, we are replacing with
if(definition == null || definition.length == 0) {
- definition = " ";
+ //definition = " ";
+ definition = "No definition provided.";
}
return "