Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD]base_ux:confirmation windows when marking read
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
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
}, | ||
|
||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |