diff options
| author | Christophe Matthieu <chm@odoo.com> | 2018-03-29 17:46:24 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2018-04-19 17:17:54 +0200 |
| commit | 07cd24b1ecf3ab8edd3fffbf2fcd3a3e685f357c (patch) | |
| tree | 3fc6a94ed00c2501e83a102f07438ea87097fca8 /addons/web/views/webclient_templates.xml | |
| parent | 67a7d1f2b5ec1cdc2fa6677a359fc6cf10f02b85 (diff) | |
[IMP] web: convert notification popup in service and add buttons params
this.call('web.Notification', 'notify', params)
Display a notification at the appropriate location, and returns the
reference id to the same widget. Note that this method does not wait
for the appendTo method to complete.
@param {Object} params
@param {string} params.title notification title
@param {string} params.message notification main message
@param {string} params.type 'notification' or 'warning'
@param {boolean} [params.sticky=false] if true, the notification will stay
visible until the user clicks on it.
@param {string} [params.className] className to add on the dom
@param {function} [params.onClose] callback when the user click on the x
or when the notification is auto close (no sticky)
@param {Array<Object>} params.buttons
@param {function} params.buttons[0].click callback on click
@param {Boolean} [params.buttons[0].primary] display the button as primary
@param {string} [params.buttons[0].text] button label
@param {string} [params.buttons[0].icon] font-awsome className or image src
@returns {Number} notification id
this.call('web.Notification', 'close', notificationId)
Diffstat (limited to 'addons/web/views/webclient_templates.xml')
| -rw-r--r-- | addons/web/views/webclient_templates.xml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web/views/webclient_templates.xml b/addons/web/views/webclient_templates.xml index ae3b882e764..d4d0a1e8c37 100644 --- a/addons/web/views/webclient_templates.xml +++ b/addons/web/views/webclient_templates.xml @@ -192,7 +192,7 @@ <script type="text/javascript" src="/web/static/src/js/services/data_manager.js"></script> <script type="text/javascript" src="/web/static/src/js/services/report_service.js"></script> <script type="text/javascript" src="/web/static/src/js/services/session.js"></script> - <script type="text/javascript" src="/web/static/src/js/services/notification_manager.js"></script> + <script type="text/javascript" src="/web/static/src/js/services/notification_service.js"></script> <script type="text/javascript" src="/web/static/src/js/widgets/auto_complete.js"></script> <script type="text/javascript" src="/web/static/src/js/widgets/change_password.js"></script> <script type="text/javascript" src="/web/static/src/js/widgets/debug_manager.js"></script> @@ -499,6 +499,8 @@ <script type="text/javascript" src="/base/static/tests/base_settings_tests.js"></script> + <script type="text/javascript" src="/web/static/tests/services/notification_service_tests.js"></script> + <script type="text/javascript" src="/web/static/tests/fields/basic_fields_tests.js"></script> <script type="text/javascript" src="/web/static/tests/fields/field_utils_tests.js"></script> <script type="text/javascript" src="/web/static/tests/fields/relational_fields_tests.js"></script> |
