diff options
author | Florian Pritz <bluewind@xinu.at> | 2016-07-12 22:59:34 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2016-07-12 22:59:34 +0200 |
commit | 31237d19eb2b1b96aeadcfe421f243bc80e59d4c (patch) | |
tree | f0808d48a2d430e03f60d2c26594b77455c66198 | |
parent | 7152d805a919880860c86378c8f26ca7d82f4f51 (diff) |
Focus first input when clicking login button in nvaigation
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | public_html/data/js/application.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/public_html/data/js/application.js b/public_html/data/js/application.js index 50968fa41..674f68008 100644 --- a/public_html/data/js/application.js +++ b/public_html/data/js/application.js @@ -53,6 +53,7 @@ define( this.setupLazyLoadingImages(); this.setupTableRangeSelect(); this.setupAsciinema(); + this.focusLoginFormOnClick(); }, setupTableRangeSelect: function () { @@ -109,7 +110,15 @@ define( item = $(item); asciinema.player.js.CreatePlayer(item.attr("id"), item.data("url")); }); - } + }, + + focusLoginFormOnClick: function () { + $('.dropdown-toggle').on('click', function (e) { + setTimeout(function() { + $(e.target).parent().find(".dropdown-menu input.form-control").first().focus(); + }, 0); + }); + }, }; return App; |