1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-11-02 16:23:04 +00:00

fixed #410 advanced search for publishing date

fixed misstyping in italian language
removed next to "me" after login
This commit is contained in:
OzzieIsaacs
2018-04-01 19:31:41 +02:00
parent 6a2449ffaf
commit 62f7674761
14 changed files with 1051 additions and 741 deletions

View File

@@ -29,6 +29,40 @@ if ($("#description").length) {
}
}
if (!Modernizr.inputtypes.date) {
$("#Publishstart").datepicker({
format: "yyyy-mm-dd",
language: language
}).on("change", function () {
// Show localized date over top of the standard YYYY-MM-DD date
var pubDate;
var results = /(\d{4})[-\/\\](\d{1,2})[-\/\\](\d{1,2})/.exec(this.value); // YYYY-MM-DD
if (results) {
pubDate = new Date(results[1], parseInt(results[2], 10) - 1, results[3]) || new Date(this.value);
$("#fake_Publishstart")
.val(pubDate.toLocaleDateString(language))
.removeClass("hidden");
}
}).trigger("change");
}
if (!Modernizr.inputtypes.date) {
$("#Publishend").datepicker({
format: "yyyy-mm-dd",
language: language
}).on("change", function () {
// Show localized date over top of the standard YYYY-MM-DD date
var pubDate;
var results = /(\d{4})[-\/\\](\d{1,2})[-\/\\](\d{1,2})/.exec(this.value); // YYYY-MM-DD
if (results) {
pubDate = new Date(results[1], parseInt(results[2], 10) - 1, results[3]) || new Date(this.value);
$("#fake_Publishend")
.val(pubDate.toLocaleDateString(language))
.removeClass("hidden");
}
}).trigger("change");
}
/*
Takes a prefix, query typeahead callback, Bloodhound typeahead adapter
and returns the completions it gets from the bloodhound engine prefixed.