Merge branch 'master' of https://github.com/janeczku/calibre-web
This commit is contained in:
commit
82164fc8e7
|
@ -34,13 +34,14 @@ $("#desc").click(function() {
|
|||
method:"post",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
url: window.location.pathname + "/../../ajax/view",
|
||||
url: getPath() + "/ajax/view",
|
||||
data: "{\"" + page + "\": {\"dir\": \"desc\"}}",
|
||||
});
|
||||
$list.isotope({
|
||||
sortBy: "name",
|
||||
sortAscending: true
|
||||
});
|
||||
direction = 0;
|
||||
});
|
||||
|
||||
$("#asc").click(function() {
|
||||
|
@ -52,13 +53,14 @@ $("#asc").click(function() {
|
|||
method:"post",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
url: window.location.pathname + "/../../ajax/view",
|
||||
url: getPath() + "/ajax/view",
|
||||
data: "{\"" + page + "\": {\"dir\": \"asc\"}}",
|
||||
});
|
||||
$list.isotope({
|
||||
sortBy: "name",
|
||||
sortAscending: false
|
||||
});
|
||||
direction = 1;
|
||||
});
|
||||
|
||||
$("#all").click(function() {
|
||||
|
|
|
@ -73,7 +73,7 @@ $("#desc").click(function() {
|
|||
method:"post",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
url: window.location.pathname + "/../../ajax/view",
|
||||
url: getPath() + "/ajax/view",
|
||||
data: "{\"" + page + "\": {\"dir\": \"desc\"}}",
|
||||
});
|
||||
var index = 0;
|
||||
|
@ -121,7 +121,7 @@ $("#asc").click(function() {
|
|||
method:"post",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
url: window.location.pathname + "/../../ajax/view",
|
||||
url: getPath() + "/ajax/view",
|
||||
data: "{\"" + page + "\": {\"dir\": \"asc\"}}",
|
||||
});
|
||||
var index = 0;
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<button id="sort_name" class="btn btn-primary"><b>B,A <-> A B</b></button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<button id="asc" data-id="series" class="btn btn-primary"><span class="glyphicon glyphicon-sort-by-alphabet"></span></button>
|
||||
<button id="desc" data-id="series" data-order="{{ order }}" class="btn btn-primary"><span class="glyphicon glyphicon-sort-by-alphabet-alt"></span></button>
|
||||
<button id="asc" data-id="series" data-order="{{ order }}" class="btn btn-primary"><span class="glyphicon glyphicon-sort-by-alphabet"></span></button>
|
||||
<button id="desc" data-id="series" class="btn btn-primary"><span class="glyphicon glyphicon-sort-by-alphabet-alt"></span></button>
|
||||
{% if charlist|length %}
|
||||
<button id="all" class="btn btn-primary">{{_('All')}}</button>
|
||||
{% endif %}
|
||||
|
|
|
@ -210,7 +210,7 @@ def toggle_archived(book_id):
|
|||
@web.route("/ajax/view", methods=["POST"])
|
||||
@login_required_if_no_ano
|
||||
def update_view():
|
||||
to_save = request.form.to_dict() # request.get_json()
|
||||
to_save = request.get_json()
|
||||
try:
|
||||
for element in to_save:
|
||||
for param in to_save[element]:
|
||||
|
@ -927,7 +927,7 @@ def series_list():
|
|||
.join(db.books_series_link).join(db.Books).filter(calibre_db.common_filters()) \
|
||||
.group_by(func.upper(func.substr(db.Series.sort, 1, 1))).all()
|
||||
return render_title_template('list.html', entries=entries, folder='web.books_list', charlist=charlist,
|
||||
title=_(u"Series"), page="serieslist", data="series")
|
||||
title=_(u"Series"), page="serieslist", data="series", order=order_no)
|
||||
else:
|
||||
entries = calibre_db.session.query(db.Books, func.count('books_series_link').label('count')) \
|
||||
.join(db.books_series_link).join(db.Series).filter(calibre_db.common_filters()) \
|
||||
|
|
Loading…
Reference in New Issue
Block a user