* Progress on FSE / Area Posting

* Proof of concept work on user validation in FSE
* Term now has pipeWrite()
This commit is contained in:
Bryan Ashby 2015-08-19 22:10:18 -06:00
parent ca26cca55b
commit ec70cc8caa
8 changed files with 96 additions and 28 deletions

View file

@ -47,8 +47,9 @@ function FullScreenEditorModule(options) {
this.messageAreaId = options.extraArgs.messageAreaId || Message.WellKnownAreaIds.Private;
}
// netMail/crashMail | echoMail
//this.messageAreaId = 'netMail' === this.editorType ? Message.WellKnownAreaIds.Private : options.messageAreaId;
this.isLocalEmail = function() {
return 'email' === this.editorType && Message.WellKnownAreaIds.Private === this.messageAreaId;
};
this.getFooterName = function(editorMode) {
editorMode = editorMode || this.editorMode;
@ -312,7 +313,18 @@ function FullScreenEditorModule(options) {
this.mciReadyHandler = function(mciData) {
self.createInitialViews(mciData, function viewsCreated(err) {
self.viewControllers.header.on('leave', function headerViewLeave(view) {
if(2 === view.id) { // "to" field
self.validateToUserName(view.getData(), function result(err) {
if(err) {
// :TODO: display a error in a %TL area or such
view.clearText();
self.viewControllers.headers.switchFocus(2);
}
});
}
});
});
};
@ -460,3 +472,7 @@ FullScreenEditorModule.prototype.mciReady = function(mciData) {
//this['mciReadyHandler' + _.capitalize(this.editorType)](mciData);
};
FullScreenEditorModule.prototype.validateToUserName = function(un, cb) {
cb(null); // note: to be implemented by sub classes
};