[aur-dev] [PATCH] Go to package when selecting a typeahead suggestion

Connor Behan connor.behan at gmail.com
Fri Jan 3 13:09:45 EST 2014


On 01/01/14 03:52 PM, Lukas Fleisher wrote:
> Directly jump to the package details when selecting an entry from the
> drop-down list.
>
> Implements FS#34471.
>
> Signed-off-by: Lukas Fleischer <archlinux at cryptocrack.de>
> ---
>  web/html/home.php | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/web/html/home.php b/web/html/home.php
> index ddbb0fd..e80efaa 100644
> --- a/web/html/home.php
> +++ b/web/html/home.php
> @@ -118,7 +118,11 @@ $(document).ready(function() {
>          matcher: function(item) { return true; },
>          sorter: function(items) { return items; },
>          menu: '<ul class="pkgsearch-typeahead"></ul>',
> -        items: 20
> +        items: 20,
> +        updater: function(item) {
> +            document.location = '/packages/' + item;
> +            return item;
> +	}
>      }).attr('autocomplete', 'off');
>  });
>  </script>
> -- 1.8.5.2
Would this apply to the package search on archlinux.org as well as
aur.archlinux.org? The main argument for disabling suggestions
altogether is that a native text entry (from an HTML input tag) spawns a
non-native suggestion widget. I know this cannot be helped until search
suggestions become a web standard, but people still might think it looks
tacky.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/aur-dev/attachments/20140103/d554e6b7/attachment.asc>


More information about the aur-dev mailing list