diff --git a/cps/static/js/filter_grid.js b/cps/static/js/filter_grid.js index 7043131a..d84cf57a 100644 --- a/cps/static/js/filter_grid.js +++ b/cps/static/js/filter_grid.js @@ -21,10 +21,11 @@ var $list = $("#list").isotope({ itemSelector: ".book", layoutMode: "fitRows", getSortData: { - title: ".title", - } + title: ".title" + }, }); + $("#desc").click(function() { if (direction === 0) { return; @@ -37,9 +38,10 @@ $("#desc").click(function() { url: getPath() + "/ajax/view", data: "{\"" + page + "\": {\"dir\": \"desc\"}}", }); + // invert sorting order to make already inverted start order working $list.isotope({ sortBy: "name", - sortAscending: true + sortAscending: !$list.data('isotope').options.sortAscending }); direction = 0; }); @@ -58,7 +60,7 @@ $("#asc").click(function() { }); $list.isotope({ sortBy: "name", - sortAscending: false + sortAscending: !$list.data('isotope').options.sortAscending }); direction = 1; }); diff --git a/cps/templates/author.html b/cps/templates/author.html index d82b2ebd..4ae2df42 100644 --- a/cps/templates/author.html +++ b/cps/templates/author.html @@ -22,7 +22,7 @@ {% if author is not none %}

{{_("In Library")}}

{% endif %} -