Univention Bugzilla – Attachment 9065 Details for
Bug 45076
UMC freezes when the search in package management module returns too many results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
45076_locale-sort.patch (text/plain), 1.20 KB, created by
Jürn Brodersen
on 2017-07-26 18:30:57 CEST
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Jürn Brodersen
Created:
2017-07-26 18:30:57 CEST
Size:
1.20 KB
patch
obsolete
>Index: js/widgets/Grid.js >=================================================================== >--- js/widgets/Grid.js (revision 81409) >+++ js/widgets/Grid.js (working copy) >@@ -235,16 +235,24 @@ > if (column.hasOwnProperty('sortFormatter')) { > sortFormatter = column.sortFormatter; > } >+ var stringCompare = function() { >+ if (typeof(Intl) === 'object' && typeof(Intl.Collator) === 'function') { >+ var intlCollator = new Intl.Collator(kernel.locale, {numeric: true}); >+ return function(a, b) { >+ return intlCollator.compare(a, b) < 0; >+ }; >+ } >+ return function(a, b) { >+ return a.toLowerCase() < b.toLowerCase(); >+ }; >+ }(); > var compare = function(aValue, bValue) { > var a = sortFormatter(aValue); > var b = sortFormatter(bValue); >- if (typeof(a.localeCompare) === 'function') { >- return a.localeCompare(b, kernel.locale, {numeric: true}) < 0; >- } else if (typeof(a.toLowerCase) === 'function') { >- return a.toLowerCase() < b.toLowerCase(); >- } else { >- return a < b; >+ if (typeof(a) === 'string' && typeof(b) === 'string') { >+ return stringCompare(a, b); > } >+ return a < b; > }; > return function(data) { > var comparison;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 45076
: 9065