Implement draft autosaving for mail compose.

- Auto saving interval is every 2 minutes.
This commit is contained in:
Hadi Nategh 2014-09-12 12:10:48 +00:00
parent 7ca9e5c6bf
commit adc8edb791

View File

@ -192,6 +192,11 @@ app.classes.mail = AppJS.extend(
this.mail_isMainWindow = false;
this.compose_fieldExpander_hide();
// Set autosaving interval to 2 minutes for compose message
window.setInterval(function (){
that.saveAsDraft(null,that.et2.getWidgetById('button[saveAsDraft]'),'autosaving');
}, 120000);
/* Control focus actions on subject to handle expanders properly.*/
jQuery("#mail-compose_subject").on({
focus:function(){