Add support for displaying author information from Goodreads
Requires the "goodread" module (added to optional-requirements.txt) and an API key Retrieves Goodreads author information and displays their photo and "about" text
This commit is contained in:
@ -2,6 +2,20 @@ var displaytext;
|
||||
var updateTimerID;
|
||||
var updateText;
|
||||
|
||||
// Generic control/related handler to show/hide fields based on a checkbox' value
|
||||
// e.g.
|
||||
// <input type="checkbox" data-control="stuff-to-show">
|
||||
// <div data-related="stuff-to-show">...</div>
|
||||
$(document).on("change", "input[type=\"checkbox\"][data-control]", function () {
|
||||
var $this = $(this);
|
||||
var name = $this.data("control");
|
||||
var showOrHide = $this.prop("checked");
|
||||
|
||||
$("[data-related=\""+name+"\"]").each(function () {
|
||||
$(this).toggle(showOrHide);
|
||||
});
|
||||
});
|
||||
|
||||
$(function() {
|
||||
|
||||
function restartTimer() {
|
||||
@ -121,6 +135,8 @@ $(function() {
|
||||
});
|
||||
});
|
||||
|
||||
$("input[data-control]").trigger("change");
|
||||
|
||||
$(window).resize(function(event) {
|
||||
$(".discover .row").isotope("reLayout");
|
||||
});
|
||||
|
Reference in New Issue
Block a user