From 3ba75223bab0b80d126a8172dd52191d8e3f4468 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 26 Nov 2018 20:38:23 +0300 Subject: [PATCH 1/2] typo fix... Signed-off-by: Alex A. Naanou --- ui (gen4)/imagegrid/tags.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui (gen4)/imagegrid/tags.js b/ui (gen4)/imagegrid/tags.js index 0086560d..0cab43d6 100755 --- a/ui (gen4)/imagegrid/tags.js +++ b/ui (gen4)/imagegrid/tags.js @@ -66,7 +66,7 @@ var TagsClassPrototype = { .sort() .join(':') }) .join('/') }) - // sort paths within sets... + // sort sets containing paths... //.split(/:/g) // .sort() // .join(':') }) From a8081f3a7cb5e62d6b616add41beb59338be7eb2 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 26 Nov 2018 21:30:00 +0300 Subject: [PATCH 2/2] some tweaking... Signed-off-by: Alex A. Naanou --- ui (gen4)/imagegrid/tags.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ui (gen4)/imagegrid/tags.js b/ui (gen4)/imagegrid/tags.js index 0cab43d6..07b57d42 100755 --- a/ui (gen4)/imagegrid/tags.js +++ b/ui (gen4)/imagegrid/tags.js @@ -132,7 +132,7 @@ var TagsPrototype = { // Match tags... // - // Match two tags... + // Check if tags match... // .match(tag, tag) // -> bool // @@ -140,6 +140,10 @@ var TagsPrototype = { // .match(tag) // -> tags // + // Filter out non-matching from tags... + // .match(tag, tags) + // -> tags + // // // Query syntax: // a - tag @@ -156,7 +160,7 @@ var TagsPrototype = { // - component order is maintained. // // Example: - // set match no match + // path match no match // -------------------------------- // a a z // a/b b/c @@ -192,8 +196,8 @@ var TagsPrototype = { var that = this // get matching tags... - if(b == null){ - return this.tags() + if(b == null || b instanceof Array){ + return (b || this.tags()) .filter(function(tag){ return that.match(a, tag)})