summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/base.xml
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2015-10-29 13:51:32 +0100
committerRaphael Collet <rco@openerp.com>2015-11-02 10:57:18 +0100
commitf72594bcc6bd30b1f3257fc2ad2cc8c4c682e8a0 (patch)
tree7e3bbb4e3532a0a56d3c2827141ee338f7d4c900 /addons/web/static/src/xml/base.xml
parent7d220a1eeb69f119f97214f144176705a203d357 (diff)
[IMP] web: add a generic notification feature inside form views
The notification box remains on the form until either: - the user closes it explicitly, or - the user edits the record, or - the form view is refreshed (switch to another record, or refresh form). Add a method `once` to `EventDispatcherMixin`, as it is convenient. Make `FormView` trigger events `to_view_mode` and `to_edit_mode`.
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
-rw-r--r--addons/web/static/src/xml/base.xml8
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 82197ef6efe..4ad7312d40c 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -1456,4 +1456,12 @@
</t>
</t>
+<t t-name="notification-box">
+ <div t-att-class="'alert alert-dismissible alert-' + type" role="alert">
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close">
+ <span aria-hidden="true" class="fa fa-times"></span>
+ </button>
+ </div>
+</t>
+
</templates>