1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-03 14:59:18 +02:00

updated grunt file to compress zip in correct order

This commit is contained in:
Fred Chasen 2013-07-14 13:07:54 -07:00
parent f1eb2d8707
commit ec377d9132
22 changed files with 2347 additions and 100 deletions

View file

@ -6,10 +6,9 @@ EPUBJS.Hooks.register("beforeChapterDisplay").endnotes = function(callback, chap
type = "noteref",
popups = {};
EPUBJS.core.addCss("../demo/css/popup.css", false, chapter.doc.head);
// EPUBJS.core.addCss("css/popup.css", false, chapter.doc.head);
//console.log("notes", items)
items.forEach(function(item){
var epubType = item.getAttribute(attr),
href,
@ -22,7 +21,7 @@ EPUBJS.Hooks.register("beforeChapterDisplay").endnotes = function(callback, chap
txt;
if(epubType != type) return;
href = item.getAttribute("href");
id = href.replace("#", '');
el = chapter.doc.getElementById(id);
@ -61,11 +60,13 @@ EPUBJS.Hooks.register("beforeChapterDisplay").endnotes = function(callback, chap
//-- TODO: will these leak memory? - Fred
popups[id].addEventListener("mouseover", onPop, false);
popups[id].addEventListener("mouseout", offPop, false);
//-- Add hide on page change
chapter.book.listenUntil("book:pageChanged", "book:chapterDestroy", hidePop);
chapter.book.listenUntil("book:pageChanged", "book:chapterDestroy", offPop);
// chapter.book.listenUntil("book:pageChanged", "book:chapterDestroy", hidePop);
// chapter.book.listenUntil("book:pageChanged", "book:chapterDestroy", offPop);
chapter.book.on("book:pageChanged", hidePop, this);
chapter.book.on("book:pageChanged", offPop, this);
// chapter.book.on("book:chapterDestroy", hidePop, this);
}
pop = popups[id];
@ -75,7 +76,7 @@ EPUBJS.Hooks.register("beforeChapterDisplay").endnotes = function(callback, chap
itemRect = item.getBoundingClientRect();
left = itemRect.left;
top = itemRect.top;
//-- show the popup
pop.classList.add("show");