diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-12-05 23:51:44 +0100 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-12-05 23:52:14 +0100 |
commit | a0548a416a56f6e0fd3269279777d57156c47d15 (patch) | |
tree | 162b2a18f93dfdb140536364d4387d9d65740e3c /files/js/filelist.js | |
parent | 31846141b0269bb24b9925a1bbbbc5d815719bec (diff) | |
download | nextcloud-server-a0548a416a56f6e0fd3269279777d57156c47d15.tar.gz nextcloud-server-a0548a416a56f6e0fd3269279777d57156c47d15.zip |
Don't trigger file action when renaming, stupid fix for stupid firefox behaviour
Diffstat (limited to 'files/js/filelist.js')
-rw-r--r-- | files/js/filelist.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/files/js/filelist.js b/files/js/filelist.js index 5740ece9716..16f73ed58d6 100644 --- a/files/js/filelist.js +++ b/files/js/filelist.js @@ -125,7 +125,7 @@ FileList={ tr.data('renaming',true); var td=tr.children('td.filename'); var input=$('<input class="filename"></input>').val(name); - var form=$('<form action="#"></form>') + var form=$('<form></form>') form.append(input); td.children('a.name').text(''); td.children('a.name').append(form) @@ -134,7 +134,6 @@ FileList={ event.stopPropagation(); event.preventDefault(); var newname=input.val(); - tr.data('renaming',false); tr.attr('data-file',newname); td.children('a.name').empty(); if(newname.indexOf('.')>0){ @@ -148,12 +147,12 @@ FileList={ if(newname.indexOf('.')>0){ span.append($('<span class="extention">'+newname.substr(newname.lastIndexOf('.'))+'</span>')); } - $.ajax({ - url: 'ajax/rename.php', - data: { dir : $('#dir').val(), newname: newname, file: name } + $.get(OC.filePath('files','ajax','rename.php'), { dir : $('#dir').val(), newname: newname, file: name },function(){ + tr.data('renaming',false); }); + return false; }); - form.click(function(event){ + input.click(function(event){ event.stopPropagation(); event.preventDefault(); }); |