aboutsummaryrefslogtreecommitdiff
path: root/assets/js
diff options
context:
space:
mode:
authorjan <jan@ruken.pw>2015-12-30 15:49:59 (UTC)
committerjan <jan@ruken.pw>2015-12-30 15:49:59 (UTC)
commitee37b31502bc46527a5db51f73459f5f7946e1b2 (patch)
treee34ae3c9357ed536e1ab589483e999f8bf9d1df2 /assets/js
parentb203f34144896436db3925c63b3c91bda59f7e77 (diff)
hover für search-results. beim klicken auf ein gril wird ein request gestartet, fehlt nur noch die implementation, um ein gril zu einer liste hinzuzufügen.
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/list.js11
-rw-r--r--assets/js/search.js4
2 files changed, 15 insertions, 0 deletions
diff --git a/assets/js/list.js b/assets/js/list.js
new file mode 100644
index 0000000..3a58971
--- /dev/null
+++ b/assets/js/list.js
@@ -0,0 +1,11 @@
1function clickSearchResult(resId) {
2 var xhr = new XMLHttpRequest();
3 xhr.onreadystatechange = function() {
4 if (xhr.readyState == XMLHttpRequest.DONE) {
5 alert(xhr.status + ": " + xhr.response);
6 }
7 }
8 xhr.open('POST', window.location, true);
9 xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
10 xhr.send('id=' + resId);
11} \ No newline at end of file
diff --git a/assets/js/search.js b/assets/js/search.js
index 8dc95cb..edd181e 100644
--- a/assets/js/search.js
+++ b/assets/js/search.js
@@ -27,4 +27,8 @@ function doSearch() {
27 xhr.open('GET', '/search/gril_instant/' + value, true); 27 xhr.open('GET', '/search/gril_instant/' + value, true);
28 xhr.send(null); 28 xhr.send(null);
29 strokeTimeout = null; 29 strokeTimeout = null;
30}
31
32function clickSearchResult(resId) {
33
30} \ No newline at end of file 34} \ No newline at end of file