diff options
author | Morris Jobke <morris.jobke@gmail.com> | 2013-09-15 03:07:11 -0700 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2013-09-15 03:07:11 -0700 |
commit | 58e65820561abb419a6a145a49b1979cd3e703d2 (patch) | |
tree | dd009bc2a04f0389b69e4ed468248904080b8a45 /core | |
parent | db7e1dd877698a02a0d17482413a44f49dd16819 (diff) | |
parent | 15be3d85b61c93534b1c3a623fb4c19fceb6c444 (diff) | |
download | nextcloud-server-58e65820561abb419a6a145a49b1979cd3e703d2.tar.gz nextcloud-server-58e65820561abb419a6a145a49b1979cd3e703d2.zip |
Merge pull request #4803 from owncloud/fix-4465-add-share-user-on-enter
Fixes #4465 - Added autoFocus to #shareWith autocomplete options
Diffstat (limited to 'core')
-rw-r--r-- | core/js/share.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/js/share.js b/core/js/share.js index 27c16f38b92..5d34faf8a5d 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -233,6 +233,7 @@ OC.Share={ // } else { $.get(OC.filePath('core', 'ajax', 'share.php'), { fetch: 'getShareWith', search: search.term, itemShares: OC.Share.itemShares }, function(result) { if (result.status == 'success' && result.data.length > 0) { + $( "#shareWith" ).autocomplete( "option", "autoFocus", true ); response(result.data); } else { // Suggest sharing via email if valid email address @@ -240,6 +241,7 @@ OC.Share={ // if (pattern.test(search.term)) { // response([{label: t('core', 'Share via email:')+' '+search.term, value: {shareType: OC.Share.SHARE_TYPE_EMAIL, shareWith: search.term}}]); // } else { + $( "#shareWith" ).autocomplete( "option", "autoFocus", false ); response([t('core', 'No people found')]); // } } @@ -423,7 +425,7 @@ OC.Share={ dateFormat : 'dd-mm-yy' }); } -} +}; $(document).ready(function() { @@ -512,7 +514,7 @@ $(document).ready(function() { $(document).on('change', '#dropdown .permissions', function() { if ($(this).attr('name') == 'edit') { - var li = $(this).parent().parent() + var li = $(this).parent().parent(); var checkboxes = $('.permissions', li); var checked = $(this).is(':checked'); // Check/uncheck Create, Update, and Delete checkboxes if Edit is checked/unck |