From 7e4d976b2ad5cbc1f87dcefbc5448f3beabf5a14 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 19 Mar 2019 04:51:22 +0300 Subject: [PATCH] tweaking + preparing for work on navigation... Signed-off-by: Alex A. Naanou --- ui (gen4)/lib/widget/browse2.js | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/ui (gen4)/lib/widget/browse2.js b/ui (gen4)/lib/widget/browse2.js index 38686954..9f4cbc28 100755 --- a/ui (gen4)/lib/widget/browse2.js +++ b/ui (gen4)/lib/widget/browse2.js @@ -942,6 +942,17 @@ var BaseBrowserPrototype = { query = typeof(query) == typeof('str') ? [query] : query + // XXX not sure about this... + //query = query instanceof Array ? + // query + // .map(function(d){ + // return d == '*' ? + // d + // : d.indexOf('*') > 0 ? + // new RegExp(d + // .replace(/\*/g, '.*')) + // : d}) + // : query var i = -1 return this.filter(function(e, p){ @@ -969,7 +980,23 @@ var BaseBrowserPrototype = { || q == p[i] }) .length == p.length) // XXX add attribute queries... - : false)) }, options) + : false)) }, options) }, + + // XXX move this to a more logical spot... + // XXX should also take path... + indexOf: function(item){ + // XXX + }, + // XXX move this to a more logical spot... + // XXX should also take index... + pathOf: function(item){ + // XXX + }, + + // XXX support: up/down/left/right/first/last/next/prev + // XXX extend support for screen oriented nav in a subclass... + navigate: function(direction){ + // XXX get then return element... },