diff --git a/core/fse--class.js b/core/fse--class.js index 2cf5b648..c2b09fb2 100644 --- a/core/fse--class.js +++ b/core/fse--class.js @@ -255,6 +255,11 @@ function FullScreenEditor(options) { from.acceptsFocus = false; from.setText(self.client.user.username); + callback(null); + }, + function setInitialFocus(callback) { + self.viewControllers.body.setFocus(false); + self.viewControllers.header.switchFocus(2); callback(null); } ], @@ -263,6 +268,15 @@ function FullScreenEditor(options) { } ); }; + + this.initObservers = function() { + this.viewControllers.header.on('submit', function headerSubmit(formData, extraArgs) { + if(formData.id === self.getFormId('header')) { + self.viewControllers.header.setFocus(false); + self.viewControllers.body.switchFocus(1); + } + }); + }; } require('util').inherits(FullScreenEditor, events.EventEmitter); @@ -283,6 +297,10 @@ FullScreenEditor.prototype.enter = function() { self.createInitialViews(function viewsCreated(err) { callback(err); }); + }, + function prepObservers(callback) { + self.initObservers(); + callback(null); } ], function complete(err) { @@ -294,3 +312,5 @@ FullScreenEditor.prototype.enter = function() { FullScreenEditor.prototype.leave = function() { }; + + diff --git a/mods/art/msg_area_post_header.ans b/mods/art/msg_area_post_header.ans index 0900ecd0..7ea3a56f 100644 Binary files a/mods/art/msg_area_post_header.ans and b/mods/art/msg_area_post_header.ans differ diff --git a/mods/menu.json b/mods/menu.json index 2c7f222e..4655df84 100644 --- a/mods/menu.json +++ b/mods/menu.json @@ -275,6 +275,41 @@ "footerView" : "demo_fse_netmail_footer_view.ans", "help" : "demo_fse_netmail_help.ans" } + }, + "form" : { + "0" : { + "ETETTLTL" : { + "mci" : { + "TL1" : { + "width" : 36, + "argName" : "from" + }, + "ET2" : { + "width" : 36, + "argName" : "to", + "focus" : true + }, + "ET3" : { + "width" : 65, + "argName" : "subject", + "maxLength" : 72, + "submit" : true + }, + "TL4" : { + "width" : 19, + "textOverflow" : "..." + } + }/* + "submit" : { + "3" : [ + { + "value" : { "subject" : null }, + "action" : "@method:fseSubmitProxy" + } + ] + }*/ + } + } } }, /* diff --git a/mods/msg_area_post.js b/mods/msg_area_post.js index d5b348e2..0e627e7a 100644 --- a/mods/msg_area_post.js +++ b/mods/msg_area_post.js @@ -38,6 +38,12 @@ function MessageAreaPostModule(options) { fse.enter(); }; + + this.menuMethods = { + fseSubmitProxy : function(formData, extraArgs) { + console.log(formData) + } + }; } require('util').inherits(MessageAreaPostModule, MenuModule);