diff --git a/ui (gen4)/features/base.js b/ui (gen4)/features/base.js index c566682a..abaf2773 100755 --- a/ui (gen4)/features/base.js +++ b/ui (gen4)/features/base.js @@ -524,6 +524,22 @@ actions.Actions({ // // NOTE: the cmp function is called in the actions context. __sort_modes__: { + 'name-leading-sequence': function(a, b){ + a = this.images.getImageNameLeadingSeq(a) + a = typeof(a) == typeof('str') ? 0 : a + b = this.images.getImageNameLeadingSeq(b) + b = typeof(b) == typeof('str') ? 0 : b + + return a - b + }, + 'name-sequence': function(a, b){ + a = this.images.getImageNameSeq(a) + a = typeof(a) == typeof('str') ? 0 : a + b = this.images.getImageNameSeq(b) + b = typeof(b) == typeof('str') ? 0 : b + + return a - b + }, }, // XXX this also requires images... // XXX cache order??? diff --git a/ui (gen4)/features/ui.js b/ui (gen4)/features/ui.js index f2dd2d5d..9c5e124a 100755 --- a/ui (gen4)/features/ui.js +++ b/ui (gen4)/features/ui.js @@ -170,6 +170,8 @@ module.ViewerActions = actions.Actions({ 'sort-modes': { 'Sort by date': 'metadata.createDate birthtime', 'Sort by name': 'name path', + 'Sort by name (XP-style)': 'name-leading-sequence name path', + 'Sort by file sequence number': 'name-leading-sequence name path', }, },