From 46dc51076f3ee824e278cfe6b562f2a64f47c6ef Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 28 Sep 2017 03:57:54 +0300 Subject: [PATCH] some fixes... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/collections.js | 13 +++++++++---- ui (gen4)/features/keyboard.js | 4 +++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ui (gen4)/features/collections.js b/ui (gen4)/features/collections.js index ea228a61..4230ab13 100755 --- a/ui (gen4)/features/collections.js +++ b/ui (gen4)/features/collections.js @@ -46,8 +46,11 @@ var widgets = require('features/ui-widgets') // // -var MAIN_COLLECTION_TITLE = '$ALL' -var MAIN_COLLECTION_GID = '0' +// XXX should these be in .config??? +var MAIN_COLLECTION_TITLE = +module.MAIN_COLLECTION_TITLE = '$ALL' +var MAIN_COLLECTION_GID = +module.MAIN_COLLECTION_GID = '0' // XXX undo... var CollectionActions = actions.Actions({ @@ -1032,11 +1035,13 @@ module.Collection = core.ImageGridFeatures.Feature({ }], // basic collection edits... [[ - 'collect', + // NOTE: no need to handle .collect(..) here as it calls .joinCollect(..) 'joinCollect', 'uncollect', ], - function(_, collection){ + function(){ + var args = [].slice.call(arguments, 1) + var collection = args.length == 1 ? args[0] : args[1] this.markChanged( 'collection: ' +JSON.stringify( diff --git a/ui (gen4)/features/keyboard.js b/ui (gen4)/features/keyboard.js index ffac3207..c28047c4 100755 --- a/ui (gen4)/features/keyboard.js +++ b/ui (gen4)/features/keyboard.js @@ -17,6 +17,8 @@ var widgets = require('features/ui-widgets') var browse = require('lib/widget/browse') +var collections = require('features/collections') + /*********************************************************************/ @@ -147,7 +149,7 @@ module.GLOBAL_KEYBOARD = { 'Del', ], - Esc: 'loadCollection: "ALL" -- Load all images', + Esc: 'loadCollection: "'+ collections.MAIN_COLLECTION_TITLE +'" -- Load all images', Del: 'uncollect', shift_Del: 'uncollectMarked',