From: <rv...@us...> - 2012-02-20 20:32:46
|
Revision: 1076 http://treebase.svn.sourceforge.net/treebase/?rev=1076&view=rev Author: rvos Date: 2012-02-20 20:32:40 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Adding javascript page variables for simplified search box Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/matrixSearch.jsp trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/studySearch.jsp trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeSearch.jsp trunk/treebase-web/src/main/webapp/common/search-nav.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/matrixSearch.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/matrixSearch.jsp 2012-02-20 19:35:10 UTC (rev 1075) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/matrixSearch.jsp 2012-02-20 20:32:40 UTC (rev 1076) @@ -8,13 +8,25 @@ <div id="s-clear"></div> +<script type="text/javascript"> + //<![CDATA[ + // These are the mappings from inferred search term types to search predicates for this scope + var predicates = { + 'integer' : [ 'tb.identifier.matrix', 'tb.identifier.matrix.tb1', 'tb.ntax.matrix', 'tb.nchar.matrix' ], + 'id' : [ 'tb.identifier.matrix', 'tb.identifier.matrix.tb1' ], + 'word' : [ 'tb.title.matrix', 'tb.type.matrix' ], + 'doi' : [ 'prism.doi' ] // this doesn't work yet, we have no search on doi + }; + + // purlBase is assigned in /common/search-nav.jsp + var phyloWSURI = purlBase + 'matrix/find?query='; + //]]> +</script> <jsp:include page="matrixSimpleSearchForm.jsp"/> <c:set var="searchType" value="matrix" scope="request"/> -<%-- <jsp:include page="studyTaxonLabelSearchForm.jsp"/> --%> - <div id="s-clear"></div> <jsp:include page="searchMessages.jsp"/> Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/studySearch.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/studySearch.jsp 2012-02-20 19:35:10 UTC (rev 1075) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/studySearch.jsp 2012-02-20 20:32:40 UTC (rev 1076) @@ -10,10 +10,24 @@ <div id="s-clear"></div> +<script type="text/javascript"> + //<![CDATA[ + // These are the mappings from inferred search term types to search predicates for this scope + var predicates = { + 'integer' : [ 'tb.identifier.study', 'tb.identifier.study.tb1' ], + 'id' : [ 'tb.identifier.study', 'tb.identifier.study.tb1' ], + 'word' : [ 'tb.title.study', 'dcterms.contributor', 'dcterms.abstract', 'dcterms.bibliographicCitation', 'dcterms.subject' ], + 'doi' : [ 'prism.doi' ] + }; + + // purlBase is assigned in /common/search-nav.jsp + var phyloWSURI = purlBase + 'study/find?query='; + //]]> +</script> + <c:set var="searchType" value="study" scope="request"/> <jsp:include page="studyKeywordSearchForm.jsp"/> -<%-- <jsp:include page="studyTaxonLabelSearchForm.jsp"/> --%> <div id="s-clear"></div> Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp 2012-02-20 19:35:10 UTC (rev 1075) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp 2012-02-20 20:32:40 UTC (rev 1076) @@ -8,6 +8,21 @@ <div id="s-clear"></div> +<script type="text/javascript"> + //<![CDATA[ + // These are the mappings from inferred search term types to search predicates for this scope + var predicates = { + 'integer' : [ 'tb.identifier.ncbi', 'tb.identifier.ubio', 'tb.identifier.taxon', 'tb.identifier.taxon.tb1' ], + 'id' : [ 'tb.identifier.ncbi', 'tb.identifier.ubio', 'tb.identifier.taxon', 'tb.identifier.taxon.tb1' ], + 'word' : [ 'tb.title.taxon', 'tb.title.taxonLabel', 'tb.title.taxonVariant' ], + 'doi' : [ 'prism.doi' ] // this doesn't work yet, we have no search on doi + }; + + // purlBase is assigned in /common/search-nav.jsp + var phyloWSURI = purlBase + 'taxon/find?query='; + //]]> +</script> + <c:set var="searchType" value="taxon" scope="request"/> <jsp:include page="taxonSearchForm.jsp"/> Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeSearch.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeSearch.jsp 2012-02-20 19:35:10 UTC (rev 1075) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeSearch.jsp 2012-02-20 20:32:40 UTC (rev 1076) @@ -10,13 +10,24 @@ <div id="s-clear"></div> +<script type="text/javascript"> + //<![CDATA[ + // These are the mappings from inferred search term types to search predicates for this scope + var predicates = { + 'integer' : [ 'tb.identifier.tree', 'tb.ntax.tree' ], + 'id' : [ 'tb.identifier.tree' ], + 'word' : [ 'tb.title.tree', 'tb.type.tree', 'tb.kind.tree', 'tb.quality.tree' ], + }; + + // purlBase is assigned in /common/search-nav.jsp + var phyloWSURI = purlBase + 'tree/find?query='; + //]]> +</script> + <jsp:include page="treeSimpleSearchForm.jsp"/> <c:set var="searchType" value="tree" scope="request"/> - -<%-- <jsp:include page="studyTaxonLabelSearchForm.jsp"/> --%> - <div id="s-clear"></div> <jsp:include page="searchMessages.jsp"/> Modified: trunk/treebase-web/src/main/webapp/common/search-nav.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/common/search-nav.jsp 2012-02-20 19:35:10 UTC (rev 1075) +++ trunk/treebase-web/src/main/webapp/common/search-nav.jsp 2012-02-20 20:32:40 UTC (rev 1076) @@ -6,6 +6,10 @@ <% String purlBase = TreebaseUtil.getPurlBase(); %> +<script type="text/javascript"> + var purlBase = '<%= purlBase %>'; +</script> + <% Calendar cal = Calendar.getInstance(); cal.add(Calendar.MONTH, -6); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |