aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/newfilemenu.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/files/js/newfilemenu.js b/apps/files/js/newfilemenu.js
index 18d9104dc40..09420328f29 100644
--- a/apps/files/js/newfilemenu.js
+++ b/apps/files/js/newfilemenu.js
@@ -28,6 +28,7 @@
'<form class="filenameform">' +
'<label class="hidden-visually" for="{{cid}}-input-{{fileType}}">{{fileName}}</label>' +
'<input id="{{cid}}-input-{{fileType}}" type="text" value="{{fileName}}" autocomplete="off" autocapitalize="off">' +
+ '<input type="submit" value=" " class="primary icon-checkmark-white" />'
'</form>';
/**
@@ -116,7 +117,7 @@
}
if ($target.find('form').length) {
- $target.find('input').focus();
+ $target.find('input[type=\'text\']').focus();
return;
}
@@ -138,7 +139,8 @@
$target.append($form);
// here comes the OLD code
- var $input = $form.find('input');
+ var $input = $form.find('input[type=\'text\']');
+ var $submit = $form.find('input[type=\'submit\']');
var lastPos;
var checkInput = function () {
@@ -171,6 +173,10 @@
}
});
+ $submit.click(function(){
+ $form.submit();
+ });
+
$input.focus();
// pre select name up to the extension
lastPos = newName.lastIndexOf('.');