X-Git-Url: https://svn.cri.ensmp.fr/git/Portfolio.git/blobdiff_plain/9d15a219a1b6910463064c64f9c211c606b4b5eb..56cf98937c95ed6aee58b464aa389ee3a90c9413:/skins/photo_lightbox_viewer.js?ds=inline diff --git a/skins/photo_lightbox_viewer.js b/skins/photo_lightbox_viewer.js index 3c69aec..3438151 100644 --- a/skins/photo_lightbox_viewer.js +++ b/skins/photo_lightbox_viewer.js @@ -482,10 +482,10 @@ Lightbox.prototype.onDragStart = function(evt) { Lightbox.prototype.onDragOver = function(evt) { var target = getTargetedObject(evt); - if (!target) {return;} - while(target.className !== 'slide') { + while(target && target.className !== 'slide') { target = target.parentNode; } + if (!target) {return;} target = target.parentNode; if (target !== this.dragged) { target.classList.add('dragover'); @@ -542,15 +542,18 @@ Lightbox.prototype.moveSelectedPhotos = function() { }; Lightbox.prototype._moveSelectedPhotos = function(req) { - var i, slide; + var i, slide, cb; if (req.status === 200) { var doc = req.responseXML.documentElement; if (doc.nodeName === 'ok') { - this.pendingMovedSlides = undefined; for(i=0 ; i