Fixed alphabetical order in list and grid view

Completed download section
This commit is contained in:
Ozzie Isaacs
2021-03-21 19:31:32 +01:00
parent 9864d932e0
commit 4664b47851
6 changed files with 52 additions and 19 deletions
+8
View File
@@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var direction = $("#asc").data('order'); // 0=Descending order; 1= ascending order
var $list = $("#list").isotope({
itemSelector: ".book",
layoutMode: "fitRows",
@@ -24,6 +26,9 @@ var $list = $("#list").isotope({
});
$("#desc").click(function() {
if (direction === 0) {
return;
}
var page = $(this).data("id");
$.ajax({
method:"post",
@@ -39,6 +44,9 @@ $("#desc").click(function() {
});
$("#asc").click(function() {
if (direction === 1) {
return;
}
var page = $(this).data("id");
$.ajax({
method:"post",
+1 -1
View File
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var direction = 0; // Descending order
var direction = $("#asc").data('order'); // 0=Descending order; 1= ascending order
var sort = 0; // Show sorted entries
$("#sort_name").click(function() {