aboutsummaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-01-26 17:40:42 +0100
committerRobin Appelman <icewind1991@gmail.com>2011-01-26 17:40:42 +0100
commit735152843170688ff901d26f6c71d959cb5ea2bf (patch)
treebfcb3e5b15c8da2678058a010f2bfa12dbe86743 /js
parent9d8047382e49da47c73a6f443324edb6a4e8c265 (diff)
downloadnextcloud-server-735152843170688ff901d26f6c71d959cb5ea2bf.tar.gz
nextcloud-server-735152843170688ff901d26f6c71d959cb5ea2bf.zip
Change the icon to the correct one after uploading is finished
fixes http://bugs.kde.org/show_bug.cgi?id=264295
Diffstat (limited to 'js')
-rw-r--r--js/lib_files.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/lib_files.js b/js/lib_files.js
index fc24b1b487c..66a464e1945 100644
--- a/js/lib_files.js
+++ b/js/lib_files.js
@@ -124,7 +124,7 @@ OC_FILES.upload=function(iframeId){
OC_FILES.cache.incomplete[dir][name]['size']=size;
OC_FILES.cache.incomplete[dir][name]['mime']=mime;
OC_FILES.uploadIFrames[iframeId].file=file;
- OC_FILES.uploadIFrames[iframeId].addEvent('onload',new callBack(OC_FILES.upload_callback,OC_FILES.uploadIFrames[iframeId]));
+ OC_FILES.uploadIFrames[iframeId].addEvent('onload',OC_FILES.upload_callback.bindScope(OC_FILES.uploadIFrames[iframeId]));
OC_FILES.browser.files.add(name,'incomplete',size,null,mime);
OC_FILES.uploadForm.submit();
if(OC_FILES.uploadForm.parentElement){
@@ -144,6 +144,8 @@ OC_FILES.upload_callback=function(iframeId){
OC_FILES.cache.files[file.name]=OC_FILES.cache.incomplete[file.dir][file.name]
delete OC_FILES.cache.incomplete[file.dir][file.name];
OC_FILES.cache.files[file.name]['type']=file.type;
+ OC_FILES.cache.files[file.name]['writable']=true;
+ OC_FILES.cache.files[file.name]['readable']=true;
this.uploadForm.parentNode.removeChild(this.uploadForm);
this.parentNode.removeChild(this);
OC_FILES.uploadIFrames[file.iframeId]=null;