diff --git a/src/archive.py b/src/archive.py index 77c9ed9..4d73ab6 100755 --- a/src/archive.py +++ b/src/archive.py @@ -18,7 +18,7 @@ def searchIA(title, author): except ValueError: return [] - rownum = results["responseHeader"]["params"]["rows"] + rownum = int(results["responseHeader"]["params"]["rows"]) if rownum < 1: print("Couldn't find results for %s %s" % (title, author)) return [] diff --git a/src/scripts/book.tag b/src/scripts/book.tag index 8565193..a40dcb0 100644 --- a/src/scripts/book.tag +++ b/src/scripts/book.tag @@ -1,35 +1,69 @@ -
+

-
-

+

-

+

-

+

Couldn't find anything, sorry :(

+ diff --git a/src/scripts/class.tag b/src/scripts/class.tag index 97adfde..6a79305 100644 --- a/src/scripts/class.tag +++ b/src/scripts/class.tag @@ -6,10 +6,10 @@
Running: { sem }
- -
+
Check back later, or verify the course has books

- + diff --git a/src/scripts/results.tag b/src/scripts/results.tag index 5f1d0d6..dcdaf4e 100644 --- a/src/scripts/results.tag +++ b/src/scripts/results.tag @@ -2,6 +2,10 @@
+ diff --git a/src/scripts/search.js b/src/scripts/search.js index 61c10b1..8b9f47f 100644 --- a/src/scripts/search.js +++ b/src/scripts/search.js @@ -1,47 +1,3 @@ -function makeResourceGetter(self) { - function getResources(ev) { - ev.preventDefault(); - self.loading = true; - self.update(); - var params = { - "title" : this.booktitle, - "author" : this.bookauthor - }; - var url = "/search/resources"; - - $.getJSON(url, { - data : JSON.stringify(params) - }).done(function(results) { - if (results.iarchive) { - self.iarchive = results.iarchive[0]; - } - - if (results.openlib) { - self.openlib = results.openlib[0]; - } - - if (!(results.openlib && results.iarchive)) { - self.noResources = true; - } - - self.update({"loading" : false}); - }); - } - return getResources; -} - -function makeShow(self) { - return function() { - if (!self.showBooks) { - self.showBooks = true; - } - else { - self.showBooks = false; - } - self.update(); - }; -} - function ResultsPasser() { riot.observable(this); return this; diff --git a/src/styles/search.scss b/src/styles/search.scss index dcdb1be..cc27e0d 100644 --- a/src/styles/search.scss +++ b/src/styles/search.scss @@ -83,8 +83,11 @@ a { margin-right: -15px; } -#title { +.title { font-weight: bolder; + @media (min-width: 480px) { + margin-left: 80px; + } } .ui-autocomplete { @@ -131,17 +134,9 @@ a { background-image: none; } -@media (min-width: 480px) { - .logo { +.logo { margin-top: 20px; margin-left: -175px; - } -} - -@media (min-width: 480px) { - .title { - margin-left: 80px; - } } .page-top { diff --git a/src/templates/search.html b/src/templates/search.html index ec799f4..9debd7c 100644 --- a/src/templates/search.html +++ b/src/templates/search.html @@ -41,7 +41,7 @@ {% block scripts %} {{super()}} - + diff --git a/src/website.py b/src/website.py index a54471c..bdbd64c 100755 --- a/src/website.py +++ b/src/website.py @@ -9,6 +9,8 @@ from search import searchTerms from openlibrary import bookUrls +from syslog import syslog + from archive import searchIA from urllib.parse import quote, unquote from json import dumps, loads @@ -102,7 +104,7 @@ def ClassSearch(configfile=None): """ Get Resources """ notRequired = False try: - params = loads(dict(request.args.items())["data"]) + params = loads(unquote(dict(request.args.items())["data"])) except KeyError: return dumps("false") print(params)