From 24ce67b4ff93790da27ac097a5053ffd69825781 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sun, 30 Nov 2014 00:22:14 +0100 Subject: [PATCH] Added auto completion to tag list presenter --- public_html/js/Presenters/TagListPresenter.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/public_html/js/Presenters/TagListPresenter.js b/public_html/js/Presenters/TagListPresenter.js index a0370ecd..5114e292 100644 --- a/public_html/js/Presenters/TagListPresenter.js +++ b/public_html/js/Presenters/TagListPresenter.js @@ -10,8 +10,6 @@ App.Presenters.TagListPresenter = function( pagerPresenter, topNavigationPresenter) { - var KEY_RETURN = 13; - var $el = jQuery('#content'); var $searchInput; var templates = {}; @@ -78,8 +76,8 @@ App.Presenters.TagListPresenter = function( function render() { $el.html(templates.list()); $searchInput = $el.find('input[name=query]'); - $searchInput.keydown(searchInputKeyPressed); $el.find('form').submit(searchFormSubmitted); + App.Controls.AutoCompleteInput($searchInput); softRender(); } @@ -88,13 +86,6 @@ App.Presenters.TagListPresenter = function( } - function searchInputKeyPressed(e) { - if (e.which !== KEY_RETURN) { - return; - } - updateSearch(); - } - function searchFormSubmitted(e) { e.preventDefault(); updateSearch();