You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
886 B
25 lines
886 B
openerp.mail_recovery = function (session) {
|
|
var mail = session.mail;
|
|
|
|
mail.ThreadComposeMessage = mail.ThreadComposeMessage.extend({
|
|
bind_events: function () {
|
|
var self = this;
|
|
this.$('textarea').on('focus', self.on_focus_textarea);
|
|
this.$('textarea').on('keyup', self.on_keyup_textarea);
|
|
this._super();
|
|
},
|
|
on_focus_textarea: function(event) {
|
|
var $input = $(event.target);
|
|
if (!$input.val()) {
|
|
$input.val(window.localStorage['message_storage']);
|
|
}
|
|
},
|
|
on_keyup_textarea: function(event) {
|
|
window.localStorage['message_storage'] = $(event.target).val();
|
|
},
|
|
on_message_post: function (event) {
|
|
window.localStorage['message_storage'] = '';
|
|
return this._super(event);
|
|
},
|
|
});
|
|
};
|