Commit afe6a358 authored by Denis Salem's avatar Denis Salem
Browse files

fix infinite scroll blocking

parent 165b50c7
......@@ -149,8 +149,8 @@
DONE | Chapters engine.
DONE | Fix pattern (i.e .:GetEntryTitle:.) access in template's metadata.
DONE | Infinite scroll use html anchor instead of harcoded indexing.
WIP | Prevent Infinite scroll to block when ressource isn't available.
TODO | Fix unit test.
DONE | Prevent Infinite scroll to block when ressource isn't available.
TODO | rewrite unit tests.
TODO | Open with navigator manual.
TODO | Client-side search engine.
TODO | Reorganize themes dependencies in setup (adding default templates, scripts, and pages to include).
......@@ -175,5 +175,4 @@
TODO | Improve Feed.
TODO | Print out what's going on while FTP transfert.
TODO | Fix gvim / -ex.
TODO | run local server as daemon.
TODO | Warn about entry title duplicates.
......@@ -40,7 +40,7 @@ var VENC_INFINITE_SCROLL = {
console.log("VenC: There is more than one infinite scroll hook in DOM. Aborting...")
}
console.log("getPageHook", this.pageHook);
console.log("VenC: Hook", this.pageHook);
},
getContent : function() {
if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
......@@ -50,7 +50,7 @@ var VENC_INFINITE_SCROLL = {
this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
this.xmlhttp.onreadystatechange = this.domUpdate;
this.xmlhttp.open("GET",this.pageHook,true);
this.xmlhttp.open("GET", this.pageHook, true);
this.xmlhttp.send();
},
dontWait: false,
......@@ -81,6 +81,9 @@ function VENC_INFINITE_SCROLL_UPDATE_DOM() {
VENC_INFINITE_SCROLL.queue++;
VENC_INFINITE_SCROLL.imageDefaultSetup(images[k]);
images[k].loaded = false;
images[k].onerror = function(e) {
this.onload(e);
}
images[k].onload = function(e) {
this.loaded = true;
VENC_INFINITE_SCROLL.queue--;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment