Skip to content

Commit

Permalink
[ADD]base_ux:confirmation windows when marking read
Browse files Browse the repository at this point in the history
add a confirmation window before marking all messages
in inbox as read when "MARK ALL AS READ" is clicked
  • Loading branch information
Pablo Paez committed Aug 18, 2021
1 parent 35274bc commit aea5b4d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base_ux/__manifest__.py
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Base UX',
'version': '13.0.1.2.0',
'version': '13.0.1.3.0',
'category': 'Base',
'sequence': 14,
'summary': '',
Expand All @@ -42,6 +42,7 @@
'views/mail_template_view.xml',
'views/res_company_view.xml',
'views/res_users.xml',
'views/discuss_extension.xml',
'wizards/merge_records_view.xml',
],
'demo': [
Expand Down
23 changes: 23 additions & 0 deletions base_ux/static/src/js/discuss.js
@@ -0,0 +1,23 @@
odoo.define('mail.Discuss.extenction', function (require) {
"use strict";
var Discuss = require('mail.Discuss');

var core = require('web.core');
var _t = core._t

Discuss.include({
init: function (parent, action, options) {
this._super.apply(this, arguments);},
/**
* @override
*/

_onMarkAllAsReadClicked: function () {
if (confirm("Esta a punto de eliminar los mensajes de la bandeja ¿Desea continuar?"))
{
this._thread.markAllMessagesAsRead(this.domain);
}
},

})
})
10 changes: 10 additions & 0 deletions base_ux/views/discuss_extension.xml
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="assets_backend" name="mail assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/base_ux/static/src/js/discuss.js"></script>
</xpath>
</template>
</data>
</odoo>

0 comments on commit aea5b4d

Please sign in to comment.