1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-04 15:09:16 +02:00

Handle missing TOC

This commit is contained in:
Fred Chasen 2013-10-26 13:22:19 -07:00
parent 536629e8bb
commit 46633775d2
6 changed files with 11 additions and 7 deletions

View file

@ -946,6 +946,8 @@ EPUBJS.Book.prototype.unpack = function(containerPath){
// book.saveSettings();
});
} else {
book.ready.toc.resolve(false);
}
}).
@ -2191,7 +2193,7 @@ EPUBJS.Parser.prototype.container = function(containerXml){
var rootfile = containerXml.querySelector("rootfile"),
fullpath = rootfile.getAttribute('full-path'),
folder = EPUBJS.core.folder(fullpath);
console.log("rootfile", containerXml.querySelectorAll("rootfile"));
//-- Now that we have the path we can parse the contents
return {
'packagePath' : fullpath,

4
build/epub.min.js vendored

File diff suppressed because one or more lines are too long

4
demo/js/epub.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -104,7 +104,7 @@
"use strict";
// var Book = ePub("../demo/moby-dick/", {restore: true, reload: false });
var Book = ePub("", {restore: true, reload: false });
var Book = ePub("../books/demo-book-gh-pages/", {restore: true, reload: false });
</script>
</head>
<body>

View file

@ -211,6 +211,8 @@ EPUBJS.Book.prototype.unpack = function(containerPath){
// book.saveSettings();
});
} else {
book.ready.toc.resolve(false);
}
}).

View file

@ -8,7 +8,7 @@ EPUBJS.Parser.prototype.container = function(containerXml){
var rootfile = containerXml.querySelector("rootfile"),
fullpath = rootfile.getAttribute('full-path'),
folder = EPUBJS.core.folder(fullpath);
console.log("rootfile", containerXml.querySelectorAll("rootfile"));
//-- Now that we have the path we can parse the contents
return {
'packagePath' : fullpath,