mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-28 14:04:45 -04:00
Add ignorecase option to tree.
This commit is contained in:
parent
673afead73
commit
76c226c57b
3 changed files with 11 additions and 2 deletions
|
@ -4,7 +4,8 @@ modulejs.define('ext/tree', ['_', '$', 'core/event', 'core/location', 'core/reso
|
|||
enabled: false,
|
||||
show: true,
|
||||
maxSubfolders: 50,
|
||||
naturalSort: false
|
||||
naturalSort: false,
|
||||
ignorecase: true
|
||||
}, allsettings.tree);
|
||||
var template =
|
||||
'<div class="item">' +
|
||||
|
@ -31,6 +32,11 @@ modulejs.define('ext/tree', ['_', '$', 'core/event', 'core/location', 'core/reso
|
|||
var val1 = item1.label;
|
||||
var val2 = item2.label;
|
||||
|
||||
if (settings.ignorecase) {
|
||||
val1 = val1.toLowerCase();
|
||||
val2 = val2.toLowerCase();
|
||||
}
|
||||
|
||||
return settings.natural ? util.naturalCmpFn(val1, val2) : util.regularCmpFn(val1, val2);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue