* Mostly placeholder apply menu

This commit is contained in:
Bryan Ashby 2015-04-06 22:29:45 -06:00
parent 9219cc74a5
commit 9bc1e2f3d1
2 changed files with 72 additions and 0 deletions

57
mods/apply.js Normal file
View File

@ -0,0 +1,57 @@
/* jslint node: true */
'use strict';
var ansi = require('../core/ansi_term.js');
var art = require('../core/art.js');
var user = require('../core/user.js');
var theme = require('../core/theme.js');
var Log = require('../core/logger.js').log;
var MenuModule = require('../core/menu_module.js').MenuModule;
var ViewController = require('../core/view_controller.js').ViewController;
//var async = require('async');
// :TODO: clean up requires
exports.moduleInfo = {
name : 'Apply',
desc : 'Application Module',
author : 'NuSkooler',
};
exports.getModule = ApplyModule;
function ApplyModule(menuConfig) {
MenuModule.call(this, menuConfig);
var self = this;
this.clearForm = function() {
[ 1, 2, ].forEach(function onId(id) {
self.viewController.getView(id).clearText();
});
};
}
require('util').inherits(ApplyModule, MenuModule);
ApplyModule.prototype.enter = function(client) {
ApplyModule.super_.prototype.enter.call(this, client);
};
ApplyModule.prototype.beforeArt = function() {
ApplyModule.super_.prototype.beforeArt.call(this);
this.client.term.write(ansi.resetScreen());
};
ApplyModule.prototype.mciReady = function(mciMap) {
ApplyModule.super_.prototype.mciReady.call(this, mciMap);
var self = this;
self.viewController = self.addViewController(new ViewController(self.client));
self.viewController.loadFromMCIMapAndConfig( { mciMap : mciMap, menuConfig : self.menuConfig }, function onViewReady(err) {
});
};

View File

@ -91,5 +91,20 @@
"logoff" : { "logoff" : {
"art" : "logoff", "art" : "logoff",
"module" : "logoff" "module" : "logoff"
},
"apply" : {
"art" : "apply",
"module" : "apply",
"form" : {
"0" : {
"ET1ET2ET3ET4ET5ET6ET7ET8ET9TL10TL11TL12" : {
"mci" : {
"ET1" : {
"focus" : true
}
}
}
}
}
} }
} }