Commit b7535b95 authored by OzzieIsaacs's avatar OzzieIsaacs

Merging master branch

- fix title sort function
- fix focus on search
parents 0cf1cc55 098dab88
...@@ -449,7 +449,7 @@ class CalibreDB(threading.Thread): ...@@ -449,7 +449,7 @@ class CalibreDB(threading.Thread):
match = title_pat.search(title) match = title_pat.search(title)
if match: if match:
prep = match.group(1) prep = match.group(1)
title = title.replace(prep, '') + ', ' + prep title = title[len(prep):] + ', ' + prep
return title.strip() return title.strip()
conn = conn or self.session.connection().connection.connection conn = conn or self.session.connection().connection.connection
......
...@@ -228,7 +228,9 @@ ...@@ -228,7 +228,9 @@
$(document).ready(function() { $(document).ready(function() {
var inp = $('#query').first() var inp = $('#query').first()
var val = inp.val() var val = inp.val()
inp.val('').blur().focus().val(val) if (val.length) {
inp.val('').blur().focus().val(val)
}
}); });
}); });
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment