Skip to content
Snippets Groups Projects
Commit b555fb3f authored by Florian Schunk's avatar Florian Schunk
Browse files

open name prompt on pressing enter

parent ff1e0e23
No related branches found
No related tags found
No related merge requests found
...@@ -259,6 +259,17 @@ var OCdialogs = { ...@@ -259,6 +259,17 @@ var OCdialogs = {
} }
var newButton = self.$filePicker.find('.actions.creatable .button-add'); var newButton = self.$filePicker.find('.actions.creatable .button-add');
newButton.on('focus', function() {
self.$filePicker.ocdialog('setEnterCallback', function() {
event.stopImmediatePropagation();
event.preventDefault();
newButton.click();
});
});
newButton.on('blur', function() {
self.$filePicker.ocdialog('unsetEnterCallback');
});
OC.registerMenu(newButton,self.$filePicker.find('.menu'),function () { OC.registerMenu(newButton,self.$filePicker.find('.menu'),function () {
$input.focus(); $input.focus();
self.$filePicker.ocdialog('setEnterCallback', function() { self.$filePicker.ocdialog('setEnterCallback', function() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment