VIVO-742 Many changes to remove "solr" from the code base.
Comments, template names, Java classes, variables and method names (Java and JavaScript), etc.
This commit is contained in:
parent
cceca1659b
commit
ad9c08cf28
29 changed files with 97 additions and 103 deletions
|
@ -592,7 +592,7 @@ page_text = page text
|
|||
|
||||
sparql_query_results = Sparql Query Results
|
||||
no_results_returned = No results were returned.
|
||||
solr_individual_results = Solr Class Individuals
|
||||
solr_individual_results = Search Class Individuals
|
||||
select_vclass_uri = Select VClass
|
||||
#
|
||||
# manage proxies templates ( /templates/freemarker/body/manageproxies )
|
||||
|
|
|
@ -104,7 +104,7 @@ var pageManagementUtils = {
|
|||
this.classGroupSection = $("section#browseClassGroup");
|
||||
this.sparqlQuerySection = $("section#sparqlQuery");
|
||||
this.fixedHTMLSection = $("section#fixedHtml");
|
||||
this.solrIndividualsSection = $("section#solrIndividuals");
|
||||
this.searchIndividualsSection = $("section#searchIndividuals");
|
||||
//From original menu management edit
|
||||
this.defaultTemplateRadio = $('input.default-template');
|
||||
this.customTemplateRadio = $('input.custom-template');
|
||||
|
@ -133,8 +133,8 @@ var pageManagementUtils = {
|
|||
this.rightSideDiv = $("div#rightSide");
|
||||
//contentDivs container where content added/existing placed
|
||||
this.savedContentDivs = $("section#contentDivs");
|
||||
//for solr individuals data getter
|
||||
this.solrAllClassesDropdown = $("select#vclassUri");
|
||||
//for search individuals data getter
|
||||
this.searchAllClassesDropdown = $("select#vclassUri");
|
||||
},
|
||||
initDisplay: function(){
|
||||
//right side components
|
||||
|
@ -147,7 +147,7 @@ var pageManagementUtils = {
|
|||
this.classGroupSection.hide();
|
||||
this.sparqlQuerySection.hide();
|
||||
this.fixedHTMLSection.hide();
|
||||
this.solrIndividualsSection.hide();
|
||||
this.searchIndividualsSection.hide();
|
||||
this.classesForClassGroup.addClass('hidden');
|
||||
//left side components
|
||||
//These depend on whether or not this is an existing item or not
|
||||
|
@ -160,14 +160,14 @@ var pageManagementUtils = {
|
|||
this.menuSection.hide();
|
||||
}
|
||||
}
|
||||
//populates the dropdown of classes for the solr individuals template
|
||||
//populates the dropdown of classes for the search individuals template
|
||||
//dropdown now populated in template/from form specific data instead of ajax request
|
||||
//this.populateClassForSolrDropdown();
|
||||
//this.populateClassForSearchDropdown();
|
||||
},
|
||||
//this method can be utilized if using an ajax request to get the vclasses
|
||||
/*
|
||||
//for solr individuals - remember this populates the template class dropdown
|
||||
populateClassForSolrDropdown:function() {
|
||||
//for search individuals - remember this populates the template class dropdown
|
||||
populateClassForSearchDropdown:function() {
|
||||
|
||||
//Run ajax query
|
||||
var url = "dataservice?getAllVClasses=1";
|
||||
|
@ -176,10 +176,10 @@ var pageManagementUtils = {
|
|||
$.getJSON(url, function(results) {
|
||||
//Moved the function to processClassGroupDataGetterContent
|
||||
//Should probably remove this entire method and copy there
|
||||
pageManagementUtils.displayAllClassesForSolrDropdown(results);
|
||||
pageManagementUtils.displayAllClassesForSearchDropdown(results);
|
||||
});
|
||||
},
|
||||
displayAllClassesForSolrDropdown:function(results) {
|
||||
displayAllClassesForSearchDropdown:function(results) {
|
||||
if ( results.classes.length == 0 ) {
|
||||
|
||||
} else {
|
||||
|
@ -193,7 +193,7 @@ var pageManagementUtils = {
|
|||
|
||||
//if there are options to add
|
||||
if(appendHtml != "") {
|
||||
pageManagementUtils.solrAllClassesDropdown.html(appendHtml);
|
||||
pageManagementUtils.searchAllClassesDropdown.html(appendHtml);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ var pageManagementUtils = {
|
|||
pageManagementUtils.classGroupSection.hide();
|
||||
pageManagementUtils.fixedHTMLSection.hide();
|
||||
pageManagementUtils.sparqlQuerySection.hide();
|
||||
pageManagementUtils.solrIndividualsSection.hide();
|
||||
pageManagementUtils.searchIndividualsSection.hide();
|
||||
//Reset main content type drop-down
|
||||
pageManagementUtils.contentTypeSelectOptions.eq(0).attr('selected', 'selected');
|
||||
if ( pageManagementUtils.leftSideDiv.css("height") != undefined ) {
|
||||
|
@ -357,31 +357,31 @@ var pageManagementUtils = {
|
|||
pageManagementUtils.classGroupSection.show();
|
||||
pageManagementUtils.fixedHTMLSection.hide();
|
||||
pageManagementUtils.sparqlQuerySection.hide();
|
||||
pageManagementUtils.solrIndividualsSection.hide();
|
||||
pageManagementUtils.searchIndividualsSection.hide();
|
||||
pageManagementUtils.headerBar.text(pageManagementUtils.browseClassGroup + " - ");
|
||||
pageManagementUtils.headerBar.show();
|
||||
$('div#selfContainedDiv').hide();
|
||||
}
|
||||
if ( _this.contentTypeSelect.val() == "fixedHtml" || _this.contentTypeSelect.val() == "sparqlQuery" || _this.contentTypeSelect.val() == "solrIndividuals") {
|
||||
if ( _this.contentTypeSelect.val() == "fixedHtml" || _this.contentTypeSelect.val() == "sparqlQuery" || _this.contentTypeSelect.val() == "searchIndividuals") {
|
||||
pageManagementUtils.classGroupSection.hide();
|
||||
//if fixed html show that, otherwise show sparql results
|
||||
if ( _this.contentTypeSelect.val() == "fixedHtml" ) {
|
||||
pageManagementUtils.headerBar.text(pageManagementUtils.fixedHtml + " - ");
|
||||
pageManagementUtils.fixedHTMLSection.show();
|
||||
pageManagementUtils.sparqlQuerySection.hide();
|
||||
pageManagementUtils.solrIndividualsSection.hide();
|
||||
pageManagementUtils.searchIndividualsSection.hide();
|
||||
}
|
||||
else if (_this.contentTypeSelect.val() == "sparqlQuery"){
|
||||
pageManagementUtils.headerBar.text(pageManagementUtils.sparqlResults + " - ");
|
||||
pageManagementUtils.sparqlQuerySection.show();
|
||||
pageManagementUtils.fixedHTMLSection.hide();
|
||||
pageManagementUtils.solrIndividualsSection.hide();
|
||||
pageManagementUtils.searchIndividualsSection.hide();
|
||||
} else {
|
||||
//solr individuals
|
||||
pageManagementUtils.headerBar.text(pageManagementUtils.solrIndividuals + " - ");
|
||||
//search individuals
|
||||
pageManagementUtils.headerBar.text(pageManagementUtils.searchIndividuals + " - ");
|
||||
pageManagementUtils.sparqlQuerySection.hide();
|
||||
pageManagementUtils.fixedHTMLSection.hide();
|
||||
pageManagementUtils.solrIndividualsSection.show();
|
||||
pageManagementUtils.searchIndividualsSection.show();
|
||||
}
|
||||
|
||||
pageManagementUtils.headerBar.show();
|
||||
|
@ -392,7 +392,7 @@ var pageManagementUtils = {
|
|||
pageManagementUtils.classGroupSection.hide();
|
||||
pageManagementUtils.fixedHTMLSection.hide();
|
||||
pageManagementUtils.sparqlQuerySection.hide();
|
||||
pageManagementUtils.solrIndividualsSection.hide();
|
||||
pageManagementUtils.searchIndividualsSection.hide();
|
||||
pageManagementUtils.classesForClassGroup.addClass('hidden');
|
||||
pageManagementUtils.headerBar.hide();
|
||||
pageManagementUtils.headerBar.text("");
|
||||
|
@ -430,7 +430,7 @@ var pageManagementUtils = {
|
|||
pageManagementUtils.clearInputs(pageManagementUtils.fixedHTMLSection);
|
||||
pageManagementUtils.clearInputs(pageManagementUtils.sparqlQuerySection);
|
||||
pageManagementUtils.clearInputs(pageManagementUtils.classGroupSection);
|
||||
pageManagementUtils.clearInputs(pageManagementUtils.solrIndividualsSection);
|
||||
pageManagementUtils.clearInputs(pageManagementUtils.searchIndividualsSection);
|
||||
|
||||
},
|
||||
clearInputs:function($el) {
|
||||
|
@ -474,7 +474,7 @@ var pageManagementUtils = {
|
|||
// Get rid of the cancel link; it'll be replaced by a delete link
|
||||
$newContentObj.find('span#cancelContent' + counter).html('');
|
||||
|
||||
if ( contentType == "sparqlQuery" || contentType == "fixedHtml" || contentType == "solrIndividuals") {
|
||||
if ( contentType == "sparqlQuery" || contentType == "fixedHtml" || contentType == "searchIndividuals") {
|
||||
varOrClass = $newContentObj.find('input[name="saveToVar"]').val();
|
||||
}
|
||||
else if ( contentType == "browseClassGroup" ) {
|
||||
|
|
|
@ -10,7 +10,7 @@ var processDataGetterUtils = {
|
|||
"sparqlQuery": processSparqlDataGetterContent,
|
||||
"fixedHtml":processFixedHTMLDataGetterContent,
|
||||
"individualsForClasses":processIndividualsForClassesDataGetterContent,
|
||||
"solrIndividuals":processSolrDataGetterContent},
|
||||
"searchIndividuals":processSearchDataGetterContent},
|
||||
selectDataGetterType:function(pageContentSection) {
|
||||
var contentType = pageContentSection.attr("contentType");
|
||||
//The form can provide "browse class group" as content type but need to check
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
$.extend(this, i18nStringsSolrIndividuals);
|
||||
$.extend(this, i18nStringsSearchIndividuals);
|
||||
|
||||
//Process sparql data getter and provide a json object with the necessary information
|
||||
var processSolrDataGetterContent = {
|
||||
var processSearchDataGetterContent = {
|
||||
dataGetterClass:null,
|
||||
//can use this if expect to initialize from elsewhere
|
||||
initProcessor:function(dataGetterClass) {
|
||||
|
@ -30,13 +30,13 @@ var processSolrDataGetterContent = {
|
|||
|
||||
//Now find and set value
|
||||
pageContentSection.find("input[name='saveToVar']").val(saveToVarValue);
|
||||
//set value of solr query
|
||||
//set value of query
|
||||
pageContentSection.find("select[name='vclassUri']").val(vclassUriValue);
|
||||
|
||||
},
|
||||
//For the label of the content section for editing, need to add additional value
|
||||
retrieveContentLabel:function() {
|
||||
return i18nStringsSolrIndividuals.solrIndividuals;
|
||||
return i18nStringsSearchIndividuals.searchIndividuals;
|
||||
},
|
||||
//For the label of the content section for editing, need to add additional value
|
||||
retrieveAdditionalLabelText:function(existingContentObject) {
|
||||
|
@ -49,20 +49,20 @@ var processSolrDataGetterContent = {
|
|||
//Check that vclassuri and saveToVar have been input
|
||||
var variableValue = pageContentSection.find("input[name='saveToVar']").val();
|
||||
if(variableValue == "") {
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsSolrIndividuals.supplyQueryVariable + " <br />"
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsSearchIndividuals.supplyQueryVariable + " <br />"
|
||||
}
|
||||
if(processSolrDataGetterContent.stringHasSingleQuote(variableValue)) {
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsSolrIndividuals.noApostrophes + " <br />";
|
||||
if(processSearchDataGetterContent.stringHasSingleQuote(variableValue)) {
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsSearchIndividuals.noApostrophes + " <br />";
|
||||
}
|
||||
if(processSolrDataGetterContent.stringHasDoubleQuote(variableValue)) {
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsSolrIndividuals.noDoubleQuotes + " <br />";
|
||||
if(processSearchDataGetterContent.stringHasDoubleQuote(variableValue)) {
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsSearchIndividuals.noDoubleQuotes + " <br />";
|
||||
}
|
||||
|
||||
//validation for solr individuals
|
||||
//validation for search individuals
|
||||
|
||||
var vclassUriValue = pageContentSection.find("select[name='vclassUri']").val();
|
||||
if(vclassUriValue == "") {
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsSolrIndividuals.selectClass + " <br />";
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsSearchIndividuals.selectClass + " <br />";
|
||||
}
|
||||
return validationError;
|
||||
},
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
<h2>${i18n().search_index_status}</h2>
|
||||
|
||||
<#if !indexIsConnected>
|
||||
<!-- Can't contact the Solr server. Indexing would be impossible. Show an error message. -->
|
||||
<!-- Can't contact the search engine. Indexing would be impossible. Show an error message. -->
|
||||
<section id="error-alert" role="alert">
|
||||
<img src="${urls.images}/iconAlert.png" width="24" height="24" alt="Error alert icon" />
|
||||
<p>${i18n().search_index_not_connected}</p>
|
||||
<p><tt>SolrServer.ping()</tt> ${i18n().failed}.
|
||||
<p><tt>SearchEngine.ping()</tt> ${i18n().failed}.
|
||||
<p>${i18n().check_startup_status}</p>
|
||||
</section>
|
||||
|
||||
<#elseif worklevel == "IDLE">
|
||||
<!-- Solr indexer is idle. Show the button that rebuilds the index. -->
|
||||
<!-- Search indexer is idle. Show the button that rebuilds the index. -->
|
||||
<h3>${i18n().search_indexer_idle}</h3>
|
||||
<#if hasPreviousBuild??>
|
||||
<p>${i18n().most_recent_update} ${since?string("hh:mm:ss a, MMMM dd, yyyy")}</p>
|
||||
|
@ -30,12 +30,12 @@
|
|||
</form>
|
||||
|
||||
<#elseif totalToDo == 0>
|
||||
<!-- Solr indexer is preparing the list of records. Show elapsed time since request. -->
|
||||
<!-- Search indexer is preparing the list of records. Show elapsed time since request. -->
|
||||
<h3>${i18n().preparing_to_rebuild_index}</h3>
|
||||
<p>${i18n().since_elapsed_time(since?string("hh:mm:ss a, MMMM dd, yyyy"),elapsed)}</p>
|
||||
|
||||
<#else>
|
||||
<!-- Solr indexer is re-building the index. Show the progress. -->
|
||||
<!-- Search indexer is re-building the index. Show the progress. -->
|
||||
<h3>${i18n().current_task(currentTask)}</h3>
|
||||
<p>${i18n().since_elapsed_time_est_total(since?string("hh:mm:ss a, MMMM dd, yyyy"),elapsed,expected)}</p>
|
||||
<p>${i18n().index_recs_completed(completedCount,totalToDo)}</p>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
<#--This is an example of including multiple content types in the same template, this combines the default templates for Fixed HTML, Class groups and Solr Individuals in one template-->
|
||||
<#--This is an example of including multiple content types in the same template,
|
||||
this combines the default templates for Fixed HTML, Class groups and Search Individuals in one template-->
|
||||
<#include "menupage-checkForData.ftl">
|
||||
<#--Fixed HTML portion-->
|
||||
<#--Note that variableName is employed by both the fixed html and sparql query templates, this is used to store the
|
||||
|
@ -32,7 +33,7 @@ variableName is used below.-->
|
|||
${noDataNotification}
|
||||
</#if>
|
||||
|
||||
<#--Solr Individuals section-->
|
||||
<#--Search Individuals section-->
|
||||
<#import "lib-list.ftl" as l>
|
||||
|
||||
<#include "individualList-checkForData.ftl">
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
|
||||
<#assign sparqlQueryUrl = "${urls.base}/ajax/sparqlQuery" >
|
||||
<#--Passing in object types only if there are any types returned, otherwise
|
||||
the parameter should not be passed at all to the solr search.
|
||||
the parameter should not be passed at all to the search.
|
||||
Also multiple types parameter set to true only if more than one type returned-->
|
||||
<script type="text/javascript">
|
||||
var customFormData = {
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
<#include "pageManagement--browseClassGroups.ftl">
|
||||
<#include "pageManagement--sparqlQuery.ftl">
|
||||
<#include "pageManagement--fixedHtml.ftl">
|
||||
<#include "pageManagement--solrIndividuals.ftl">
|
||||
<#include "pageManagement--searchIndividuals.ftl">
|
|
@ -13,7 +13,7 @@ scripts list.-->
|
|||
"individualsForClasses": "java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.IndividualsForClassesDataGetter",
|
||||
"sparqlQuery":"java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter",
|
||||
"fixedHtml":"java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.FixedHTMLDataGetter",
|
||||
"solrIndividuals":"java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SearchIndividualsDataGetter"
|
||||
"searchIndividuals":"java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SearchIndividualsDataGetter"
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -3,7 +3,7 @@
|
|||
<#assign classGroup = pageData.classGroup />
|
||||
<#assign classGroups = pageData.classGroups />
|
||||
<#assign classes = pageData.classes />
|
||||
<section id="solrIndividuals" class="contentSectionContainer">
|
||||
<section id="searchIndividuals" class="contentSectionContainer">
|
||||
<label id="variableLabel" for="variable">${i18n().variable_name_all_caps}<span class="requiredHint"> *</span></label>
|
||||
<input type="text" name="saveToVar" size="20" value="" id="saveToVar" role="input" />
|
||||
<label id="vclassUriLabel" for="vclassUri">${i18n().select_vclass_uri}<span class="requiredHint"> *</span></label>
|
||||
|
@ -21,8 +21,8 @@
|
|||
</#if>
|
||||
</section>
|
||||
<script>
|
||||
var i18nStringsSolrIndividuals = {
|
||||
solrIndividuals: '${i18n().solr_individual_results}',
|
||||
var i18nStringsSearchIndividuals = {
|
||||
searchIndividuals: '${i18n().solr_individual_results}',
|
||||
supplyQueryVariable: '${i18n().supply_query_variable}',
|
||||
noApostrophes: '${i18n().apostrophe_not_allowed}',
|
||||
noDoubleQuotes: '${i18n().double_quote_note_allowed}',
|
||||
|
@ -30,4 +30,4 @@
|
|||
selectClass: '${i18n().select_class_for_solr}'
|
||||
};
|
||||
</script>
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processSolrDataGetterContent.js"></script>')}
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processSearchDataGetterContent.js"></script>')}
|
|
@ -81,7 +81,7 @@
|
|||
<option value="browseClassGroup">${i18n().browse_class_group}</option>
|
||||
<option value="fixedHtml">${i18n().fixed_html}</option>
|
||||
<option value="sparqlQuery">${i18n().sparql_query_results}</option>
|
||||
<option value="solrIndividuals">${i18n().solr_individual_results}</option>
|
||||
<option value="searchIndividuals">${i18n().solr_individual_results}</option>
|
||||
</select> <span class="note">${i18n().add_types}</span>
|
||||
</section>
|
||||
<section id="contentDivs"></section>
|
||||
|
@ -179,7 +179,7 @@
|
|||
browseClassGroup: '${i18n().browse_class_group}',
|
||||
fixedHtml: '${i18n().fixed_html}',
|
||||
sparqlResults: '${i18n().sparql_query_results}',
|
||||
solrIndividuals: '${i18n().solr_individual_results}',
|
||||
searchIndividuals: '${i18n().solr_individual_results}',
|
||||
orString: '${i18n().or}',
|
||||
deleteString: '${i18n().delete}',
|
||||
allCapitalized: '${i18n().all_capitalized}',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue