diff --git a/resources/content_server/browse/browse.css b/resources/content_server/browse/browse.css index 92ed4c3ce6..9a2125c0c0 100644 --- a/resources/content_server/browse/browse.css +++ b/resources/content_server/browse/browse.css @@ -208,6 +208,8 @@ h2.library_name { } +.toplevel li a { text-decoration: none; } + .toplevel li img { vertical-align: middle; margin-right: 1em; diff --git a/resources/content_server/browse/browse.js b/resources/content_server/browse/browse.js index 89ce679871..db4e602449 100644 --- a/resources/content_server/browse/browse.js +++ b/resources/content_server/browse/browse.js @@ -116,7 +116,7 @@ function toplevel() { $(".sort_select").hide(); $(".toplevel li").click(function() { - var href = $(this).children("span.url").text(); + var href = $(this).children("a").attr('href'); window.location = href; }); diff --git a/setup/server.py b/setup/server.py index 2103f4805a..d9c444fa55 100644 --- a/setup/server.py +++ b/setup/server.py @@ -24,6 +24,10 @@ class Server(Command): self.rebuild_monocole() p = subprocess.Popen(['calibre-server', '--develop'], stderr=subprocess.STDOUT, stdout=log) + time.sleep(0.2) + if p.poll() is not None: + print 'Starting server failed' + raise SystemExit(1) return p def run(self, opts): @@ -38,9 +42,11 @@ class Server(Command): try: raw_input('Press Enter to kill/restart server. Ctrl+C to quit: ') except: + if p.poll() is None: + p.kill() break else: - while p.returncode is None: + while p.poll() is None: p.terminate() time.sleep(0.1) p.kill() diff --git a/src/calibre/library/server/browse.py b/src/calibre/library/server/browse.py index 9c442acc11..935d472cb1 100644 --- a/src/calibre/library/server/browse.py +++ b/src/calibre/library/server/browse.py @@ -335,9 +335,10 @@ class BrowseServer(object): icon = 'blank.png' cats.append((meta['name'], category, icon)) - cats = [('
  • {0}' + cats = [('
  •  ' + '{0}' '{0}' - '{3}/browse/category/{1}
  • ') + '') .format(xml(x, True), xml(quote(y)), xml(_('Browse books by')), self.opts.url_prefix, src='/browse/icon/'+z) for x, y, z in cats]