X-Git-Url: https://scm.cri.mines-paristech.fr/git/Portfolio.git/blobdiff_plain/e0660307a6fa16a363722bcf06f74bb9f53e1d30..01d91dfe8e676a59d83166eba69a55cff7796bd1:/skins/photo_lightbox_viewer.js?ds=inline diff --git a/skins/photo_lightbox_viewer.js b/skins/photo_lightbox_viewer.js index cf39a0a..bb27a67 100644 --- a/skins/photo_lightbox_viewer.js +++ b/skins/photo_lightbox_viewer.js @@ -11,28 +11,21 @@ var Lightbox; var reSelected = /.*selected.*/; -Lightbox = function(grid, toolbar, complete) { +Lightbox = function(grid, toolbar, complete, container_type) { var self = this; this.grid = grid; - this.slides = []; - var node, i; - for (i=0 ; i this.lastSlide.firstElementChild.offsetTop - getWindowHeight()) { + getWindowScrollY() > + (this.lastSlide.firstElementChild || this.lastSlide.children[0]).offsetTop + - getWindowHeight()) { this.fetchingDisabled = true; this.fetchTail(); } @@ -193,6 +200,9 @@ Lightbox.prototype.onResponseLoad = function(req) { this.fm.submitButton = undefined; this.refreshGrid(); break; + default : + this.fm.loadResponse(req); + break; } }; @@ -255,7 +265,7 @@ Lightbox.prototype.deleteSelection = function() { }; Lightbox.prototype._removeSelection = function() { - var i, e, slide; + var i, e; var toRemove = []; for (i=0 ; i