mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
merge from trunk
This commit is contained in:
commit
264c7948b2
@ -190,6 +190,10 @@ h2.library_name {
|
|||||||
padding: 0.75em;
|
padding: 0.75em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
border-radius: 15px;
|
||||||
|
-moz-border-radius: 15px;
|
||||||
|
-webkit-border-radius: 15px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.toplevel li:hover {
|
.toplevel li:hover {
|
||||||
@ -206,30 +210,38 @@ h2.library_name {
|
|||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/* Category {{{ */
|
/* Category {{{ */
|
||||||
.category ul {
|
.category > div.category-container {
|
||||||
list-style-type: none;
|
width: 100%;
|
||||||
margin: 0;
|
margin-top: 1ex;
|
||||||
padding: 0;
|
margin-bottom: 1ex;
|
||||||
|
display: table;
|
||||||
}
|
}
|
||||||
|
|
||||||
.category li.category-item {
|
.category div.category-item {
|
||||||
margin: 0.75em;
|
display: table-row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.category div.category-item > div {
|
||||||
padding: 0.75em;
|
padding: 0.75em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
display: table-cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
.category li.category-item:hover {
|
.category div.category-name { font-weight: bold }
|
||||||
|
|
||||||
|
.category div.category-item:hover > div {
|
||||||
background-color: #d6d3c9;
|
background-color: #d6d3c9;
|
||||||
font-weight: bold;
|
|
||||||
-moz-box-shadow: 5px 5px 5px #ccc;
|
-moz-box-shadow: 5px 5px 5px #ccc;
|
||||||
-webkit-box-shadow: 5px 5px 5px #ccc;
|
-webkit-box-shadow: 5px 5px 5px #ccc;
|
||||||
box-shadow: 5px 5px 5px #ccc;
|
box-shadow: 5px 5px 5px #ccc;
|
||||||
|
border-radius: 15px;
|
||||||
|
-moz-border-radius: 15px;
|
||||||
|
-webkit-border-radius: 15px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.category li.category-item h4 { display: inline }
|
.category div.category-item span.href { display: none }
|
||||||
.category li.category-item span.href { display: none }
|
|
||||||
|
|
||||||
#groups span.load_href { display: none }
|
#groups span.load_href { display: none }
|
||||||
|
|
||||||
|
@ -77,8 +77,6 @@ function init() {
|
|||||||
function toplevel() {
|
function toplevel() {
|
||||||
$(".sort_select").hide();
|
$(".sort_select").hide();
|
||||||
|
|
||||||
$(".toplevel li").corner("15px");
|
|
||||||
|
|
||||||
$(".toplevel li").click(function() {
|
$(".toplevel li").click(function() {
|
||||||
var href = $(this).children("span").html();
|
var href = $(this).children("span").html();
|
||||||
window.location = href;
|
window.location = href;
|
||||||
@ -92,10 +90,8 @@ function render_error(msg) {
|
|||||||
|
|
||||||
// Category feed {{{
|
// Category feed {{{
|
||||||
function category() {
|
function category() {
|
||||||
$(".category li").corner("15px");
|
$(".category .category-item").click(function() {
|
||||||
|
var href = $(this).find("span.href").html();
|
||||||
$(".category li").click(function() {
|
|
||||||
var href = $(this).children("span.href").html();
|
|
||||||
window.location = href;
|
window.location = href;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -84,6 +84,7 @@ class TagsView(QTreeView): # {{{
|
|||||||
self.setAcceptDrops(True)
|
self.setAcceptDrops(True)
|
||||||
self.setDragDropMode(self.DropOnly)
|
self.setDragDropMode(self.DropOnly)
|
||||||
self.setDropIndicatorShown(True)
|
self.setDropIndicatorShown(True)
|
||||||
|
self.setAutoExpandDelay(500)
|
||||||
|
|
||||||
def set_database(self, db, tag_match, sort_by):
|
def set_database(self, db, tag_match, sort_by):
|
||||||
self.hidden_categories = config['tag_browser_hidden_categories']
|
self.hidden_categories = config['tag_browser_hidden_categories']
|
||||||
|
@ -731,8 +731,8 @@ def main(args=sys.argv):
|
|||||||
main.raise_()
|
main.raise_()
|
||||||
if opts.full_screen:
|
if opts.full_screen:
|
||||||
main.action_full_screen.trigger()
|
main.action_full_screen.trigger()
|
||||||
with main:
|
with main:
|
||||||
return app.exec_()
|
return app.exec_()
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -106,9 +106,10 @@ def render_rating(rating, container='span'): # {{{
|
|||||||
def get_category_items(category, items, db, datatype): # {{{
|
def get_category_items(category, items, db, datatype): # {{{
|
||||||
|
|
||||||
def item(i):
|
def item(i):
|
||||||
templ = (u'<li title="{4}" class="category-item">'
|
templ = (u'<div title="{4}" class="category-item">'
|
||||||
'<h4>{0} {1}</h4> {2}'
|
'<div class="category-name">{0}</div><div>{1}</div>'
|
||||||
'<span class="href">{3}</span></li>')
|
'<div>{2}'
|
||||||
|
'<span class="href">{3}</span></div></div>')
|
||||||
rating, rstring = render_rating(i.avg_rating)
|
rating, rstring = render_rating(i.avg_rating)
|
||||||
name = xml(i.name)
|
name = xml(i.name)
|
||||||
if datatype == 'rating':
|
if datatype == 'rating':
|
||||||
@ -125,7 +126,7 @@ def get_category_items(category, items, db, datatype): # {{{
|
|||||||
xml(desc), xml(quote(href)), rstring)
|
xml(desc), xml(quote(href)), rstring)
|
||||||
|
|
||||||
items = list(map(item, items))
|
items = list(map(item, items))
|
||||||
return '\n'.join(['<ul>'] + items + ['</ul>'])
|
return '\n'.join(['<div class="category-container">'] + items + ['</div>'])
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user