summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets/dropdown_menu.js
AgeCommit message (Collapse)Author
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-08-14[FIX] web: autocompletion in the new search viewMathieu Duckerts-Antoine
A lot of new features have been implemented in search view but autocompletion was forgotten. This commit fixes many small problems that were introduced: - synchronization of facets created through autocompletion with filters and groupby menus - filters created through autocompletion can be saved
2018-07-27[REF] *: BS4, adapt dropdowns and caretsqsm-odoo
- The dropdown structure was simplified, allowing to get rid of the 3-levels structure induced by <ul/> elements and dropdowns can now contain anything. The class 'dropdown-item' is now mandatory for each dropdown clickable element. The class 'dropdown-item-text' can be used to add same padding and style but without making the element have a clickable look. - Dividers now use the class 'dropdown-divider' - The way dropdowns are opened and hidden also changed (before the 'open' class was added on the `.dropdown-menu` parent, now the 'show' class is added on both the `.dropdown-menu` parent and the `.dropdown-menu` itself). - JS-wise, no click event handlers can be put on `.dropdown-toggle` elements anymore (instead, use handlers for dropdown events). - Carets are automatically put on `.dropdown-toggle` elements, so this commit replaces the `.caret` elements with this. This feature was possible to disable but would prevent us from adding a caret with scss. Also, this simplifies the DOM. The 'o-no-caret' class was also introduced to allow using the 'dropdown-toggle' class on non-caret elements. - Also adapt the scss to use $caret-width instead of $caret-width-base
2018-07-27[REF] *: BS4, rename btn-default to btn-secondaryqsm-odoo
BS4 "btn-default" class was replaced with "btn-secondary", which makes more sense.
2018-07-27[REF] *: BS4, remove the use of btn-smqsm-odoo
Odoo made the bad choice of using the 'btn-sm' class for every button instead of configuring the padding for default 'btn' to be smaller. In BS4, the style of btn-sm is actually more complex, lowering the font-size too. Also, btn-xs was removed so we would not have the possibility to display smaller button than our default ones. This commit removes btn-sm wherever it was used. Unfortunately, this might remove it at some places where it made sense but this can be restored in a second time.
2018-07-24[FIX] various broken JS docstringsXavier Morel
Resulting in sphinx warnings or ill-formatted doc all the way to the doc not building at all.
2018-07-06[FIX] web: groups of filters ordered correctlyAdrien Dieudonne
In the filters menus, the order of groups of filters comming from the search view arch was not always preserved in the filters menu. This commit fixes that situation. forward-port of @4094f755
2018-07-06[IMP] web: easy selection of a period in filters menuMathieu Duckerts-Antoine
This commit allow to create easily a range of periods (related to a field of date or datetime type) to select in the filters menu. Two new attributes on elements with tag 'filter' are now usable in combination in a search view arch: - date: string. A valid field name with associated type date or datetime - default_period: string (optional). To choose in the following list: - 'today' - 'this_week' - 'this_month' (default) - 'this_quarter' - 'this_year' - 'yesterday' - 'last_week' - 'last_month' - 'last_quarter' - 'last_year' - 'last_7_days' - 'last_30_days' - 'last_365_days' Example: <filter string="Creation Date" name="period_generator" date="create_date" default_period="this_quarter"/> Note: the attribute 'domain' can not be used for such filters. The generated domains are dynamic and can be saved as such via the favorites menu.
2018-07-06[DOC] web: amelioration of inline documentationMathieu Duckerts-Antoine
2018-06-12[IMP] web: add support for interval selection in groupbysMathieu Duckerts-Antoine
In this commit, we extend the search view to allow the selection of some intervals for date or datetime fields in groupby menu. The valid intervals are day, week, month, quarter, and year. It is also possible to add a button 'Group By' in the control panel owned by a graph view in case it is declared 'embedded' (e.g. in a dashboard view). Note that have three new generic reusable widgets have been introduced in this commit: DropdownMenu, GroupByMenu, and FiltersMenu.