Browse Source

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

pull/309/head
George Daramouskas 7 years ago
committed by Holger Brunn
parent
commit
24df3cf769
  1. 1
      mail_edit/static/src/js/mail_edit.js
  2. 5
      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 () { bind_events: function () {
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.$('.oe_edit').on('click', this.on_message_edit); this.$('.oe_edit').on('click', this.on_message_edit);
this.$('.oe_delete').on('click', this.on_message_delete);
}, },
on_message_edit: function () { on_message_edit: function () {

5
mail_edit/static/src/xml/mail_edit.xml

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