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
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue