From 3ecaf04215bfdb1e0d9c79a6d0e2cd03755a1dfd Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Fri, 6 Sep 2024 13:36:39 +0200 Subject: [PATCH 1/2] browse filter results --- .../webapp/startup/DataGetterN3Setup.java | 25 ++++++++++++++----- .../js/menupage/processDataGetterUtils.js | 1 + .../pageManagement--customDataScript.ftl | 1 + 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/api/src/main/java/org/vivoweb/webapp/startup/DataGetterN3Setup.java b/api/src/main/java/org/vivoweb/webapp/startup/DataGetterN3Setup.java index cee386bbc0..117bc98934 100644 --- a/api/src/main/java/org/vivoweb/webapp/startup/DataGetterN3Setup.java +++ b/api/src/main/java/org/vivoweb/webapp/startup/DataGetterN3Setup.java @@ -1,6 +1,18 @@ package org.vivoweb.webapp.startup; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessClassGroupDataGetterN3; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessDataGetterN3Map; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessFixedHTMLN3; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessInternalClassDataGetterN3; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessSearchFilterValuesDataGetterN3; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessSearchIndividualsDataGetterN3; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessSparqlDataGetterN3; +import edu.cornell.mannlib.vitro.webapp.utils.dataGetter.ClassGroupPageData; +import edu.cornell.mannlib.vitro.webapp.utils.dataGetter.FixedHTMLDataGetter; +import edu.cornell.mannlib.vitro.webapp.utils.dataGetter.InternalClassesDataGetter; +import edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SearchFilterValuesDataGetter; +import edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SearchIndividualsDataGetter; +import edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; @@ -9,12 +21,13 @@ public class DataGetterN3Setup implements ServletContextListener { @Override public void contextInitialized(ServletContextEvent servletContextEvent) { - HashMap map = new HashMap(); - map.put("edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter", "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessSparqlDataGetterN3"); - map.put("edu.cornell.mannlib.vitro.webapp.utils.dataGetter.ClassGroupPageData", "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessClassGroupDataGetterN3"); - map.put("edu.cornell.mannlib.vitro.webapp.utils.dataGetter.InternalClassesDataGetter", "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessInternalClassDataGetterN3"); - map.put("edu.cornell.mannlib.vitro.webapp.utils.dataGetter.FixedHTMLDataGetter", "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessFixedHTMLN3"); - map.put("edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SearchIndividualsDataGetter", "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessSearchIndividualsDataGetterN3"); + HashMap map = new HashMap(); + map.put(SparqlQueryDataGetter.class.getCanonicalName(), ProcessSparqlDataGetterN3.class); + map.put(ClassGroupPageData.class.getCanonicalName(), ProcessClassGroupDataGetterN3.class); + map.put(SearchFilterValuesDataGetter.class.getCanonicalName(), ProcessSearchFilterValuesDataGetterN3.class); + map.put(InternalClassesDataGetter.class.getCanonicalName(), ProcessInternalClassDataGetterN3.class); + map.put(FixedHTMLDataGetter.class.getCanonicalName(), ProcessFixedHTMLN3.class); + map.put(SearchIndividualsDataGetter.class.getCanonicalName(), ProcessSearchIndividualsDataGetterN3.class); ProcessDataGetterN3Map.replaceDataGetterMap(map); } diff --git a/webapp/src/main/webapp/js/menupage/processDataGetterUtils.js b/webapp/src/main/webapp/js/menupage/processDataGetterUtils.js index 124bb133ca..6be115b3d0 100644 --- a/webapp/src/main/webapp/js/menupage/processDataGetterUtils.js +++ b/webapp/src/main/webapp/js/menupage/processDataGetterUtils.js @@ -8,6 +8,7 @@ var processDataGetterUtils = { dataGetterProcessorMap:{"browseClassGroup": processClassGroupDataGetterContent, + "searchFilterValues": processSearchFilterValuesDataGetterContent, "sparqlQuery": processSparqlDataGetterContent, "fixedHtml":processFixedHTMLDataGetterContent, "internalClass":processInternalClassDataGetterContent, diff --git a/webapp/src/main/webapp/templates/freemarker/edit/forms/pageManagement--customDataScript.ftl b/webapp/src/main/webapp/templates/freemarker/edit/forms/pageManagement--customDataScript.ftl index 3924538607..a3f7a7df18 100644 --- a/webapp/src/main/webapp/templates/freemarker/edit/forms/pageManagement--customDataScript.ftl +++ b/webapp/src/main/webapp/templates/freemarker/edit/forms/pageManagement--customDataScript.ftl @@ -12,6 +12,7 @@ scripts list.--> dataGetterLabelToURI:{ //maps labels to URIs "browseClassGroup": "java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.ClassGroupPageData", + "searchFilterValues": "java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SearchFilterValuesDataGetter", "internalClass": "java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.InternalClassesDataGetter", "sparqlQuery":"java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter", "fixedHtml":"java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.FixedHTMLDataGetter", From 1fe4a77493e85b5aa291420d5ca54ec423ede378 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Fri, 18 Oct 2024 11:17:05 +0200 Subject: [PATCH 2/2] turn off autocomplete --- webapp/src/main/webapp/themes/nemo/templates/search.ftl | 2 +- .../webapp/themes/tenderfoot/templates/page/partials/search.ftl | 2 +- webapp/src/main/webapp/themes/wilma/templates/search.ftl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/src/main/webapp/themes/nemo/templates/search.ftl b/webapp/src/main/webapp/themes/nemo/templates/search.ftl index f377632796..46d52d30c0 100644 --- a/webapp/src/main/webapp/themes/nemo/templates/search.ftl +++ b/webapp/src/main/webapp/themes/nemo/templates/search.ftl @@ -6,7 +6,7 @@
${i18n().search_form} -