summaryrefslogtreecommitdiffstats
path: root/static
diff options
context:
space:
mode:
authorHolger Levsen <holger@debian.org>2014-09-20 09:42:28 +0000
committerHolger Levsen <holger@debian.org>2014-09-20 09:42:28 +0000
commitdf2845f23362e72b8a1729713cd309297ca066e1 (patch)
tree9bd4dc924d10b72838a9a0ff1c141c317a680f03 /static
parent34683dd36e0d12ff4d8a8a5115f3765084a5fa4e (diff)
move javascript code into external file
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@28928 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'static')
-rw-r--r--static/script.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/static/script.js b/static/script.js
new file mode 100644
index 0000000000..62ec7ebf29
--- /dev/null
+++ b/static/script.js
@@ -0,0 +1,15 @@
+var old_query_value = "";
+function selectSearch() {
+document.searchForm.query.focus();
+}
+
+function onSearch(query) {
+if (old_query_value == "") {
+ if (query.length > 5) {
+ old_query_value = query;
+ document.searchForm.submit();
+ } else {
+ old_query_value = query;
+ }
+}
+}

© 2014-2024 Faster IT GmbH | imprint | privacy policy