summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-05-13 15:54:45 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-05-13 15:54:45 +0200
commit591b383f2dd1601009382152079e004034c4258d (patch)
tree3d5bf793840147817b81cd30f3c7a0cc39f18442 /apps/files
parent665663432c63531341bb983e1e8d78dcd6a80db2 (diff)
downloadnextcloud-server-591b383f2dd1601009382152079e004034c4258d.tar.gz
nextcloud-server-591b383f2dd1601009382152079e004034c4258d.zip
peselect filename without extension on rename
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/js/filelist.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index b1e9a885063..c24d1fd8244 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -191,6 +191,13 @@ var FileList={
td.children('a.name').hide();
td.append(form);
input.focus();
+ //preselect input
+ var len = input.val().lastIndexOf('.');
+ if (len === -1) {
+ len = input.val().length;
+ }
+ input.selectRange(0,len);
+
form.submit(function(event){
event.stopPropagation();
event.preventDefault();