Diffstat (limited to 'frontend/gamma/js/Clipperz/Base.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/Base.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/frontend/gamma/js/Clipperz/Base.js b/frontend/gamma/js/Clipperz/Base.js index 76b2c3f..9d399d9 100644 --- a/frontend/gamma/js/Clipperz/Base.js +++ b/frontend/gamma/js/Clipperz/Base.js | |||
@@ -68,24 +68,29 @@ MochiKit.Base.update(Clipperz.Base, { | |||
68 | }, | 68 | }, |
69 | 69 | ||
70 | //------------------------------------------------------------------------- | 70 | //------------------------------------------------------------------------- |
71 | 71 | ||
72 | 'caseInsensitiveCompare': function (a, b) { | 72 | 'caseInsensitiveCompare': function (a, b) { |
73 | return MochiKit.Base.compare(a.toLowerCase(), b.toLowerCase()); | 73 | return MochiKit.Base.compare(a.toLowerCase(), b.toLowerCase()); |
74 | }, | 74 | }, |
75 | 75 | ||
76 | 'reverseComparator': function (aComparator) { | 76 | 'reverseComparator': function (aComparator) { |
77 | return MochiKit.Base.compose(function(aResult) { return -aResult; }, aComparator); | 77 | return MochiKit.Base.compose(function(aResult) { return -aResult; }, aComparator); |
78 | }, | 78 | }, |
79 | 79 | ||
80 | 'caseInsensitiveKeyComparator': function (aKey) { | ||
81 | return function (a, b) { | ||
82 | return MochiKit.Base.compare(a[aKey].toLowerCase(), b[aKey].toLowerCase()); | ||
83 | } | ||
84 | }, | ||
80 | //------------------------------------------------------------------------- | 85 | //------------------------------------------------------------------------- |
81 | /* | 86 | /* |
82 | 'dependsOn': function(module, deps) { | 87 | 'dependsOn': function(module, deps) { |
83 | if (!(module in Clipperz)) { | 88 | if (!(module in Clipperz)) { |
84 | MochiKit[module] = {}; | 89 | MochiKit[module] = {}; |
85 | } | 90 | } |
86 | 91 | ||
87 | if (typeof(dojo) != 'undefined') { | 92 | if (typeof(dojo) != 'undefined') { |
88 | dojo.provide('Clipperz.' + module); | 93 | dojo.provide('Clipperz.' + module); |
89 | } | 94 | } |
90 | for (var i = 0; i < deps.length; i++) { | 95 | for (var i = 0; i < deps.length; i++) { |
91 | if (typeof(dojo) != 'undefined') { | 96 | if (typeof(dojo) != 'undefined') { |