summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets/notification.js
AgeCommit message (Collapse)Author
2020-06-10[IMP] web,*: make notification title optionalDhruv Patel
*odoo_referral,portal Currently, it is not possible to have one line notification, when you are not passing the title parameter as an option when generating the notification,then it will display the blank div with the default button icon only. so it is not possible to have one-line notifications since the title is mandatory. So the purpose of the task is to make the title optional, allowing for more minimalistic notification. Also removed some unnecessary titles from the notification and some stying change. This commit also increase the autoclose delay of non sticky notifications, from 2.5s to 4s. task : 2264749 closes odoo/odoo#52229 Related: odoo/enterprise#10981 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Dhruv Patel <dhp@odoo.com>
2019-12-09[REV] web: reverts update to fontawesome 5.11.2Kevin Baptiste
This reverts commit ff1c35513aecef5fbc30f7c2f3834450e719714e. closes odoo/odoo#41480 X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc Related: odoo/enterprise#7110 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28[IMP] web: update to fontawesome 4.7.0 to 5.11.2Kevin Baptiste
FontAwesome 5 introduced new names for some icons as described on https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes This commit replaces the old names to the new ones. closes odoo/odoo#35826 Taskid: 2050241 Related: odoo/enterprise#5180 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-09[IMP] web: keep toast open when hoveredfja-odoo
Previously non sticky toast were automaticaly closed after a delay. Now while a toast is hovered it will stay open and when the cursor leaves the toast, the delay is reset. Related to https://github.com/odoo/odoo/pull/32132 and https://github.com/odoo/odoo/pull/35209 Part of https://github.com/odoo/odoo/pull/35342 task-2047628
2019-06-28[IMP] web, *: display rpc warnings with toastsfja-odoo
* = test_website, partner_autocomplete - All the rpc warnings are now displayed using the notification system of https://github.com/odoo/odoo/commit/b94395b50175925fc7d1bd3655e5facb78a8ba2b - test_website is up to date Part of https://github.com/odoo/odoo/pull/32132 task-1894820
2019-05-14[FIX] web: restore notifications about disconnectionsfja-odoo
The disconnected/connected notifications were broken due to changes in the way the Notification template was loaded. We need it loaded in assets as we cannot load it afterward if the server is disconnected. This was broken by : https://github.com/odoo/odoo/pull/32793 closes odoo/odoo#33252 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-24[IMP] web, *: share and improve notification systemqsm-odoo
* barcodes, calendar, partner_autocomplete, web_settings_dashboard Make the notification system better, using bootstrap toast component, and make it available in the frontend. The toast component allowed to remove some JS code and made the component customizable by themes but it had to be reviewed/fixed to make it functional (maybe bootstrap will review its work in next versions). This work should still be improved because there are still too many ways (deprecated and not deprecated) to instantiate toasts in the backend. The goal here was however to make the toasts more modern and make them available in the frontend. This work is needed for some tasks. @kig-odoo and @fja-odoo made a pre-work to instantiate toasts in the frontend for their respective tasks. This commit unifies the system. Part of https://github.com/odoo/odoo/pull/32793 task-1970731 closes odoo/odoo#32793 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2018-04-19[IMP] web: convert notification popup in service and add buttons paramsChristophe Matthieu
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)
2018-03-05[FIX] web: bug introduced by forwardport 36945a58Aaron Bohy
PhantomJS doesn't like widgets that define two start functions.
2018-03-01[MERGE] forward port branch 11.0 up to c2e878e34c8Christophe Simonis
2018-02-27[FIX] web: NotificationManager: warnings styleAaron Bohy
Warnings are styled a bit differently than notifications, as their background is red (thanks to classname 'o_error' on the warning root element). This classname isn't correctly added since rev. 920df59, which changed the root element of the 'Notification' template, which is extended by the 'Warning' template, making qweb.js fail to add the 'o_error' classname.
2017-10-18[REF] web: refactor notification systemGéry Debongnie
This commit aims to bring the code closer to an ideal state. We want notifications to be a simple service, easy to use, and well documented.
2016-05-27[REF] report,web(_editor): services extracted in their own filesGéry Debongnie
session_instance.js moved from framework/ to services/ and renamed into session.js, which required to change the bundles in report and web_editor addons.
2015-07-24[IMP] web: modify notification.js like in enterpriseGéry Debongnie
The enterprise web client had to be modified to fix a crash. This crash does not occur in the community web client, but this commit makes sure that the semantics of the notification manager is the same as the enterprise version, to prevent future problems.
2015-07-23[IMP] web: New notification systemqsm-odoo
Backport of the Notification system
2015-03-18[IMP] web+addons: improvement to module systemGéry Debongnie
The module system needs to know the dependencies of a given module before executing the function. This is why the dependencies were defined once in an array, and then were described one more times in the call to require. But a trick can simplify this: the boot function can parse the string representation of the module and extract the calls to require from it. It is more work for the processor, but it leads to simpler module definitions.
2015-03-18[REF] web: add module system to the web clientGéry Debongnie
This commit introduces a new module system for the javascript code. Instead of using global (namespaced) variables everywhere (like openerp.web.whatever, ...), each file declare one (or more) module with its dependencies. Each module will be loaded after its dependencies, and will be given a reference to the return values. This change is a massive departure from the way the client worked previously. It will sadly break some/most history, but I am sure that the future git ecosystem will allow you to easily browse the history past this revision (one can dream). This commit feature: * main namespace is now odoo instead of openerp * a way to define modules and dependencies (inspired by requirejs) * many files have been splitted in simpler subfiles * basic support for debugging in odoo.__DEBUG__ * no global variable (i.e. nothing in window.openerp) * many bug fixes, many new bugs Future vision: this modularization should simplify future code development, simplify debugging and will allow a serious testing effort