mirror of
https://github.com/moparisthebest/mail
synced 2024-11-22 08:52:15 -05:00
removed unnecessary email model code
This commit is contained in:
parent
9842a060ad
commit
1491e9fd1d
@ -20,10 +20,8 @@
|
||||
|
||||
<script src="js/app-config.js"></script>
|
||||
|
||||
<script src="js/model/email-model.js"></script>
|
||||
<script src="js/model/folder-model.js"></script>
|
||||
<script src="js/model/account-model.js"></script>
|
||||
<script src="js/model/publickey-model.js"></script>
|
||||
|
||||
<script src="js/crypto/util.js"></script>
|
||||
<script src="js/crypto/pbkdf2.js"></script>
|
||||
|
@ -23,7 +23,7 @@
|
||||
return;
|
||||
}
|
||||
// set mail to reply to
|
||||
self.replyTo = new app.model.Email(resArgs.email);
|
||||
self.replyTo = resArgs.email;
|
||||
args.callback(self);
|
||||
});
|
||||
|
||||
@ -59,8 +59,8 @@
|
||||
fillFields: function() {
|
||||
var page = $(this.el),
|
||||
re = this.replyTo,
|
||||
from = re.get('from')[0],
|
||||
subject = re.get('subject');
|
||||
from = re.from[0],
|
||||
subject = re.subject;
|
||||
|
||||
// fill recipient field
|
||||
var replyToAddress = from.address;
|
||||
@ -71,8 +71,8 @@
|
||||
page.find('#subjectInput').val(subject);
|
||||
|
||||
// fill text body
|
||||
var body = '\n\n' + re.get('sentDate') + ' ' + from.name + ' <' + from.address + '>\n';
|
||||
var bodyRows = re.get('body').split('\n');
|
||||
var body = '\n\n' + re.sentDate + ' ' + from.name + ' <' + from.address + '>\n';
|
||||
var bodyRows = re.body.split('\n');
|
||||
var isHtml = false;
|
||||
_.each(bodyRows, function(row) {
|
||||
if (row.indexOf('</') !== -1) {
|
||||
|
@ -20,13 +20,13 @@
|
||||
return;
|
||||
}
|
||||
// set mail to reply to
|
||||
self.model = new app.model.Email(resArgs.email);
|
||||
self.model = resArgs.email;
|
||||
args.callback(self);
|
||||
});
|
||||
},
|
||||
|
||||
render: function() {
|
||||
var params = this.model.toJSON();
|
||||
var params = this.model;
|
||||
params.account = this.account;
|
||||
params.folder = this.folder;
|
||||
params.id = encodeURIComponent(params.id);
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
renderBody: function(tryHtml) {
|
||||
var page = $(this.el),
|
||||
emailBody = this.model.get('body');
|
||||
emailBody = this.model.body;
|
||||
|
||||
if (!tryHtml && emailBody.indexOf('</') === -1) {
|
||||
// render text email
|
||||
|
@ -23,10 +23,8 @@
|
||||
|
||||
<script src="js/app-config.js"></script>
|
||||
|
||||
<script src="js/model/email-model.js"></script>
|
||||
<script src="js/model/folder-model.js"></script>
|
||||
<script src="js/model/account-model.js"></script>
|
||||
<script src="js/model/publickey-model.js"></script>
|
||||
|
||||
<script src="js/crypto/util.js"></script>
|
||||
<script src="js/crypto/pbkdf2.js"></script>
|
||||
|
@ -15,11 +15,6 @@
|
||||
<script src="lib/jquery.mobile-1.2.0.min.js"></script>
|
||||
|
||||
<script src="js/app-config.js"></script>
|
||||
|
||||
<script src="js/model/email-model.js"></script>
|
||||
<script src="js/model/folder-model.js"></script>
|
||||
<script src="js/model/account-model.js"></script>
|
||||
<script src="js/model/publickey-model.js"></script>
|
||||
|
||||
<script src="js/view/login-view.js"></script>
|
||||
<script src="js/view/compose-view.js"></script>
|
||||
|
@ -36,7 +36,6 @@
|
||||
<script src="../../src/js/model/email-model.js"></script>
|
||||
<script src="../../src/js/model/folder-model.js"></script>
|
||||
<script src="../../src/js/model/account-model.js"></script>
|
||||
<script src="../../src/js/model/publickey-model.js"></script>
|
||||
|
||||
<script src="../../src/js/crypto/util.js"></script>
|
||||
<script src="../../src/js/crypto/pbkdf2.js"></script>
|
||||
|
@ -37,7 +37,6 @@
|
||||
<script src="../../src/js/model/email-model.js"></script>
|
||||
<script src="../../src/js/model/folder-model.js"></script>
|
||||
<script src="../../src/js/model/account-model.js"></script>
|
||||
<script src="../../src/js/model/publickey-model.js"></script>
|
||||
|
||||
<script src="../../src/js/crypto/util.js"></script>
|
||||
<script src="../../src/js/crypto/pbkdf2.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user