mirror of
https://github.com/nextcloud/server.git
synced 2026-07-14 20:39:17 -04:00
open name prompt on pressing enter
Signed-off-by: Florian Schunk <florian.schunk@rwth-aachen.de>
This commit is contained in:
parent
ff1e0e2302
commit
b555fb3ff5
1 changed files with 11 additions and 0 deletions
|
|
@ -259,6 +259,17 @@ var OCdialogs = {
|
|||
}
|
||||
|
||||
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 () {
|
||||
$input.focus();
|
||||
self.$filePicker.ocdialog('setEnterCallback', function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue