diff options
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/css/search.css | 8 | ||||
| -rw-r--r-- | assets/js/list.js | 11 | ||||
| -rw-r--r-- | assets/js/search.js | 4 |
3 files changed, 23 insertions, 0 deletions
diff --git a/assets/css/search.css b/assets/css/search.css index 6bca026..e76a7d1 100644 --- a/assets/css/search.css +++ b/assets/css/search.css | |||
| @@ -5,4 +5,12 @@ | |||
| 5 | .search-results { | 5 | .search-results { |
| 6 | top: -50px; | 6 | top: -50px; |
| 7 | z-index: 2; | 7 | z-index: 2; |
| 8 | } | ||
| 9 | |||
| 10 | .collection > .collection-item { | ||
| 11 | transition: background-color .35s; | ||
| 12 | } | ||
| 13 | |||
| 14 | .collection > .collection-item:hover { | ||
| 15 | background-color: #e1bee7; | ||
| 8 | } \ No newline at end of file | 16 | } \ No newline at end of file |
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 @@ | |||
| 1 | function 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 | |||
| 32 | function clickSearchResult(resId) { | ||
| 33 | |||
| 30 | } \ No newline at end of file | 34 | } \ No newline at end of file |
