]> source.dussan.org Git - nextcloud-server.git/commit
Fixed file list sorting
authorVincent Petry <pvince81@owncloud.com>
Tue, 18 Feb 2014 11:29:05 +0000 (12:29 +0100)
committerVincent Petry <pvince81@owncloud.com>
Mon, 11 Aug 2014 11:28:53 +0000 (13:28 +0200)
commit173059f6d00faa06dab9188efb2d7536f15861e4
tree2d3efee8b0e682b16d33fb8a37e7f5567b696800
parent86ae3bd1e7d20e4f28ea9d7b9f71f1fdef0087aa
Fixed file list sorting

Now using a natural sort algorithm that is more consistent between JS
and PHP (although not perfect in some corner cases)

- added OC.Util.naturalSortComparator that uses the same algo that was
  used for the user list
- changed user list and files list to use OC.Util.naturalSortComparator
- removed toLowerCase() and changed the comparator to use
  String.localeCompare()
- added unit tests
- added OC_NaturalSort that is used by OCP\Util::naturalSortCompare()
apps/files/js/filelist.js
apps/files/lib/helper.php
core/js/js.js
core/js/tests/specHelper.js
core/js/tests/specs/coreSpec.js
lib/private/naturalsort.php [new file with mode: 0644]
lib/public/util.php
settings/js/users/users.js
tests/lib/naturalsort.php [new file with mode: 0644]