1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-12-06 00:08:06 +00:00

Some code cosmetics

This commit is contained in:
Ozzie Isaacs
2021-03-14 15:06:09 +01:00
parent 4df443e007
commit 8c751eb532
8 changed files with 57 additions and 54 deletions

View File

@@ -36,7 +36,6 @@ $("#desc").click(function() {
sortBy: "name",
sortAscending: true
});
return;
});
$("#asc").click(function() {
@@ -52,19 +51,20 @@ $("#asc").click(function() {
sortBy: "name",
sortAscending: false
});
return;
});
$("#all").click(function() {
// go through all elements and make them visible
$list.isotope({ filter: function() {
return true;
} })
return true;
}
});
});
$(".char").click(function() {
var character = this.innerText;
$list.isotope({ filter: function() {
return this.attributes["data-id"].value.charAt(0).toUpperCase() == character;
} })
return this.attributes["data-id"].value.charAt(0).toUpperCase() == character;
}
});
});

View File

@@ -138,8 +138,8 @@ $(function () {
seriesTitle = result.series.title;
}
var dateFomers = result.pubdate.split("-");
var publishedYear = parseInt(dateFomers[0]);
var publishedMonth = parseInt(dateFomers[1]);
var publishedYear = parseInt(dateFomers[0], 10);
var publishedMonth = parseInt(dateFomers[1], 10);
var publishedDate = new Date(publishedYear, publishedMonth - 1, 1);
publishedDate = formatDate(publishedDate);
@@ -194,8 +194,8 @@ $(function () {
} else {
dateFomers = result.date_added.split("-");
}
var publishedYear = parseInt(dateFomers[0]);
var publishedMonth = parseInt(dateFomers[1]);
var publishedYear = parseInt(dateFomers[0], 10);
var publishedMonth = parseInt(dateFomers[1], 10);
var publishedDate = new Date(publishedYear, publishedMonth - 1, 1);
publishedDate = formatDate(publishedDate);