X-Git-Url: https://svn.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/a8f0edf22418e87346d8561e5e5904dc262acbdd..326a6677709320dc5149de76f6ae2bdea31fe4fa:/skins/ajax_scripts/folder_contents_script.js?ds=inline diff --git a/skins/ajax_scripts/folder_contents_script.js b/skins/ajax_scripts/folder_contents_script.js index dc31b4c..7204a4e 100644 --- a/skins/ajax_scripts/folder_contents_script.js +++ b/skins/ajax_scripts/folder_contents_script.js @@ -290,11 +290,23 @@ DDFolderUploader.prototype.handleFiles = function(files) { }; DDFolderUploader.prototype.beforeUpload = function(item) { + this.uploadedItem = item; // To be implemented by decendant. }; DDFolderUploader.prototype.uploadCompleteHandlerCB = function(req) { - // To be implemented by descendant. + var item = this.uploadedItem; + var row = getCopyOfNode(req.responseXML.documentElement.firstChild); + row.className = item.className; + + if (req.status === 200) { + // update + console.log('todo'); + } + else if(req.status === 201) { + // creation + this.listing.replaceChild(row, item); + } }; DDFolderUploader.prototype.progressHandlerCB = function(progress) {