[12.0] web_notify: improve popup UI (#1231)

* [ADD]: all available bootstrap notifications (success/danger/warning/info/default)
* [IMP] use black color for text for default notification.
* [FIX] reverted require string for `bus.Longpolling` and rename `on_message_received` to `on_message` to prevent collisions.
This commit is contained in:
Shepilov Vladislav
2019-04-05 13:39:14 +03:00
committed by David
parent af2656ba00
commit 3db7072296
17 changed files with 406 additions and 117 deletions

View File

@@ -11,9 +11,15 @@
<page string="Test web notify" name="test_web_notify">
<group>
<group>
<button name="notify_info"
<button name="notify_success"
type="object"
string="Test info notification"
string="Test success notification"
class="oe_highlight"/>
</group>
<group>
<button name="notify_danger"
type="object"
string="Test danger notification"
class="oe_highlight"/>
</group>
<group>
@@ -22,6 +28,18 @@
string="Test warning notification"
class="oe_highlight"/>
</group>
<group>
<button name="notify_info"
type="object"
string="Test info notification"
class="oe_highlight"/>
</group>
<group>
<button name="notify_default"
type="object"
string="Test default notification"
class="oe_highlight"/>
</group>
</group>
</page>
</xpath>

View File

@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="assets_backend" name="web_notify assets" inherit_id="web.assets_backend">
<link rel="stylesheet" type="text/scss" href="/web/static/src/scss/webclient.scss" position="after">
<link rel="stylesheet" type="text/scss" href="/web_notify/static/src/scss/webclient.scss"/>
</link>
<xpath expr="." position="inside">
<script type="text/javascript" src="/web_notify/static/src/js/web_client.js"/>
<script type="text/javascript" src="/web_notify/static/src/js/widgets/notification.js"/>
</xpath>
</template>
</odoo>