Browse Source

[IMP] Forbid other users from deleting messages, add a delete function.

pull/309/head
George Daramouskas 6 years ago
committed by Holger Brunn
parent
commit
24df3cf769
  1. 1
      mail_edit/static/src/js/mail_edit.js
  2. 11
      mail_edit/static/src/xml/mail_edit.xml

1
mail_edit/static/src/js/mail_edit.js

@ -7,6 +7,7 @@ openerp.mail_edit = function (instance) {
bind_events: function () {
this._super.apply(this, arguments);
this.$('.oe_edit').on('click', this.on_message_edit);
this.$('.oe_delete').on('click', this.on_message_delete);
},
on_message_edit: function () {

11
mail_edit/static/src/xml/mail_edit.xml

@ -3,9 +3,14 @@
<template>
<t t-extend="mail.thread.message">
<t t-jquery=".oe_msg_icons .oe_reply" t-operation="before">
<span class="oe_edit">
<a title="Edit Mail" class="oe_e">&#038;</a>
</span>
<t t-if="widget.is_author">
<span class="oe_edit">
<a title="Edit Mail" class="oe_e">&#038;</a>
</span>
<span class="oe_delete">
<a title="Delete" class="oe_e">[</a>
</span>
</t>
</t>
</t>
</template>
Loading…
Cancel
Save