summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/libs
AgeCommit message (Collapse)Author
2019-04-01[IMP] web: remove nvd3 libraryMathieu Duckerts-Antoine
It has been decided to use Chart.js instead of nvd3 to render charts. Now that nvd3 is no more in use, we remove it. Task ID: 1946138
2019-02-27[FIX] web: disable (new) sanitization of tooltipsqsm-odoo
Bootstrap 4.3.1 introduced tooltip sanitization. Odoo should normally use tooltips for secure content anyway, so this commit disables this sanitization. A proper analyse of our tooltip should however be done to know if sanitizing is needed (it can also be enabled case by case).
2018-09-20[IMP] web: add a fix on underscore to support cancellableThrottleVincent Schippefilt
2018-08-22[FIX] web: restore odooBounce once againqsm-odoo
The odooBounce (previously openerpBounce) function has been fixed many times over the years. Each time breaking the layout a different way after the backend was redesigned. It is time for the proper fix: no more JS animation relying on jQuery, instead: a CSS animation. Let's try a bouncing outline instead of a bouncing button for a change.
2018-08-07[FIX] web: BS4, fix tooltip flickering issuesSiddarth Gajjar
Closes #26186
2018-07-27[REF] web, *: BS4, adapt use of tooltip/popover.jsqsm-odoo
2018-07-13[IMP] web: replace iframe-based get_file by XHRXavier Morel
The error handling in get_file has always been somewhat problematic (sarcasm ho!). Pending PR #24854 attempts to add special handling for gateway timeout aside from its base stuff, and that's really quite terrible due to get_file's limitation of only being able to read the content of the document loaded in the iframe (no proper access to status codes & al). That was the occasion to look up modern API and see if we could do file downloads in JS without iframe crap. Turns out we can: xhr2 is well supported so we can POST, get a blob back, and create a "local download" for that in-memory blob using either a[download] (most browsers) or msSaveBlob (IE10+, that's actually a convenient-to-great API and it's a shame there's nothing like it in the standard). The changes are not trivial but save ~30LOC and most of the overhead is replicating the old/weird error handling as that requires additionally decoding the blob to a string & parsing that string to a document before being able to get the content (whereas before we'd just access to the document loaded in the iframe). OTOH we can now properly forward non-200 status codes to the crash manager (as name) which will allow using regular CM hooks to provide custom warning and error messages. Note that this requires two libraries: * a stripped down version of the content-disposition NPM lib, as download file names are provided via that header and parsing the header is decidedly non-trivial * the download.js library as it handles the various edge cases from different browsers, I'm don't think all of it is necessary for our use case but the library is not that big so no real point in trying to strip it out and potentially break it in the process
2018-03-22[FIX] base: settings view match on label.textJeremy Kersten
Before this commit, search was broken because containsLike was searching on the innerHtml. (3dd93ed129) Settings use _wordHighlighter to change the background of the matching text into the label, so the label was not only text, but html. <label><span class="highlighter">Mul</span>ti-company</label> : looking for (mul) After this commit, the match is based on the text content and not on the html.
2017-09-29[FIX] web: max one wiggle per readonly clickNicolas Lempereur
The wiggling effect of the edit button when clicking on the form (hinting that to change the form you should edit it) could happen several times. With 85d1e76 there was also a visual deffect on the Edit button when the wiggle happened several times, because bounce are stacked but the CSS class was removed after the first bounce was removed.
2017-08-31[IMP] web: lazy load nvd3, ace and fullCalendar lib to reduce asset sizeChristophe Matthieu
2017-08-03[REF] web, *: improve behavior of jQuery extension 'prependEvent'qsm-odoo
* web_editor Odoo extends jQuery to add some utility functions. The 'prependEvent' one add the possibility to add an event handler on an element (like the jQuery built-in 'on' function) but to be executed before the already binded ones. This function was however incomplete and did not allow to use jQuery namespaced events.
2017-08-03[REF] web, *: create jQuery ':hasVisibility' and ':hasOpacity' selectorsqsm-odoo
* web_editor, web_tour jQuery has the built-in ':visible' selector. This is however not enough as this only checks if the element and its parents have a visible 'display' property. Ironically, if the element has the 'visibility' property set to 'hidden', it will be considered ':visible' by jQuery. This commit creates the ':hasVisibility' and ':hasOpacity' selectors which respectively check if the element and its parents have a visible 'visibility' property and a visible 'opacity' property.
2017-06-21[IMP] web, *: reorganize our libraries' extensionsqsm-odoo
* web_editor, web_tour, website_event_track Before this commit, one JS file was responsible for all the library extensions and fixes. There were two main problems with this system: - The file was only available in the backend (as some extensions are made on backend-only libraries). - Some other modules were doing library customizations. This commit creates one file per library to regroup their associated customization and adds them in the right asset. These are placed in the web module and every other module should avoid doing customizations. This allows to have libraries consistency accross all modules and between the backend and the frontend.