* Minor JSON -> HJSON config cleanup

* Some logging in telnet server vs console.log()
* Calculate FSE footer position vs hard code it
This commit is contained in:
Bryan Ashby 2015-09-12 17:17:00 -06:00
parent e661b23eca
commit 05f666cf29
10 changed files with 126 additions and 109 deletions

View file

@ -184,19 +184,17 @@ function FullScreenEditorModule(options) {
[
function moveToFooterPosition(callback) {
//
// Calculate footer staring position
// Calculate footer starting position
//
// row = (header height + body height)
//
// Header: mciData.body.height
// Body : We must find this in the config / theme
//
// :TODO: don't hard code this -- allow footer height to be part of theme/etc.
self.client.term.rawWrite(ansi.goto(24, 1));
var footerRow = self.header.height + self.body.height;
self.client.term.rawWrite(ansi.goto(footerRow, 1));
callback(null);
},
function clearFooterArea(callback) {
if(options.clear) {
// footer up to 3 rows in height
self.client.term.rawWrite(ansi.reset() + ansi.deleteLine(3));
}
callback(null);
@ -316,6 +314,9 @@ function FullScreenEditorModule(options) {
{ font : self.menuConfig.font },
function displayed(err, artData) {
mciData[n] = artData;
self[n] = { height : artData.height };
next(err);
}
);
@ -327,7 +328,7 @@ function FullScreenEditorModule(options) {
self.setInitialFooterMode();
var footerName = self.getFooterName();
console.log(footerName)
self.redrawFooter( { footerName : footerName }, function artDisplayed(err, artData) {
mciData[footerName] = artData;
callback(err);
@ -369,8 +370,6 @@ function FullScreenEditorModule(options) {
menuLoadOpts.formId = self.getFormId('body');
menuLoadOpts.mciMap = mciData.body.mciMap;
console.log('creating body.l..')
self.addViewController(
'body',
new ViewController( { client : self.client, formId : menuLoadOpts.formId } )