* Some more JSON -> HJSON cleanup

* More work on ACS system conditional matching. Now functional within menus. Still more work to go on various ACS checks themselves.
* Use ACS for new user path: If new user requires activation, they will see 'DONE' then get logged off
This commit is contained in:
Bryan Ashby 2015-11-14 12:22:21 -07:00
parent 03f9ad4789
commit 688e46bc47
9 changed files with 93 additions and 68 deletions

View file

@ -146,7 +146,7 @@ function MenuModule(options) {
this.autoNextMenu = function() {
function goNext() {
if(_.isString(self.menuConfig.next)) {
if(_.isString(self.menuConfig.next) || _.isArray(self.menuConfig.next)) {
menuUtil.handleNext(self.client, self.menuConfig.next);
} else {
self.prevMenu();
@ -179,6 +179,10 @@ function MenuModule(options) {
}
}
};
this.haveNext = function() {
return (_.isString(this.menuConfig.next) || _.isArray(this.menuConfig.next));
};
}
require('util').inherits(MenuModule, PluginModule);
@ -215,6 +219,14 @@ MenuModule.prototype.restoreSavedState = function(savedState) {
};
MenuModule.prototype.nextMenu = function(cb) {
//
// If we don't actually have |next|, we'll go previous
//
if(!this.haveNext()) {
this.prevMenu(cb);
return;
}
// :TODO: this, prevMenu(), and gotoMenu() need a default |cb| handler if none is supplied.
// ...if the error is that we do not meet ACS requirements and did not get a match, then what?
if(!cb) {