From 67ae7218af55d39c20d0db0ac80a63cddc838b2d Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 31 Oct 2018 14:52:39 +0300 Subject: [PATCH] bugfix... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/collections.js | 7 +++++-- ui (gen4)/imagegrid/data.js | 14 ++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ui (gen4)/features/collections.js b/ui (gen4)/features/collections.js index 6b07ba58..d9d6fa47 100755 --- a/ui (gen4)/features/collections.js +++ b/ui (gen4)/features/collections.js @@ -2217,6 +2217,7 @@ var AutoCollectionsActions = actions.Actions({ return local_tag_names.indexOf(tag) < 0 }) // XXX should this be a real tag query??? + //var gids = this.data.getTaggedByAll(tags, true) var gids = this.data.getTaggedByAll(tags) // get items that topped matching the query... @@ -2881,12 +2882,14 @@ var CollectionMarksActions = actions.Actions({ // marked... collectMarked: ['- Collections|Mark/', function(collection){ - return this.collectTagged('selected', collection) }], + return this.collect(this.marked, collection) }], + //return this.collectTagged('selected', collection) }], uncollectMarked: ['Collections|Mark/Remove marked from collection', {browseMode: function(){ return (!this.collection || this.marked.length == 0) && 'disabled' }}, function(collection){ - return this.uncollectTagged('selected', collection) }], + return this.uncollect(this.marked, collection) }], + //return this.uncollectTagged('selected', collection) }], // bookmarked... collectBookmarked: ['- Collections|Bookmark/', diff --git a/ui (gen4)/imagegrid/data.js b/ui (gen4)/imagegrid/data.js index 34858ac0..11caf369 100755 --- a/ui (gen4)/imagegrid/data.js +++ b/ui (gen4)/imagegrid/data.js @@ -3190,7 +3190,9 @@ var DataWithTagsPrototype = { }, // selectors... - getTaggedByAny: function(tags){ + // NOTE: if raw is set to true then this will return all the tagged + // gids even if they are not loaded in ribbons (i.e. cropped out)... + getTaggedByAny: function(tags, raw){ tags = arguments.length > 1 ? [].slice.call(arguments) : tags tags = tags instanceof Array ? tags : [tags] @@ -3208,9 +3210,11 @@ var DataWithTagsPrototype = { } }) - return res.compact() + return raw ? + res.compact() + : this.getImages(res.compact()) }, - getTaggedByAll: function(tags){ + getTaggedByAll: function(tags, raw){ tags = arguments.length > 1 ? [].slice.call(arguments) : tags tags = tags instanceof Array ? tags : [tags] @@ -3247,7 +3251,9 @@ var DataWithTagsPrototype = { i = index.indexOf(l) } - return res + return raw ? + res + : this.getImages(res) }, } DataWithTagsPrototype.__proto__ = DataPrototype