summaryrefslogtreecommitdiffstats
path: root/files/js
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2012-01-08 01:53:40 +0100
committerRobin Appelman <icewind1991@gmail.com>2012-01-08 01:53:40 +0100
commitd1edc360d9bd7d97c35d25b54dadec61004cd869 (patch)
tree7344744268280ccbdc194746a7b40dfc90a33260 /files/js
parent3844fb0e4ce093bb3c2e67d20f85f61b7723efdc (diff)
parent8f8985c3e53862e2ca6446f296d4835a9577faac (diff)
downloadnextcloud-server-d1edc360d9bd7d97c35d25b54dadec61004cd869.tar.gz
nextcloud-server-d1edc360d9bd7d97c35d25b54dadec61004cd869.zip
merge master into filesystem
Diffstat (limited to 'files/js')
-rw-r--r--files/js/fileactions.js2
-rw-r--r--files/js/filelist.js4
2 files changed, 4 insertions, 2 deletions
diff --git a/files/js/fileactions.js b/files/js/fileactions.js
index 9e2688e82c1..6f0729e43b6 100644
--- a/files/js/fileactions.js
+++ b/files/js/fileactions.js
@@ -137,7 +137,7 @@ FileActions.register('all','Rename',function(){return OC.imagePath('core','actio
});
FileActions.register('dir','Open','',function(filename){
- window.location='index.php?dir='+$('#dir').val()+'/'+filename;
+ window.location='index.php?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename);
});
FileActions.setDefault('dir','Open');
diff --git a/files/js/filelist.js b/files/js/filelist.js
index 16f73ed58d6..35847e06dfe 100644
--- a/files/js/filelist.js
+++ b/files/js/filelist.js
@@ -40,7 +40,7 @@ FileList={
html = $('<tr></tr>').attr({ "data-type": "dir", "data-size": size, "data-file": name});
td = $('<td></td>').attr({"class": "filename", "style": 'background-image:url('+OC.imagePath('core', 'filetypes/folder.png')+')' });
td.append('<input type="checkbox" />');
- var link_elem = $('<a></a>').attr({ "class": "name", "href": "index.php?dir="+ encodeURIComponent($('#dir').val()+'/'+name) });
+ var link_elem = $('<a></a>').attr({ "class": "name", "href": "index.php?dir="+ encodeURIComponent($('#dir').val()+'/'+name).replace(/%2F/g, '/') });
link_elem.append($('<span></span>').addClass('nametext').text(name));
td.append(link_elem);
html.append(td);
@@ -136,6 +136,8 @@ FileList={
var newname=input.val();
tr.attr('data-file',newname);
td.children('a.name').empty();
+ var path = td.children('a.name').attr('href');
+ td.children('a.name').attr('href', path.replace(encodeURIComponent(name), encodeURIComponent(newname)));
if(newname.indexOf('.')>0){
basename=newname.substr(0,newname.lastIndexOf('.'));
}else{