mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 10:00:08 +00:00
notes and tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
145f6d7982
commit
a96f7ed040
@ -710,6 +710,8 @@ module.BaseStore = {
|
||||
// | <cmp-func>
|
||||
//
|
||||
//
|
||||
// NOTE: to reverse search order prepend '-' to method name, e.g. cahnge
|
||||
// 'path' to '-path', etc.
|
||||
// NOTE: all path based <by> values are sync, not requireing a .gat(..)
|
||||
// and thus faster than sorting via arbitrary <attr>...
|
||||
// NOTE: this performs a natural sort, i.e. numbers in strings are
|
||||
@ -729,12 +731,10 @@ module.BaseStore = {
|
||||
pwpath.basename(p)) },
|
||||
depth: function(p){
|
||||
return pwpath.split(p).length },
|
||||
// XXX this only accounts for the first number...
|
||||
number: function(p){
|
||||
return parseInt(p.split(/[^\d]+/)
|
||||
.filter(function(e){
|
||||
return e != '' })
|
||||
.shift()) },
|
||||
return p
|
||||
.split(/[^\d]+/g)
|
||||
.join(' ') },
|
||||
},
|
||||
sort: function(paths, ...by){
|
||||
var that = this
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user