diff options
author | Andrew Dolgov <[email protected]> | 2017-02-28 09:17:27 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-02-28 09:17:27 +0300 |
commit | 27ef6e89501371b58b92a3b805ab31ba8fc79260 (patch) | |
tree | fea8f3daece8b5e30218497362051cae79fda456 /offline.html | |
parent | 16d52ac49f7318620d3a84e172cf18917d70de1b (diff) |
fix .urlParam(); make offline search/reset work similarly to online version
Diffstat (limited to 'offline.html')
-rw-r--r-- | offline.html | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/offline.html b/offline.html index 0062518..d3fa1d5 100644 --- a/offline.html +++ b/offline.html @@ -45,7 +45,7 @@ <button type="submit" onclick="offline_clear()" class="btn btn-danger">Remove all</button> </form> - <form onsubmit="return offline_search(this)" class="navbar-form navbar-right"> + <form class="navbar-form navbar-right"> <input type="text" class="form-control search_query" name="query" class="form-control" value=""> <button type="submit" class="btn btn-default">Search</button> @@ -67,12 +67,14 @@ }); } - localforage.getItem("epube.search-query").then(function(query) { + var query = $.urlParam("query"); - if (query) $(".search_query").val(query); + console.log(query); - populate_list(); - }); + if (query) + $(".search_query").val(query); + + populate_list(); }); </script> |