diff --git a/ui/data.js b/ui/data.js index b646bcd9..d3fdc7b6 100755 --- a/ui/data.js +++ b/ui/data.js @@ -427,6 +427,23 @@ function cmp(a, b, get){ } +// Generate a cmp function that will use all the cmp's in cmp_chain in +// sequence if the previous returns 0 (equal). +// +function chainCmp(cmp_chain){ + return function(a, b, get, data){ + var res + for(var i=0; i < cmp_chain.length; i++){ + res = cmp_chain[i](a, b, get, data) + if(res != 0){ + return res + } + } + return res + } +} + + // Generic image ordering comparison via DATA.order // // NOTE: see updateRibbonORder(...) for a general view on image sorting diff --git a/ui/sort.js b/ui/sort.js index cb3414bc..ac785d2f 100755 --- a/ui/sort.js +++ b/ui/sort.js @@ -159,23 +159,6 @@ function imageXPStyleFileNameCmp(a, b, get, data){ } -// Generate a cmp function that will use all the cmp's in cmp_chain in -// sequence if the previous returns 0 (equal). -// -function chainCmp(cmp_chain){ - return function(a, b, get, data){ - var res - for(var i=0; i < cmp_chain.length; i++){ - res = cmp_chain[i](a, b, get, data) - if(res != 0){ - return res - } - } - return res - } -} - - // Sort action generator... // function sortVia(cmp){