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()
Showing
- apps/files/js/filelist.js 1 addition, 1 deletionapps/files/js/filelist.js
- apps/files/lib/helper.php 1 addition, 1 deletionapps/files/lib/helper.php
- core/js/js.js 49 additions, 1 deletioncore/js/js.js
- core/js/tests/specHelper.js 2 additions, 0 deletionscore/js/tests/specHelper.js
- core/js/tests/specs/coreSpec.js 155 additions, 0 deletionscore/js/tests/specs/coreSpec.js
- lib/private/naturalsort.php 116 additions, 0 deletionslib/private/naturalsort.php
- lib/public/util.php 11 additions, 0 deletionslib/public/util.php
- settings/js/users/users.js 3 additions, 1 deletionsettings/js/users/users.js
- tests/lib/naturalsort.php 178 additions, 0 deletionstests/lib/naturalsort.php
Loading
Please register or sign in to comment