diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/js/sharedialogview.js | 3 | ||||
-rw-r--r-- | core/js/tests/specs/sharedialogviewSpec.js | 74 |
2 files changed, 0 insertions, 77 deletions
diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index 78168336bb7..a63960da2b8 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -260,9 +260,6 @@ var suggestions = users.concat(groups).concat(remotes).concat(emails).concat(lookup); if (suggestions.length > 0) { - suggestions.sort(function (a, b) { - return OC.Util.naturalSortCompare(a.label, b.label); - }); $shareWithField .autocomplete("option", "autoFocus", true); diff --git a/core/js/tests/specs/sharedialogviewSpec.js b/core/js/tests/specs/sharedialogviewSpec.js index 7e3232f86e1..307adea85ff 100644 --- a/core/js/tests/specs/sharedialogviewSpec.js +++ b/core/js/tests/specs/sharedialogviewSpec.js @@ -490,80 +490,6 @@ describe('OC.Share.ShareDialogView', function() { }); }); describe('autocompletion of users', function() { - it('is sorted naturally', function () { - dialog.render(); - var response = sinon.stub(); - dialog.autocompleteHandler({term: 'p'}, response); - var jsonData = JSON.stringify({ - 'ocs' : { - 'meta' : { - 'status' : 'success', - 'statuscode' : 100, - 'message' : null - }, - 'data' : { - 'exact' : { - 'users' : [], - 'groups' : [], - 'remotes': [] - }, - 'users' : [{ - "label": "Peter A.", - "value": { - "shareType": 0, - "shareWith": "Peter A." - } - }, - { - "label": "Petra", - "value": { - "shareType": 0, - "shareWith": "Petra" - } - }, - { - "label": "peter B.", - "value": { - "shareType": 0, - "shareWith": "peter B." - } - }], - 'groups' : [], - 'remotes': [] - } - } - }); - - fakeServer.requests[0].respond( - 200, - {'Content-Type': 'application/json'}, - jsonData - ); - - expect(response.calledWithExactly([ - { - "label": "Peter A.", - "value": { - "shareType": 0, - "shareWith": "Peter A." - } - }, - { - "label": "peter B.", - "value": { - "shareType": 0, - "shareWith": "peter B." - } - }, - { - "label": "Petra", - "value": { - "shareType": 0, - "shareWith": "Petra" - } - } - ])).toEqual(true); - }); it('triggers autocomplete display and focus with data when ajax search succeeds', function () { dialog.render(); var response = sinon.stub(); |