* Very early work on FidoNet, Messages, etc.
This commit is contained in:
24
mods/fse.js
24
mods/fse.js
@@ -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) {
|
||||
|
||||
|
||||
@@ -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" : {
|
||||
|
||||
Reference in New Issue
Block a user