summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail>2010-05-01 23:09:36 +0200
committerRobin Appelman <icewind1991@gmail>2010-05-01 23:09:36 +0200
commitc52e7d360fb9a0e57fe895724f4d082f9338a716 (patch)
treefcf855230891010711c4d1cbae4cb75ca6aa119a /js
parent567c17fde595ae47c6e281bcdad56d3723c642e6 (diff)
downloadnextcloud-server-c52e7d360fb9a0e57fe895724f4d082f9338a716.tar.gz
nextcloud-server-c52e7d360fb9a0e57fe895724f4d082f9338a716.zip
More bug fixes, mostly IE related
Diffstat (limited to 'js')
-rwxr-xr-xjs/filebrowser.js4
-rwxr-xr-xjs/lib_files.js15
2 files changed, 12 insertions, 7 deletions
diff --git a/js/filebrowser.js b/js/filebrowser.js
index 18567f202c5..c95e1290642 100755
--- a/js/filebrowser.js
+++ b/js/filebrowser.js
@@ -30,11 +30,11 @@ OC_FILES.browser.showInitial=function(){
OC_FILES.getdirectorycontent(dir,OC_FILES.browser.show_callback,true);
}
-OC_FILES.browser.show=function(dir){
+OC_FILES.browser.show=function(dir,forceReload){
if(!dir || !dir.split){
dir='';
}
- OC_FILES.getdirectorycontent(dir,OC_FILES.browser.show_callback);
+ OC_FILES.getdirectorycontent(dir,OC_FILES.browser.show_callback,forceReload);
}
OC_FILES.browser.breadcrumb=new Object();
diff --git a/js/lib_files.js b/js/lib_files.js
index c66fc8d1215..aa70120e5e1 100755
--- a/js/lib_files.js
+++ b/js/lib_files.js
@@ -88,7 +88,7 @@ OC_FILES.getdirectorycontent=function(dir,callback,refresh){
OC_FILES.dir='';
OC_FILES.get=function(dir,file){
- window.location='files/api.php?action=get&dir='+encodeURIComponent(dir)+'&files='+encodeURIComponent(file);
+ window.location='files/api.php?action=get&dir='+encodeURIComponent(dir)+'&file='+encodeURIComponent(file);
}
OC_FILES.upload=function(dir,iframeId){
@@ -148,7 +148,13 @@ OC_FILES.upload_callback=function(iframeId){
this.uploadForm.parentNode.removeChild(this.uploadForm);
this.parentNode.removeChild(this);
OC_FILES.uploadIFrames[file.iframeId]=null;
- OC_FILES.browser.show(file.dir);
+ if(file.name){
+ OC_FILES.browser.show(file.dir);
+ }else{
+ OC_FILES.browser.show(file.dir,true);//if the data from the file isn't correct, force a reload of the cache
+ }
+ }else{
+ OC_FILES.browser.show(OC_FILES.dir);
}
}
@@ -208,7 +214,7 @@ OC_FILES.remove_callback=function(req,name){
OC_FILES.getSelected=function(){
var nodes=document.getElementsByName('fileSelector');
var files=Array();
- for(index in nodes){
+ for(var index=0;index<nodes.length;index++){
if(nodes[index].checked){
files[files.length]=nodes[index].value;
}
@@ -273,7 +279,7 @@ OC_FILES.move_callback=function(req,file){
OC_FILES.selectAll=function(){
var value=document.getElementById('select_all').checked;
var nodes=document.getElementsByName('fileSelector');
- for(index in nodes){
+ for(var index=0;index<nodes.length;index++){
if(nodes[index].value){
nodes[index].checked=value;
}
@@ -300,7 +306,6 @@ OC_FILES.actions_selected.download=function(){
files=files[0];
}
OC_FILES.get(dir,files);
-// window.location=WEBROOT+'/files/get_file.php?dir='+OC_FILES.dir+'&files='+files;
}
OC_FILES.actions_selected['delete']=function(){