From 801777234f051da25603bfc5937fcea4319bdf82 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 30 Oct 2024 12:59:55 +0300 Subject: [PATCH] minor tweaks... Signed-off-by: Alex A. Naanou --- Viewer/features/marks.js | 14 ++++++++++++++ Viewer/imagegrid/data.js | 5 ++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Viewer/features/marks.js b/Viewer/features/marks.js index ef28dbaf..658510f1 100755 --- a/Viewer/features/marks.js +++ b/Viewer/features/marks.js @@ -245,6 +245,13 @@ var ImageMarkActions = actions.Actions({ return this.data == null ? [] : this.data.sortViaOrder(this.data.tagQuery('marked')) }, + // XXX REVISE... + set marked(gids){ + gids = gids instanceof Array ? + gids + : [gids] + this.untag('marked', this.data.getImages('loaded')) + this.tag('marked', gids) }, markedInRibbon: ['- Mark|Ribbon/', function(ribbon){ @@ -522,6 +529,13 @@ var ImageBookmarkActions = actions.Actions({ return this.data == null ? [] : this.data.sortViaOrder(this.data.tagQuery('bookmark')) }, + // XXX REVISE... + set bookmarked(gids){ + gids = gids instanceof Array ? + gids + : [gids] + this.untag('bookmarked', this.data.getImages('loaded')) + this.tag('bookmarked', gids) }, prevBookmarked: ['Bookmark|Navigate/Previous bookmarked image', {mode: function(target){ diff --git a/Viewer/imagegrid/data.js b/Viewer/imagegrid/data.js index d378dd30..2a20285d 100755 --- a/Viewer/imagegrid/data.js +++ b/Viewer/imagegrid/data.js @@ -1130,7 +1130,10 @@ var DataPrototype = { // normalize target and build the source list... // 'current' ribbon... - target = target === 'current' ? this.current : target + target = (target == 'current' + || target == 'ribbon') ? + this.current + : target // get all gids... if(target === 'all'){