summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/libs/jquery.js
AgeCommit message (Collapse)Author
2021-04-21[FIX] web: find scrollingElement despite roundingNicolas Lempereur
In mass mailing edition, in some configuration of: - being in a modal or not - size of window - zoom level we might get an error when getting the scrolling element. For example when editing a mass mailing, if I set my viewport to 595 pixels height and have a 90% zoom, the editor is broken. This is because in SnippetsMenu.starts `$().getScrollingElement()` doesn't find an element that has the height of body. In my use case body height is 329.111 pixels, and scroll height is 328 pixels. Testing different zoom level and viewport height, the maximum difference I was able to get was 1.25 so this commit increase to 1.5 the maxmimum difference. opw-2455727 opw-2469174 closes odoo/odoo#69592 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-16[FIX] web: properly find the scrolling element of zoomed pagesqsm-odoo
To find the main element which scrolls in the page, we rely on its height being as tall as the body one. The code which checks that was making a comparison between a rounded value and floating value without care of the rounding errors that might induce, especially on zoomed pages. Fixes https://github.com/odoo/odoo/issues/63306 closes odoo/odoo#67961 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-13[FIX] web_editor, *: ease understanding of snippet drag, not clickqsm-odoo
*: web, website Make the empty oe_structure messages "wizz" when the user clicks on a snippet to drag instead of dragging it. Part of https://github.com/odoo/odoo/pull/60837 Related to task-2363616 closes odoo/odoo#60837 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-24[FIX] website, *: review modal behaviors with right-panelizationqsm-odoo
*: web, web_editor Since the right-panelization made with [1], the modals were not compensating the body scrollbar when opened anymore and the backdrop was misplaced. This commit fixes the problems generically, to support modals with non-body scrolling. [1]: https://github.com/odoo/odoo/pull/57975 closes odoo/odoo#58414 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-22[IMP] website, *: move page scrollbar to #wrapwrapqsm-odoo
*: web, web_editor, portal, account, website_blog, website_forum This is probably not ideal to move the scrolling behavior out of the html element but this will be needed for the editor to not have a double scrollbar on the right. This is actually also useful for the scrollbar to appear under the purple odoo menu instead of its right. This commit, if to be reverted in the future, however contains many improvements to make the transition easier that should be kept: jQuery and Odoo functions to be able to scrollTo a specific element, get the top scrollable element, check if an element is scrollable, etc. Also, some magic was done: if some code tries to scroll to a specific scroll position via jQuery's scrollTop or animate functions on the html/body element, those will still work as intended (obviously, using the new utils to do that is however recommended). This commit also reviews our scroll behaviors to make them more robust and share the code. Part of https://github.com/odoo/odoo/pull/57975 task-2344227
2019-12-06[REF] web_editor: review user value widgets scssqsm-odoo
Part of https://github.com/odoo/odoo/pull/41402
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-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-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.