From: Benoît Pin Date: Tue, 14 Apr 2015 07:48:51 +0000 (+0200) Subject: Ménage, lint. X-Git-Url: https://svn.cri.ensmp.fr/git/Portfolio.git/commitdiff_plain/48537985d4ab422006ad0ea6e0b4fbf1c1fe3365?ds=sidebyside Ménage, lint. --- diff --git a/Products/Portfolio/skins/photo_lightbox_viewer.js b/Products/Portfolio/skins/photo_lightbox_viewer.js index ba3ecf1..8b19c3f 100644 --- a/Products/Portfolio/skins/photo_lightbox_viewer.js +++ b/Products/Portfolio/skins/photo_lightbox_viewer.js @@ -24,7 +24,7 @@ Lightbox = function(grid, toolbar, complete, container_type, orderable) { addListener(window, 'scroll', function(evt){self.windowScrollToolbarlHandler(evt);}); } addListener(window, 'scroll', function(evt){self.windowScrollGridHandler(evt);}); - registerStartupFunction(function(){ self.windowScrollGridHandler();}); + addListener(window, 'load', function(evt){self.windowScrollGridHandler();}); this.lastCBChecked = undefined; this.form = undefined; var parent = this.grid.parentNode; @@ -82,9 +82,7 @@ Lightbox.prototype.windowScrollToolbarlHandler = function(evt) { Lightbox.prototype.windowScrollGridHandler = function(evt) { if (!this.complete && !this.fetchingDisabled && - getWindowScrollY() > - (this.lastSlide.firstElementChild || this.lastSlide.children[0]).offsetTop - - getWindowHeight()) { + getWindowScrollY() > (this.lastSlide.firstElementChild || this.lastSlide.children[0]).offsetTop - getWindowHeight()) { this.fetchingDisabled = true; this.fetchTail(); }