[Rt-commit] rt branch 5.0/menu-search-autocomplete created. rt-5.0.2-115-g7d6b6c154f

BPS Git Server git at git.bestpractical.com
Thu Apr 7 21:04:45 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/menu-search-autocomplete has been created
        at  7d6b6c154f612140b3c661e428d24dde7ed32bb6 (commit)

- Log -----------------------------------------------------------------
commit 7d6b6c154f612140b3c661e428d24dde7ed32bb6
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Apr 8 04:49:38 2022 +0800

    Add autocomplete feature for ticket/article/asset search in top menu
    
    If user clicks one item on autocomplete list, it will redirect to the
    corresponding ticket/article/asset display page.

diff --git a/share/html/Articles/Elements/GotoArticle b/share/html/Articles/Elements/GotoArticle
index b71b70e920..ec37c9139a 100644
--- a/share/html/Articles/Elements/GotoArticle
+++ b/share/html/Articles/Elements/GotoArticle
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <form action="<% RT->Config->Get('WebPath') %>/Articles/Article/Search.html" class="article-search">
   <input type="hidden" name="HideOptions" value="1" />
-  <input name="q" accesskey="0" class="field form-control" placeholder="<&|/l&>Search Articles</&>..." type="search" results="5" autosave="search-articles" />
+  <input name="q" accesskey="0" class="field form-control" placeholder="<&|/l&>Search Articles</&>..." type="search" results="5" autosave="search-articles"  data-autocomplete="Articles" data-autocomplete-return="id" data-autocomplete-autosubmit="1" />
 % if ($class or $topic) {
 <input type="hidden" name="ExpandTopics" value="1" />
 <select name="Topics">
diff --git a/share/html/Asset/Elements/Search b/share/html/Asset/Elements/Search
index 0ad507627a..190bc2645b 100644
--- a/share/html/Asset/Elements/Search
+++ b/share/html/Asset/Elements/Search
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <form action="<% RT->Config->Get('WebPath') %>/Asset/Search/" class="asset-search">
-  <input name="q" accesskey="0" class="field form-control" value="<% $value %>" placeholder="<&|/l&>Search Assets</&>..." type="search" results="5" autosave="search-assets" />
+  <input name="q" accesskey="0" class="field form-control" value="<% $value %>" placeholder="<&|/l&>Search Assets</&>..." type="search" results="5" autosave="search-assets"  data-autocomplete="Assets" data-autocomplete-return="id" data-autocomplete-autosubmit="1" />
 </form>
 <%init>
 my $value = defined $DECODED_ARGS->{q} ? $DECODED_ARGS->{q} : '';
diff --git a/share/html/Elements/SimpleSearch b/share/html/Elements/SimpleSearch
index 1fd687a18b..4b32f64a6c 100644
--- a/share/html/Elements/SimpleSearch
+++ b/share/html/Elements/SimpleSearch
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <form action="<% RT->Config->Get('WebPath') %><% $SendTo %>" id="simple-search">
-  <input name="q" accesskey="0" class="field form-control" value="<% $value %>" placeholder="<% $Placeholder %>..." type="search" results=5 autosave="simple-search" />
+  <input name="q" accesskey="0" class="field form-control" value="<% $value %>" placeholder="<% $Placeholder %>..." type="search" results=5 autosave="simple-search" data-autocomplete="Tickets" data-autocomplete-return="id" data-autocomplete-autosubmit="1" />
 </form>
 <%init>
 my $value = defined $DECODED_ARGS->{q} ? $DECODED_ARGS->{q} : '';

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list