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
commitb4f682b53315a5c2e61d230014929fd1925c16fd (patch)
tree10473db043f493c492afa437a3d354090c2ba375 /static
parent54bd2b174508b10e7bbc2d505a65ea8e64b3c69a (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