-DDFileUploader.prototype.uploadCompleteHandler = function(evt) {
- this.progressBar.parentNode.removeChild(this.progressBar);
+DDFileUploader.prototype.uploadCompleteHandler = function(req) {
+ var slide = this.uploadedSlide;
+ this.uploadedSlide.removeChild(slide.label);
+ this.uploadedSlide.removeChild(slide.progressBar);
+ var fragment = getCopyOfNode(req.responseXML.documentElement.firstChild);
+ var img = fragment.getElementsByTagName('img')[0];
+ img.onload = function(evt) {
+ var preview = slide.getElementsByTagName('img')[0];
+ preview.src = undefined;
+ slide.parentNode.replaceChild(fragment, slide);
+ };
+ this.previewsLoaded--;
+ this.previewQueueLoadNext();