From 1a6f6596636aa6d45ede73816851f02c20534881 Mon Sep 17 00:00:00 2001 From: MichaelDaum Date: Mon, 13 Aug 2018 12:11:39 +0200 Subject: [PATCH] Item14745:Item14746: - new alphabetical navigation for wiki users - fixed searching for summary - replaced jquery.scrollto with native scroll api - make number of items suggested configurable in jquery.autosuggest drop-down box --- .gitignore | 2 +- Makefile | 19 --- data/System/SolrPlugin.txt | 4 + data/System/SolrSearchBaseTemplate.txt | 126 +++++++++--------- data/System/SolrWikiUsersViewTemplate.txt | 13 +- lib/Foswiki/Plugins/SolrPlugin.pm | 4 +- lib/Foswiki/Plugins/SolrPlugin/Autosuggest.pm | 2 +- lib/Foswiki/Plugins/SolrPlugin/MANIFEST | 4 + lib/Makefile | 19 +++ pub/System/SolrPlugin/Makefile | 1 + .../SolrPlugin/ajax-solr-init.uncompressed.js | 1 + .../ajax-solr-widgets.uncompressed.js | 114 ++++++++++++++-- .../jquery.autosuggest.uncompressed.js | 49 ++++--- .../SolrPlugin/solr-searchbox.uncompressed.js | 20 ++- .../SolrPlugin/solrplugin.uncompressed.css | 8 +- .../AbstractJQueryFacetWidget.uncompressed.js | 2 +- .../widgets/AlphaPagerWidget.uncompressed.js | 42 ++++-- .../widgets/HierarchyWidget.uncompressed.js | 10 +- .../widgets/PagerWidget.uncompressed.js | 8 +- .../widgets/ResultWidget.uncompressed.js | 23 +++- .../SolrPlugin/wikiusers.uncompressed.css | 1 + .../foswiki_configs/conf/schema.xml | 1 + .../foswiki_configs/conf/solrconfig.xml | 4 + tools/solrjob | 2 +- 24 files changed, 316 insertions(+), 163 deletions(-) delete mode 100644 Makefile create mode 100644 lib/Makefile diff --git a/.gitignore b/.gitignore index d3e21e9..ad916ed 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,6 @@ pub/System/SolrPlugin/ajax-solr-helpers.js pub/System/SolrPlugin/ajax-solr/README.md pub/System/SolrPlugin/ajax-solr/Rakefile genpdf_* -/webservice-solr +lib/webservice-solr pub/System/SolrPlugin/ajax-solr.evolvingweb locale/**/*.mo diff --git a/Makefile b/Makefile deleted file mode 100644 index 4f8e7ca..0000000 --- a/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -WEBSERVICE_SOURCES= \ - lib/WebService/Solr.pm \ - lib/WebService/Solr/Document.pm \ - lib/WebService/Solr/Field.pm \ - lib/WebService/Solr/Query.pm \ - lib/WebService/Solr/Response.pm - -all: $(WEBSERVICE_SOURCES) - -git: - git clone https://github.com/ilmari/webservice-solr.git - -ifneq (,$(wildcard webservice-solr)) -lib/WebService/%: webservice-solr/lib/WebService/% - cp $^ $@ -lib/WebService/Solr/%: webservice-solr/lib/WebService/Solr/% - cp $^ $@ -endif - diff --git a/data/System/SolrPlugin.txt b/data/System/SolrPlugin.txt index b704a78..d00a6f3 100644 --- a/data/System/SolrPlugin.txt +++ b/data/System/SolrPlugin.txt @@ -873,6 +873,10 @@ specific search applications. The destination fields are then analysed using the ---++ Change History %TABLE{columnwidths="7em" tablewidth="100%"}% +| 13 Aug 2018: | new alphabetical navigation for wiki users; \ + fixed searching for summary; \ + replaced jquery.scrollto with native scroll api; \ + make number of items suggested configurable in jquery.autosuggest drop-down box | | 07 Jun 2018: | new index fields =author_title=, =createauthor_title=, =title_first_letter=; \ added support indexing arbitrary [[Foswiki:Extensions/MetaDataPlugin][meta data]]; \ added support for [[Foswiki:Extensions/ListyPlugin][ListyPlugin]]; \ diff --git a/data/System/SolrSearchBaseTemplate.txt b/data/System/SolrSearchBaseTemplate.txt index 0e64c1c..855bc73 100644 --- a/data/System/SolrSearchBaseTemplate.txt +++ b/data/System/SolrSearchBaseTemplate.txt @@ -1,4 +1,4 @@ -%META:TOPICINFO{author="ProjectContributor" comment="" date="1528368504" format="1.1" version="1"}% +%META:TOPICINFO{author="micha" comment="" date="1532014702" format="1.1" version="2"}% %META:TOPICPARENT{name="SolrPlugin"}% %{}% %{ ########################################################################### @@ -30,14 +30,14 @@ }% %TMPL:DEF{"content"}% -%TMPL:P{"solr::templates"}% -%TMPL:P{"solr::dictionary"}% +%TMPL:P{"solr::templates"}%%{}% +%TMPL:P{"solr::dictionary"}%%{}% %TMPL:END% %{}% @@ -45,19 +45,17 @@ %{ ########################################################################### solr::assets - css and js to be added to the html head }% -%TMPL:DEF{"solr::assets"}% -%JQREQUIRE{"livequery,focus, serialpager, scrollto, photoswipe, render, jqtwisty, moment, blockui, imagetooltip" warn="off"}% +%TMPL:DEF{"solr::assets"}%%JQREQUIRE{"livequery,focus, serialpager, photoswipe, render, jqtwisty, moment, blockui, imagetooltip" warn="off"}%%{}% %ADDTOZONE{"script" id="SOLRPLUGIN::AJAX" requires="JQUERYPLUGIN::LIVEQUERY, JQUERYPLUGIN::BLOCKUI, JQUERYPLUGIN::MOMENT" text=" " -}% -%ADDTOZONE{"head" +}%%ADDTOZONE{"head" id="SOLRPLUGIN" text="" -}%%TMPL:END% +}%%TMPL:END% %{}% %{}% @@ -122,7 +120,7 @@ %{ ########################################################################### solr::templates - defines all jquery.tmpl templates required }% -%TMPL:DEF{"solr::templates"}% +%TMPL:DEF{"solr::templates"}%%{}% %TMPL:P{"solr::templates::hits"}% %TMPL:P{"solr::templates::facetfield"}% %TMPL:P{"solr::templates::currentselection"}% @@ -132,7 +130,7 @@ %TMPL:P{"solr::templates::hierarchy"}% %TMPL:P{"solr::templates::resultsperpage"}% %TMPL:P{"solr::templates::spellcorrection"}% -%TMPL:END% +%{}%%TMPL:END% %{}% %{}% @@ -141,13 +139,13 @@ of different types. each type has got a ...:: sup-template that is customized to that type. }% -%TMPL:DEF{"solr::templates::hits"}% -%TMPL:P{"solr::templates::hits::topic"}% -%TMPL:P{"solr::templates::hits::image"}% -%TMPL:P{"solr::templates::hits::comment"}% -%TMPL:P{"solr::templates::hits::listy"}% -%TMPL:P{"solr::templates::hits::misc"}% -%TMPL:P{"solr::templates::hits::ClassifiedTopic"}% +%TMPL:DEF{"solr::templates::hits"}%%{}% +%TMPL:P{"solr::templates::hits::topic"}%%{}% +%TMPL:P{"solr::templates::hits::image"}%%{}% +%TMPL:P{"solr::templates::hits::comment"}%%{}% +%TMPL:P{"solr::templates::hits::listy"}%%{}% +%TMPL:P{"solr::templates::hits::misc"}%%{}% +%TMPL:P{"solr::templates::hits::ClassifiedTopic"}%%{}% %TMPL:END% @@ -175,6 +173,7 @@ %MAKETEXT{"in [_1]" args="{{:container_title}}"}% +
{{:summary}}
{{:~formatDate(date,'%TMPL:P{"solr::dateformat"}%')}}, {{:author_title}}
@@ -201,6 +200,7 @@ %MAKETEXT{"in [_1]" args="{{:container_title}}"}% +
{{:summary}}
{{:~formatDate(date,'%TMPL:P{"solr::dateformat"}%')}}, {{:author_title}}
@@ -227,6 +227,7 @@ %MAKETEXT{"in [_1]" args="{{:container_title}}"}% +
{{:summary}}
{{:~formatDate(date,'%TMPL:P{"solr::dateformat"}%')}}, {{:author_title}}
@@ -244,6 +245,7 @@ %MAKETEXT{"in [_1]" args="{{:container_title}}"}% +
{{:summary}}
{{:~formatDate(date,'%TMPL:P{"solr::dateformat"}%')}}, {{:author_title}}
@@ -264,6 +266,7 @@ %MAKETEXT{"in [_1]" args="{{:container_title}}"}% +
{{:summary}}
{{:~formatDate(date,'%TMPL:P{"solr::dateformat"}%')}}, {{:author_title}}
@@ -274,7 +277,6 @@ %TMPL:END% %{
}% - %{}% %TMPL:DEF{"solr::templates::hits::misc"}%