* Fix word wrap bug introduced prior -- use 'expand' not 'expandTabs'

* Notes on better access of views by ID
* Work on apply process a bit
* Replies can now be saved
This commit is contained in:
Bryan Ashby 2015-09-20 01:29:07 -06:00
parent a6d00b05a7
commit b15d9a0bf8
7 changed files with 71 additions and 7 deletions

View file

@ -123,6 +123,10 @@ function FullScreenEditorModule(options) {
return 'email' === self.editorType && Message.WellKnownAreaNames.Private === self.messageAreaName;
};
this.isReply = function() {
return !_.isUndefined(self.replyToMessage);
};
this.getFooterName = function() {
return 'footer' + _.capitalize(self.footerMode); // e.g. 'footerEditor', 'footerEditorMenu', ...
};
@ -140,6 +144,38 @@ function FullScreenEditorModule(options) {
}[name];
};
/*ViewModeHeader : {
From : 1,
To : 2,
Subject : 3,
DateTime : 5,
MsgNum : 6,
MsgTotal : 7,
ViewCount : 8,
HashTags : 9,
MessageID : 10,
ReplyToMsgID : 11
},*/
// :TODO: convert to something like this for all view acces:
this.getHeaderViews = function() {
var vc = self.viewControllers.header;
if(self.isViewMode()) {
return {
from : vc.getView(1),
to : vc.getView(2),
subject : vc.getView(3),
dateTime : vc.getView(5),
msgNum : vc.getView(7),
// ...
};
}
};
this.setInitialFooterMode = function() {
switch(self.editorMode) {
case 'edit' : self.footerMode = 'editor'; break;
@ -158,6 +194,11 @@ function FullScreenEditorModule(options) {
message : self.viewControllers.body.getFormData().value.message,
};
if(self.isReply()) {
msgOpts.replyToMsgId = self.replyToMessageId;
}
self.message = new Message(msgOpts);
};