summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/services/config.js
AgeCommit message (Collapse)Author
2020-08-18[IMP] web: add a size_changed bus eventJeremy Kersten
This commit will add a bus in the web.config config that allows to trigger events. The first use case is the trigger of the size_changed event that is triggered each time the size of the screen changed of bootstrap breakpoint. task-2276740 PR #53175
2019-12-09[REF] web: rewrite pivot view renderer with OWLPierre Rousseau
Because the webclient and other higher level components such as the actionManager are not yet rewritten in OWL, we cannot make a complete migration of the controller and the model to a more OWL-ish code. We have rewritten the renderer completely in OWL, it uses more extensively a template and manages its own state and its sub-components. We did not rewrite the controller, however we have made it inherit from `web.ControllerAdapter` which is a thin compatibility layer used when a odoo controller uses a OWL renderer. In the tests, the only changes are that all the events triggered by the test and handled by OWL must be triggered on DOM nodes directly and not on JQuery elements. closes odoo/odoo#39491 Related: odoo/enterprise#7135 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com> Co-authored-by: VincentSchippefilt <vsc@odoo.com> Co-authored-by: pro-odoo <pro@odoo.com>
2019-10-18[REF] web,barcodes: simplify mobile device detectionRomeo Fragomeli
In this commit, we introduce "isMobileDevice". Do not confuse with isMobile. isMobile: A frequent use case is to have a different render in 'mobile' mode, meaning when the screen is small. This flag (boolean) is true when the size is XS/VSM/SM. It is also updated dynamically. isMobileDevice: Mobile device detection using userAgent. This flag doesn't depend on the size/resolution of the screen. It targets mobile devices which suggests that there is a virtual keyboard. Task ID: 2090202
2019-06-05[IMP] *: use new helper config.isDebug()Romain Derie
Before this commit, both config and session were aliases to odoo.debug. Now, config.isDebug() should be call, with possibility to pass a parameter to check if we are in a specific debug mode such as 'tests' or 'assets'. task-1934445 Coming with https://github.com/odoo/enterprise/pull/4281 Closes https://github.com/odoo/odoo/pull/33213
2019-06-05[IMP] web, web_tour, website, point_of_sale: adapt code to new debugRomain Derie
As now the debug state is stored in session, the JS framework code and some templates needed some changes. First, the debug state is retrieved from session and not the URL anymore. Second, the debug state does not need to be forwarded as it is now persistent. task-1934445 Comes with https://github.com/odoo/enterprise/pull/4281 Closes #33213
2018-09-13[FIX] web: correct mobile screen size.Hiral Bhavsar
Revision on https://github.com/odoo/odoo/commit/d91ec258e6a31153beb9eb16cfe8f916546b7688 The commit above reverts a commit when we were using bootstrap 3. The equivalent of XS in bootstrap 3 is SM in bootstrap 4. So the correct revert with bootstrap 4 is to use SM. Also removing useless style on 'o_mobile_menu_opened'. Closes #26434
2018-08-10[MERGE] forward port branch saas-11.4 up to edd586002e9Christophe Simonis
2018-08-02Revert "[IMP] web: use burger menu for tablet in vertical mode"Adrien Dieudonne
This reverts commit 4e5f826ce53b9e4cb73eea77935ea82e81ac66b9 for two reasons: 1) A lot of people are working with splitted desktop screen and will see the view switcher/search as on mobile: it's not efficient. Only the burger menu should have been visible for the tablets, not the other mobile features. 2) When you switch between vertical mode and H mode, we don't want to change the mobile mode because widgets aren't reinstantiated and some features don't work. For example, the burger menu is broken if you switch from H mode to V mode. Task-1869468
2018-07-27[REF] web, *: BS4, update JS media queriesqsm-odoo
* website_quote, website_sale
2018-05-29[IMP] web: use burger menu for tablet in vertical modeKinjal Mehta
Task #34853
2018-04-12[FIX] web: define XL size in config.deviceMartin Geubelle
In Less, the size_class XL is now defined and can be used in media-queries. It is also added in JS for the sake of consistency. This new size is needed for a fix in enterprise.
2018-01-26[IMP] web,*: config: add XXS size to config.deviceAaron Bohy
In Less, the size_class XXS is defined and used in media queries. This rev. adds it in JS for sake of consistency. Code in addons comparing the size_class needed to be adapted due to the new XXS size_class. Moreover, we now use the helper 'config.device.isMobile' everywhere we should, instead of manually comparing the size_class. Finally, we changed the way the config.device has to be specified in the test environment. From now on, only the size_class should be set, and the isMobile flag is computed automatically.
2018-01-16[FIX] web: config.debug and session.debug equivalenceAaron Bohy
Before this rev., config.debug was always a boolean, whereas it should also encode the special value 'assets', as done in session.
2017-10-18[FIX] web,*: replace core.debug by config.debugKhoi Nguyen
2017-09-29[FIX] web, mail, base: config's `isMobile` definitionqsm-odoo
The `isMobile` variable was defined at the right place (`config.device`) but was set at the wrong place (`config`). Thank you for making me author of all the `isMobile` lines by the way... :)
2017-09-18[FIX] *: fix a bunch of incorrectly documented docstringXavier Morel
Fix a bunch of ill-documented/incomplete/incorrect method docs Without this, the automatic doc generation does not work.
2017-04-19[ADD] web : add isMobile attribute directly in config.jsDharmraj Jhala
It is frequently needed whenever we want to make something responsive Also, we refactor the code to the new coding guidelines (this part was done by ged)
2017-04-11[REF] web, *: redesign all JS viewsGéry Debongnie
This commit introduce a full redesign of all JS views. We started basically from scratch. The goal was to unify all the various views under a common framework, to make them testable, to make then usable in different conditions (in studio, or in the frontend), and to make our lives easier. Some important points are: - we introduced new coding guidelines (camelCase, 80 chars width, ...) - we have a brand new testing framework (still QUnit based) - kanban view moved to the web addon - calendar view (formerly web_calender) moved to web as well - the tree view was removed - all new code should be documented We hope that this code is the start of a new era for the Odoo web client, we want to have a high quality codebase, well documented, well tested, well designed. Work done by the framework team: mostly aab, ged, chm, dmo, qsm