MDL-34139 filemanager select-file dialogue should update file on Enter

This commit is contained in:
Marina Glancy 2012-07-02 15:12:17 +08:00
parent 2cbdaa77ea
commit eb45e641b6

View File

@ -736,6 +736,12 @@ M.form_filemanager.init = function(Y, options) {
e.preventDefault();
this.update_file();
}, this);
selectnode.all('form').on('keydown', function(e) {
if (e.keyCode == 13) {
e.preventDefault();
this.update_file();
}
}, this);
selectnode.one('.fp-file-download').on('click', function(e) {
e.preventDefault();
if (this.selectui.fileinfo.type != 'folder') {