From 283cd36db8810be5718b05e8f69a1c152350f371 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 23 Sep 2013 22:27:51 -0700 Subject: [PATCH] Moved search hotkey to search.js --- UI/Navbar/Search.js | 11 +++++++++++ UI/app.js | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/UI/Navbar/Search.js b/UI/Navbar/Search.js index 3391f9320..4e0e3b7d5 100644 --- a/UI/Navbar/Search.js +++ b/UI/Navbar/Search.js @@ -4,6 +4,17 @@ define( 'app', 'Series/SeriesCollection' ], function (App, SeriesCollection) { + $(document).on('keydown', function (e){ + if ($(e.target).is('input')) { + return; + } + + if (e.keyCode === 84) { + $('.x-series-search').focus(); + e.preventDefault(); + } + }); + $.fn.bindSearch = function () { $(this).typeahead({ source : function () { diff --git a/UI/app.js b/UI/app.js index d726c0830..8f64f4790 100644 --- a/UI/app.js +++ b/UI/app.js @@ -230,16 +230,5 @@ define( 'jQuery/TooltipBinder' ]); - $(document).on('keydown', function (e){ - if ($(e.target).is('input')) { - return; - } - - if (e.keyCode === 84) { - $('.x-series-search').focus(); - e.preventDefault(); - } - }); - return app; });