Merge remote-tracking branch 'douban/metadata_provider/douban'
# Conflicts: # cps/metadata_provider/amazon.py # cps/metadata_provider/lubimyczytac.py
This commit is contained in:
@@ -33,7 +33,7 @@ $(".datepicker").datepicker({
|
||||
if (results) {
|
||||
pubDate = new Date(results[1], parseInt(results[2], 10) - 1, results[3]) || new Date(this.value);
|
||||
$(this).next('input')
|
||||
.val(pubDate.toLocaleDateString(language))
|
||||
.val(pubDate.toLocaleDateString(language.replaceAll("_","-")))
|
||||
.removeClass("hidden");
|
||||
}
|
||||
}).trigger("change");
|
||||
|
||||
@@ -92,14 +92,19 @@ $(function () {
|
||||
data: {"query": keyword},
|
||||
dataType: "json",
|
||||
success: function success(data) {
|
||||
$("#meta-info").html("<ul id=\"book-list\" class=\"media-list\"></ul>");
|
||||
data.forEach(function(book) {
|
||||
var $book = $(templates.bookResult(book));
|
||||
$book.find("img").on("click", function () {
|
||||
populateForm(book);
|
||||
if (data.length) {
|
||||
$("#meta-info").html("<ul id=\"book-list\" class=\"media-list\"></ul>");
|
||||
data.forEach(function(book) {
|
||||
var $book = $(templates.bookResult(book));
|
||||
$book.find("img").on("click", function () {
|
||||
populateForm(book);
|
||||
});
|
||||
$("#book-list").append($book);
|
||||
});
|
||||
$("#book-list").append($book);
|
||||
});
|
||||
}
|
||||
else {
|
||||
$("#meta-info").html("<p class=\"text-danger\">" + msg.no_result + "!</p>" + $("#meta-info")[0].innerHTML)
|
||||
}
|
||||
},
|
||||
error: function error() {
|
||||
$("#meta-info").html("<p class=\"text-danger\">" + msg.search_error + "!</p>" + $("#meta-info")[0].innerHTML);
|
||||
|
||||
Reference in New Issue
Block a user