From cc74616a93f390273695762f6b8a35b9b3960424 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Fri, 26 Jan 2018 21:34:10 -0700 Subject: [PATCH] Next at end of list goes to previous menu by default --- core/file_area_list.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/file_area_list.js b/core/file_area_list.js index 87e794cb..f42bf93e 100644 --- a/core/file_area_list.js +++ b/core/file_area_list.js @@ -75,6 +75,7 @@ exports.getModule = class FileAreaList extends MenuModule { this.filterCriteria = _.get(options, 'extraArgs.filterCriteria'); this.fileList = _.get(options, 'extraArgs.fileList'); + this.lastFileNextExit = _.get(options, 'extraArgs.lastFileNextExit', true); if(this.fileList) { // we'll need to adjust position as well! @@ -103,6 +104,10 @@ exports.getModule = class FileAreaList extends MenuModule { return this.displayBrowsePage(true, cb); // true=clerarScreen } + if(this.lastFileNextExit) { + return this.prevMenu(cb); + } + return cb(null); }, prevFile : (formData, extraArgs, cb) => {