]> source.dussan.org Git - nextcloud-server.git/commitdiff
remove 'no people found' entry
authorBjoern Schiessle <schiessle@owncloud.com>
Mon, 11 Aug 2014 14:03:47 +0000 (16:03 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Tue, 12 Aug 2014 08:02:01 +0000 (10:02 +0200)
core/js/share.js

index eceb6b98f1ea59b55a368d53200307433610627e..f6165602f6cf4c942e65fcad78b89aca777438f4 100644 (file)
@@ -441,25 +441,14 @@ OC.Share={
                                });
                        }
                        $('#shareWith').autocomplete({minLength: 1, source: function(search, response) {
-       //                      if (cache[search.term]) {
-       //                              response(cache[search.term]);
-       //                      } 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
-//                                                     var pattern = new RegExp(/^[+a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/i);
-//                                                     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')]);
-//                                                     }
+                                                       response();
                                                }
                                        });
-       //                      }
                        },
                        focus: function(event, focused) {
                                event.preventDefault();