summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets
AgeCommit message (Collapse)Author
2019-03-13[MERGE] forward port branch saas-12.2 up to c9f832d9f03Christophe Simonis
closes odoo/odoo#31790 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-11[MERGE] forward port branch saas-12.1 up to 2b3296bbf8bChristophe Simonis
2019-03-06[REF] web: adapt code after jQuery updateVincent Schippefilt
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-02-27[FIX] web: correctly handle (no result) selection in searchMartin Geubelle
In the recent control panel refactoring, selecting '(no result)' (when using the autocomplete on a many2one for example) was no correctly handled and was leading to a traceback. It is now correctly handled and the search bar is correctly re-rendered. Task 1936745 closes odoo/odoo#31438
2019-02-18[FIX] *: various docstring formatting issuesXavier Morel
Would yield block quotes instead of code blocks or lists or whatnot.
2019-02-14[IMP] web Add widget signature on binary fieldjbm-odoo
Add a new widget for binary fields. It open a dialog box and the user can sign manually, or an signature can be draw automatically or he can upload a picture of his signature. Move fonts, controller, scss,templates about signature from portal to web to avoid redundance closes odoo/odoo#30222
2019-02-11[MERGE] forward port branch saas-12.1 up to 93d736e905eChristophe Simonis
2019-02-25[IMP] web: graph view legend and tooltips improvementsJuhil Somaiya
This commit ameliorates the tooltips and the legend of the graph view in its different modes (bar, line, and pie). Related task id: 1917940 Co-authored-by: Mohammed Shekha <msh@openerp.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> closes odoo/odoo#29747
2019-02-20[REF] web: small refactoring for export wizardKishan Gajjar
- add missing docstrings - correctly order functions - move functions in correct sections - follow JS guidelines closes #31261
2019-02-04[FIX] web: allow user to move cursor in search barGéry Debongnie
With the control panel refactoring, the auto_complete widget was set on a different target, which caused issues with the search bar: the event handlers for the search bar were triggered before the handlers for the auto_complete widget. With this commit, we make sure they are handled in the proper order. Also, a small piece of code that was supposed to check the position of the cursor was lost. closes odoo/odoo#30795
2019-02-06[IMP] web: Set a timeout on rainbow man destructionAaron Bohy
Avoid traceback when the click that triggered the rainbow man is the click that closes it. Example: The last step of a tour. closes odoo/odoo#29969
2019-01-31[MERGE] forward port branch 12.0 up to cb8fefa8999Christophe Simonis
2019-01-31[FIX] web: do not select disabled elementMartin Trigaux
If xlwt is not installed on the server, the option is disabled. However, the first element was checked, even if it is disabled. Trying to export record without xlwt was causing a traceback. Introduced at b60de0db41b where xls is now the first choice closes odoo/odoo#30724
2019-01-30[FIX] web: reload view when pressing enter in search barGéry Debongnie
Before the control panel refactoring, whenever a user pressed ENTER in the search bar (with no text), the current view was reloaded. This untested behaviour was changed (not on purpose) with that refactoring: instead of reloading, the search view add a useless filter in the list of facets. We restore the previous behaviour in this commit. closes odoo/odoo#30503
2019-02-04[MERGE] forward port branch saas-12.1 up to 4524ad06a8aChristophe Simonis
2019-01-30[FIX] web: datepicker fallbacks to default english localeJulien (juc) Castiaux
When using the datepicker with norwegian locales, the dates are correctly formatted using the norwegian locale but the name of the months are shown in english. This cause a date validation error and thus it is not possible to change the date. tempusdominus.js uses moment.js to deal with dates, it sometimes copies/creates some and set their option according to the ones given at instantiation time and fallbacks on default options for that are not set. opw-1922437 closes odoo/odoo#30276
2019-01-09[FIX] web: make pie chart title translatableNicolas Martinelli
The Pie Chart title is not translatable, since a string defined in a `t-att-` cannot be translated. We use the attribute `title` instead. Tests are adapted in https://github.com/odoo/enterprise/pull/3379 opw-1908220 closes odoo/odoo#29991
2019-01-04[MERGE] forward port branch saas-11.3 up to 27a084eb814Christophe Simonis
2019-01-03[FIX] web: attach document fix click on firefoxNicolas Lempereur
As of saas-11.3 there is a "Attach document" widget that is meant to more easily add attachment. But on firefox the click event is coming from the button, where on other browsers it was possibly from a child element. So the code expecting the child element did not work on firefox. opw-1920842 closes #29903
2018-12-22[FIX] web: Add missing aria attributes in menusLuis González
Some aria attributes were missing on menus, and are required to ensure a good compatibility with keyboard users and screen readers. To solve the above, the following attributes are included: - `aria-expanded`: this should be present in all dropdown menus. This is set on elements with class `dropdown-toggle` and `o_closed_menu`. - `role`: used to improve given information about what elements are for. It is added in the following cases: 1. Non-button elements that have the class `dropdown-menu` are set to `role="button"`. 2. Menu items that have the class `dropdown-item` are set to `role="menuitem"`. 3. Menu separators that have the class `dropdown-divider` are set to `role="separator"`. This is a continuation of baa1c515c592 closes odoo/odoo#29719
2019-01-14[MERGE] forward port branch 12.0 up to 6a0675d36ddChristophe Simonis
2019-01-09[MERGE] forward port branch 12.0 up to 3e4138deaa2Christophe Simonis
closes odoo/odoo#30045
2018-12-07[REF] web: move ControlPanel inside controllers/actionsGéry Debongnie
This branch introduces a large-scale reorganization of the component tree generated by the web client. The short version is that now, the control panel is a child of the view controller and no longer a sibling. Graphically (and simplified), we go from this: webClient / | \ ... ... actionManager / \ controlPanel viewController / \ to this: webClient / | \ ... ... actionManager | viewController / | \ ControlPanelController / \ CPRenderer CPModel The motivation is that this work moves the code where it should be. Before this commit, it was kind of weird to have code in the controllers to render buttons outside of their root node (in renderButtons). Also, the action manager had to take care of coordinating search view states between view transitions. So, this work simplifies the code. It also makes it easier to extend. We see day after day that Odoo needs to take care of more complex UI needs, and in many cases, these needs were quite difficult to implement (we prefer spaghettis in our plates, not in our code). The changes in this branch should open the way to implement these features. For example, - it will now be easy to add the possibility of views (for example, the search view or a new ControlPanel view) to add custom buttons (of type action or object) in the control panel. - Another need will be to serialize/ restore the state of the search view across action boundaries (needed by the dashboard). - Another example is the possibility for views to customize easily the presence/absence of sub menus (filters/groupbys/favorites/ time range/...) - Another need is an easier way for views/client action to customize their control panel. This commit also contains a large rewrite of the search view (so it is more inline with our architecture and easier to maintain). Part of task 1893568 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com>
2018-11-29[MERGE] forward port branch 12.0 up to 82a1e1dcc33Christophe Simonis
2019-01-28[MERGE] forward port branch saas-12.1 up to d3b8422c9c4Christophe Simonis
closes odoo/odoo#30614
2019-01-17[REF] web_editor,*: Move and rename files to prepare refactoringChristophe Matthieu
The refactoring of the wysiwyg editor and 'html' field allows us to move some of the code that was in web_editor but only used in website or in mass_mailing. Some parts are still in web_editor but will be moved at a later time.
2019-01-09[MERGE] forward port branch saas-12.1 up to 8aa8548d8abChristophe Simonis
2019-01-08[IMP] web: use `showSearchInput` in model field selectorMartin Geubelle
The option `showSearchInput`, which is used on the model field selector to display a search input that filters the displayed fields, is not set by default. This includes the model field selector instantiated in the `domain` field widget. closes odoo/odoo#29986
2018-10-15[IMP] web: add `showSearchInput` option on ModelFieldSelectorMartin Geubelle
The option `showSearchInput` has been added on the ModelFieldSelector to allow the user to easily filter the displayed fields. An input is displayed in the popover title. The search method is fuzzy for optimal results. closes odoo/odoo#27788
2018-10-11[MERGE] forward port branch 11.0 up to 717f4583949Christophe Simonis
2018-10-11[FIX] web: restore broken datepicker input behaviorMartin Geubelle
In Firefox, the input behavior and visual representation (navigation, caret placement, value selection, etc.) was broken when using a datepicker (easily reproductible on date and datetime widgets). This was due to the `focus` event being stopped on the input, which doesn't seem to be correctly supported by Firefox. The deleted code was supposed to toggle the picker when the field was clicked (see odoo/odoo@89093a1) (toggle on click and disable focus) but the lib correctly supports on focus without extra code. This also fixes the fact that the datepicker was not open on focus (only on clicked). In some tests where the field was the first in the form view, it is now correctly autofocused. Forward-port: not useful from 12.0 because the code has changed with BS4 and this has already been applied in odoo/odoo@6692919 and odoo/odoo@c63630d. Closes #23438 closes odoo/odoo#27657
2018-11-26[FIX] web: customizing filter doesn't close dropdownLucas Perais (lpe)
Have a many2one, click on search more Open the filter menu of the search view Add custom filter Click to select a field Before this commit, the whole dropdown closed After this commit, it doesn't OPW 1911337 closes odoo/odoo#28969
2018-11-26[FIX] web: fielddate[time] should select their value when entering themLucas Perais (lpe)
Before this commit, when focusing on a date[time] field, the value was not selected In v11.0, it was This is due mostly because of the migration to BootStrap 4 After this commit, the value inside the input is selected OPW 1911333 closes odoo/odoo#28989
2018-10-10[FIX] web: do not warn on empty fieldMartin Trigaux
If no value is specified on the datefield, do not set a warnfuture message Remove code comment that was referring the condition present at b51b0d66c2f7 but no longer present. Add tests Fixes #27551 closes odoo/odoo#27593
2018-10-01[FIX] web: prevent users to type invalid values for opacityqsm-odoo
Also, make all the _updateXXX methods follow the same structure. Thanks to @kig-odoo for spotting the issue.
2018-10-01[FIX] web, *: support opacity in colorpicker dialogAndrea Ulliana
* web_editor, website Add an opacity slider and an opacity input to control opacity over the chosen color. task-1887571 Closes https://github.com/odoo/odoo/pull/27289
2018-10-01[FIX] web: debug_manager set defaultsLucas Perais (lpe)
On a form view, click on set defaults, select a value for a field, then save Before this commit, there was a traceback because the model on which we apply the defaults was not found After this commit, it works as expected OPW 1887032 OPW 1888715 closes #27148
2018-09-24[FIX] web: graph_renderer: show graph titleAdrien Dieudonne
Since odoo/enterprise@e3b0d2a, the title wasn't set anymore. This logic is now moved in the graph renderer to be able to set a title in every graphs. For now, we only use the title attribute for pie charts embedded in dashboard views. Additional tests has been added in 'web_dashboard' (enterprise).
2018-09-20[REF] web: Use graph renderer to render pie_chart widgetAdrien Dieudonne
Before this rev., the pie_chart widget was rendered from scratch with nv.d3 and we had duplicated code. In comparison mode, two widgets were instancied and it was a bit difficult to synchronize the size of these svg graphs. nv.d3 graphs are attached when the dom is ready because it needs to calculate the available space. UI bugs can appear if the dom changes... .update() must be executed on the graph to avoid this as we already do in graph renderer. So now, the rendering of the pie_chart widget is done by the graph renderer. As comparaison mode is supported by the rendering, only one widget needs to be instancied. Task ID: 1835644
2018-09-17[FIX] web: datepicker: correctly use libAaron Bohy
The datepicker lib has been updated to tempus dominus (BS4) recently, but our code hasn't been adapted correctly to the requirements of the new version of the lib. As a consequence, the datepicker didn't close itself when the input was focused out anymore. This required a slight change in the DomainSelector widget as it produced a crash when a focused datepicker widget is removed from the DOM (before the datepicker is destroyed), e.g. by a call to html() on one of its parent. Task 1878254
2018-09-07[MERGE] forward port branch saas-11.4 up to d78f23df848Christophe Simonis
2018-09-07[MERGE] forward port branch saas-11.3 up to 4850fb08385Christophe Simonis
2018-09-07[MERGE] forward port branch 11.0 up to 9b602ae648eChristophe Simonis
2018-09-07[FIX] web: FieldDomain: reset field with a new domainAaron Bohy
Before this rev., there was a crash when a FieldDomain was reset with a new domain (e.g. coming from an onchange). For instance, it crashed in Email Marketing > create new Mass Mailing > select mailing lists. Introduced by 68332a01. opw-1882850
2018-09-05[MERGE] forward port branch 11.0 up to 213759b03e5Christophe Simonis
2018-08-30[FIX] web: fix evaluation context of the domain selectorAaron Bohy
The domain was instantiated without being given any evaluation context. As a result, the uid variable was not defined, crashing the js if present in a user-defined filter. opw 1866852
2018-08-29[REF] web: move debug_managers in toolsChristophe Monniez
2018-08-29[IMP] web: New test to test Odoo menusChristophe Monniez
This commit adds a new js test in web that enters each app and click on each view switcher, each menu and each search filter. This test is tagged '-standard' and 'click_all' as it could last a long time, that way it's not executed by default. It could also be started from the browser console with 'clickEverywhere();'.
2018-08-29[FIX] web: restore access to minDate/maxDate functions on the DateWidgetPierre Paridans
Used in Enterprise (sale_subscription_dashboard). Solve a traceback as reported on BS4 pad
2018-08-14[IMP] web: Better view fields for debug mode.Nhomar Hernández
When you need to fast review all properties of a model, mostly the fields it is really anoying go to all the technical path which has all the information already. The previous "View Fields" action was very messy. My proposal is simply instead use a dialog which is almost useless open a normal vie (a little improved) which allow us audit completely everything. Remove the previous dialog, this will not be used anymore. Closes #26364