aboutsummaryrefslogtreecommitdiffstats
path: root/files/js/filelist.js
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-07-29 02:26:20 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-07-29 02:26:32 +0200
commita7748c14c61fbcf412eb96203f2f70e9ef77a9b9 (patch)
tree1f47c9d033d0ec47e4e414f36abea8afab895b29 /files/js/filelist.js
parent224dbed79c83930b16f2c080a75a0f8cc05bdc61 (diff)
downloadnextcloud-server-a7748c14c61fbcf412eb96203f2f70e9ef77a9b9.tar.gz
nextcloud-server-a7748c14c61fbcf412eb96203f2f70e9ef77a9b9.zip
dont need the ok button for renaming
Diffstat (limited to 'files/js/filelist.js')
-rw-r--r--files/js/filelist.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/files/js/filelist.js b/files/js/filelist.js
index 901c4fe2188..ce904075588 100644
--- a/files/js/filelist.js
+++ b/files/js/filelist.js
@@ -105,18 +105,17 @@ FileList={
},
rename:function(name){
var tr=$('tr[data-file="'+name+'"]');
+ tr.data('renaming',true);
var td=tr.children('td.filename');
var input=$('<input value='+name+' class="filename"></input>');
- var button=$('<input type="submit" value="Ok"></input>');
var form=$('<form action="#"></form>')
form.append(input);
- form.append(button);
td.children('a.name').text('');
td.children('a.name').append(form)
input.focus();
- td.children('a.name').append(button);
form.submit(function(event){
var newname=input.val();
+ tr.data('renaming',false);
event.stopPropagation();
event.preventDefault();
tr.attr('data-file',newname);
@@ -140,6 +139,7 @@ FileList={
event.preventDefault();
});
input.blur(function(){
+ tr.data('renaming',false);
td.children('a.name').empty();
if(name.indexOf('.')>0){
basename=name.substr(0,name.indexOf('.'));