-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) {
+ slide.parentNode.replaceChild(fragment, slide);
+ };
+ this.previewsLoaded--;
+ this.previewQueueLoadNext();