diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2011-04-19 12:33:19 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2011-04-19 12:33:19 +0200 |
commit | 0385cc52dcc97a11a6efc0720272867a14b1f675 (patch) | |
tree | cd2e96880dc459c6ba70f090d78f27fdd0e43473 /files | |
parent | 85764257eac2d35db32bfe225fdbf3f6301ef7c2 (diff) | |
download | nextcloud-server-0385cc52dcc97a11a6efc0720272867a14b1f675.tar.gz nextcloud-server-0385cc52dcc97a11a6efc0720272867a14b1f675.zip |
hide filechooser if user clicked on cancel
Diffstat (limited to 'files')
-rw-r--r-- | files/js/files.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/files/js/files.js b/files/js/files.js index 901078680de..aed2d596272 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -87,11 +87,23 @@ $(document).ready(function() { $('#file_upload_cancel').slideDown(250); $('#file_upload_start').attr('mode', 'action'); }); + $('#file_upload_start').focusin(function() { + if($('#fileSelector').val() == '') { + $('#fileSelector').hide(); + $('#file_upload_start').unbind('focusin'); + } + }); + $('#fileSelector').focusout(function() { + if($('#fileSelector').val() == '') { + $('#fileSelector').hide(); + } + }); $('#fileSelector').show(); //needed for Chromium compatibility //rekonq does not call change-event, when click() is executed by script if(navigator.userAgent.indexOf('rekonq') == -1){ $('#fileSelector').click(); } + $('#fileSelector').focus(); } else if($('#file_upload_start').attr('mode') == 'action') { $('#file_upload_cancel').slideUp(250); $('#file_upload_form').attr('uploading', true); |