mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 23:17:02 +03:00
Small fixes and code refactoring
This commit is contained in:
parent
e6c712862d
commit
1a85330770
67 changed files with 413 additions and 181 deletions
|
|
@ -115,22 +115,8 @@
|
|||
|
||||
if (this.editor)
|
||||
{
|
||||
this.setBody('');
|
||||
}
|
||||
};
|
||||
|
||||
TemplatePopupView.prototype.setBody = function (sBody)
|
||||
{
|
||||
if (this.editor)
|
||||
{
|
||||
if (':HTML:' === sBody.substr(0, 6))
|
||||
{
|
||||
this.editor.setHtml(sBody.substr(6), false);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.editor.setPlain(sBody, false);
|
||||
}
|
||||
this.editor.setPlain('', false);
|
||||
this.editor.setReadOnly(true);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -138,9 +124,7 @@
|
|||
{
|
||||
if (this.editor)
|
||||
{
|
||||
this.body(
|
||||
(this.editor.isHtml() ? ':HTML:' : '') + this.editor.getData()
|
||||
);
|
||||
this.body(this.editor.getDataWithHtmlMark());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -152,12 +136,12 @@
|
|||
this.editor = new HtmlEditor(self.signatureDom(), function () {
|
||||
self.populateBodyFromEditor();
|
||||
}, function () {
|
||||
self.setBody(sBody);
|
||||
self.editor.setHtmlOrPlain(sBody);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
this.setBody(sBody);
|
||||
this.editor.setHtmlOrPlain(sBody);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -212,7 +196,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
TemplatePopupView.prototype.onFocus = function ()
|
||||
TemplatePopupView.prototype.onShowWithDelay = function ()
|
||||
{
|
||||
this.name.focus(true);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue