* Delete mods/login.js (not used)

* More fallbackMenuModule & gotoMenuModule clean up -- should all be using new system now
This commit is contained in:
Bryan Ashby 2015-11-03 23:25:35 -07:00
parent f7a7423b32
commit b1be5cdff4
12 changed files with 16 additions and 85 deletions

View file

@ -448,15 +448,6 @@ Client.prototype.address = function() {
return this.input.address();
};
// :TODO: remove these deprecated wrappers:
Client.prototype.gotoMenuModule = function(options, cb) {
this.menuStack.goto(options.name, options, cb);
};
Client.prototype.fallbackMenuModule = function(options, cb) {
this.menuStack.prev(cb);
};
///////////////////////////////////////////////////////////////////////////////
// Default error handlers
///////////////////////////////////////////////////////////////////////////////

View file

@ -834,9 +834,7 @@ function FullScreenEditorModule(options) {
replyDiscard : function(formData, extraArgs) {
// :TODO: need to prompt yes/no
// :TODO: @method for fallback would be better
self.client.fallbackMenuModule(function fallback(err) {
console.log(err)
});
self.prevMenu();
},
*/
editModeMenuHelp : function(formData, extraArgs) {

View file

@ -7,24 +7,6 @@ var loadMenu = require('./menu_util.js').loadMenu;
var _ = require('lodash');
var assert = require('assert');
/*
MenuStack(client)
stack[] push, pop, ...
next()
goto(name, options, cb)
prev()
MenuModule
nextMenu()
gotoMenu(name, options, cb)
prevMenu()
*/
// :TODO: Clean up client attach/detach/etc.
// :TODO: gotoMenuModule() -> MenuModule.gotoMenu()
// :TODO: fallbackMenuModule() -> MenuModule.prevMenu()
module.exports = MenuStack;
function MenuStack(client) {

View file

@ -37,14 +37,14 @@ function login(callingMenu, formData, extraArgs) {
}
setTimeout(function timeout() {
client.fallbackMenuModule();
callingMenu.prevMenu();
}, 2000);
});
return;
} else {
// Other error
client.fallbackMenuModule();
callingMenu.prevMenu();
}
} else {

View file

@ -45,7 +45,7 @@ function UserConfigModule(options) {
this.menuMethods = {
exitKeyPressed : function(formData, extraArgs) {
// :TODO: save/etc.
self.client.fallbackMenuModule();
self.prevMenu();
}
};
}