* Very early work on FidoNet, Messages, etc.

This commit is contained in:
Bryan Ashby
2015-07-12 22:56:33 -06:00
parent ab12974430
commit 5907c1d024
4 changed files with 150 additions and 35 deletions

View File

@@ -6,6 +6,7 @@ var ViewController = require('../core/view_controller.js').ViewController;
var ansi = require('../core/ansi_term.js');
var theme = require('../core/theme.js');
var MultiLineEditTextView = require('../core/multi_line_edit_text_view.js').MultiLineEditTextView;
var Message = require('../core/message.js').Message;
var async = require('async');
var assert = require('assert');
@@ -47,6 +48,27 @@ function FullScreenEditorModule(options) {
}[name];
};
this.getMessage = function() {
var headerForm = self.viewControllers.header.getFormData();
console.log(headerForm)
var messageOpts = {
areaId : Message.WellKnownAreaIds.Private,
toUserName : headerForm.to,
fromUserName : headerForm.from,
subject : headerForm.subject,
message : 'This is the message',
};
console.log(messageOpts);
/*var msg = new Message(messageOpts);
msg.persist(function persisted(err, msgId) {
});
*/
};
this.redrawFooter = function(options, cb) {
async.waterfall(
[
@@ -366,7 +388,7 @@ function FullScreenEditorModule(options) {
});
},
editModeMenuSave : function(formData, extraArgs) {
self.getMessage();
},
editModeMenuQuote : function(formData, extraArgs) {

View File

@@ -514,15 +514,18 @@
// :TODO: from/to may be set by args
// :TODO: focus may change dep on view vs edit
"width" : 36,
"focus" : true
"focus" : true,
"argName" : "to"
},
"ET2" : {
"width" : 36
"width" : 36,
"argName" : "from"
},
"ET3" : {
"width" : 65,
"maxLength" : 72,
"submit" : [ "enter" ]
"submit" : [ "enter" ],
"argName" : "subject"
}
},
"submit" : {
@@ -541,7 +544,8 @@
"MT1" : {
"width" : 79,
"height" : 17,
"text" : "" // :TODO: should not be req.
"text" : "", // :TODO: should not be req.
"argName" : "message"
}
},
"submit" : {