From fc01b1db8145c35cd4acf3e0e3d16105cf47fa6f Mon Sep 17 00:00:00 2001 From: Jason Ye Date: Fri, 6 Oct 2017 10:15:44 -0400 Subject: [PATCH] Search for database with autocomplete --- static/css/app.css | 17 +++++++++- static/index.html | 9 +++-- static/js/app.js | 48 +++++++++++++++++---------- static/js/bootstrap3-typeahead.min.js | 1 + 4 files changed, 52 insertions(+), 23 deletions(-) create mode 100644 static/js/bootstrap3-typeahead.min.js diff --git a/static/css/app.css b/static/css/app.css index e0bcf69..5e2d98d 100644 --- a/static/css/app.css +++ b/static/css/app.css @@ -101,7 +101,8 @@ top: 18px; } -#sidebar span.current-database { +#sidebar span.current-database, +#sidebar input.typeahead { margin-left: 30px; display: inline-block; width: 200px; @@ -111,6 +112,20 @@ text-overflow: ellipsis; } +#sidebar input.typeahead { + display: none; + width: 160px; + height: 22px; + color: black; + font-weight: normal; +} + +#sidebar ul.typeahead { + margin-left: 30px; + overflow-y: auto; + max-height: 300px; +} + #sidebar div.tables-list { position: absolute; right: 0; diff --git a/static/index.html b/static/index.html index e132cee..78c543c 100644 --- a/static/index.html +++ b/static/index.html @@ -14,7 +14,8 @@ - + +
@@ -38,8 +39,9 @@