
window["displayCover"] = function(hash) {
    var popin = new Popin();
    popin.show();
    popin.setImage("/book/" +hash +"/read/1.png");
};

window["editDocument"] = function(hash) {
    var popin = new Popin(),
        bookEditForm = new BookEditForm(hash);

    popin.show();
    bookEditForm.ready.then(form => popin.setContent(form.createDom()));
    bookEditForm.onClose = () => popin.hide();
};

