summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets
AgeCommit message (Collapse)Author
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.
2018-04-19[IMP] web: convert notification popup in service and add buttons paramsChristophe Matthieu
this.call('web.Notification', 'notify', params) Display a notification at the appropriate location, and returns the reference id to the same widget. Note that this method does not wait for the appendTo method to complete. @param {Object} params @param {string} params.title notification title @param {string} params.message notification main message @param {string} params.type 'notification' or 'warning' @param {boolean} [params.sticky=false] if true, the notification will stay visible until the user clicks on it. @param {string} [params.className] className to add on the dom @param {function} [params.onClose] callback when the user click on the x or when the notification is auto close (no sticky) @param {Array<Object>} params.buttons @param {function} params.buttons[0].click callback on click @param {Boolean} [params.buttons[0].primary] display the button as primary @param {string} [params.buttons[0].text] button label @param {string} [params.buttons[0].icon] font-awsome className or image src @returns {Number} notification id this.call('web.Notification', 'close', notificationId)
2018-04-18[REF] *: stop mentioning "LESS" where this is not requiredqsm-odoo
* web, web_editor, website, im_livechat
2018-04-16[MERGE] forward port branch saas-11.2 up to 90f8f17fb4fChristophe Simonis
2018-04-10[IMP] web: keyboard navigation in form viewVincent Schippefilt
1. Added the ability to navigate within the List view using UP and DOWN keys. 2. By defaults, the focus should be set on the search input field. 3. From the search input field, using the DOWN key, the focus goes to the list 4. From the search input field, using TAB key, the focus goes to the create button 5. From the create/import buttons, using TAB or DOWN key goes to the first row of the list, then UP and DOWN keys moves the focus from item to item in the list. 6. When on a row, hitting ENTER opens the view of that row. Also in this commit 1. When on the first row, hitting the UP key does nothing 2. When on the last row, hitting the DOWN key does nothing Not included in this commit 1. Memorize the position on the list when opening an row, than restoring when going back to that list 2. Navigation on grouped list using the keyboard
2018-04-06[MERGE] forward port branch 11.0 up to d277adf4d59Christophe Simonis
2018-04-04[FIX] web: debug manager: replace tree mode by listLucas Perais (lpe)
- Open in debug mode the 'beetle' - Click on open view - select a Tree view in the list Before this commit: A traceback appears This was because while the Tree view per se has been discontinued the mode 'tree' of an action must be supported Which was not the case for this particular widget After this commit: the list view asked for appears OPW 1833008 closes #23963 closes #24005
2018-04-03[FIX] web: time format without secondsGoffin Simon
Steps to reproduce the issue in 11.0 Enterprise: - Go to the language English - Remove from the time format the seconds - Refresh the page - Go to sales - Create a sales order; Bug: - You get the warning message closes #23596 closes #22027 opw:1829577
2018-03-09[MERGE] forward port branch saas-11.2 up to 42659dc70c2Christophe Simonis
2018-03-08[REF] web,*: introduce the concept of AbstractActionGéry Debongnie
Before this commit, a client action was simply a subclass of Widget. This is quite simple, but not really enough for the ActionManager. The ActionManager needs to handle client actions in a different way that view actions. Sometimes, it needs to check if a method exists before calling it. With this commit, we introduce a new abstraction: the AbstractAction class, which defines a common API for all actions managed by the web client. Note that the API proposed in this commit is just the beginning. We will introduce other methods in the future, to manage the focus, or the scroll position, for example.
2018-03-07[MERGE] forward port branch 11.0 up to d67b410dfcdChristophe Simonis
2018-03-05[FIX] web: bug introduced by forwardport 36945a58Aaron Bohy
PhantomJS doesn't like widgets that define two start functions.
2018-03-05[FIX] web: translate 'External ID' stringsum1201
Closes #22763
2018-03-01[MERGE] forward port branch 11.0 up to c2e878e34c8Christophe Simonis
2018-02-28[FIX] web: DomainSelectorDialog: prevent overflowAaron Bohy
The DomainSelectorDialog behaves differently from classical dialogs in terms of height and overflow: (1) its height can be larger than the screen height, and (2) its content is never scrollable (overflow visible). However, before this rev., the 'height: auto' rule ensuring (1) didn't apply, so the dialog's height was limited to the screen's height, and when it had to much content to display, it overflowed. It didn't work because the code tried to apply the rule too soon, so the .modal-dialog element was not yet available. Fixes #23292
2018-02-27[FIX] web: NotificationManager: warnings styleAaron Bohy
Warnings are styled a bit differently than notifications, as their background is red (thanks to classname 'o_error' on the warning root element). This classname isn't correctly added since rev. 920df59, which changed the root element of the 'Notification' template, which is extended by the 'Warning' template, making qweb.js fail to add the 'o_error' classname.
2018-02-09[ADD] web: Add a new widget to attach documents on a recordjpr-odoo
Purpose ======= Add the possibility to easily attach a document on a record. That could be used for to attach receipts on expense for example. Specification ============= Add a new widget (AttachDocument) to allow attach document from mobile/web directly on record form After attaching document it will call action given on widget, that action will be a method name on given model
2018-02-01[IMP] mass_mailing: onboardingAlexandre Kühn
Lots of small usability improvements on the mass_mailing app.
2018-01-25[MERGE] forward port branch saas-11.1 up to 8613724bfccChristophe Simonis
2018-01-25[MERGE] forward port branch 11.0 up to eefe879a37aChristophe Simonis
2018-01-22[FIX] web: set default you/all option flippedNicolas Lempereur
In 60d9f6fe the ir.default replaced uses of ir.values. But the [ir.default].set user_id has opposite meaning to [ir.values].set_default for_all_users. This was not taken into account when adapting javascript in 791152a87 and this commit fixes that. opw-805871 closes #22437
2018-01-16[REF] web,*: ActionManager/ViewManager refactoringAaron Bohy
This rev. is the first part (out of 3) of the refactoring of the ActionManager and ViewManager layer of the webclient. The main changes are: - there is no ViewManager anymore, its work is now handled by the ActionManager itself, but isolated in a specific file ; this eases a lot of things, as the breadcrumbs handling for example. - the ActionManager code is converted to the new coding principles and guidelines ; mainly, children widgets communicate with it by triggering events up, and not by function calls anymore. - the ActionManager layer is now testable, and a lot of tests have already been written. - the code in other addons has been adapted consequently. What's coming next: - introduce the 'AbstractAction' Widget, and make client actions and view controllers inherit from it ; this widget will implement a common API that could be used uniformly by the ActionManager (e.g. restore(), canBeLeft(), renderButtons(), getTitle()...). - move the ControlPanel handling from the ActionManager to the AbstractAction.
2018-01-16[REF] account,web(_tour): close rainbowman on clickAaron Bohy
This rev. makes the Rainbowman stop listening to event 'clear_uncommitted_changes' on core.bus, as this event is about to be removed (in a next commit). It was using it to destroy itself when such an event was triggered (basically, when the current view was left). Instead, we removed the option 'click_close' as, when set to true, which was the default, the rainbowman was destroyed as soon as the user clicked outside the raibowman.
2018-01-10[MERGE] forward port branch saas-11.1 up to f6ef0c77609Christophe Simonis
2018-01-10[MERGE] forward port branch 11.0 up to ff0abd214c8Christophe Simonis
2018-01-08[IMP] web_editor, *: change height/margin system to padding systemqsm-odoo
* web, website, mass_mailing Before this commit, the editor allowed defining the margin of some elements and the height of some elements. There were three main problems with this system: 1) When an user dragged the arrow, he often expected to change the size of the element while he was in fact changing the margin 2) When changing the margin, you increase the space between two elements but with a white space (while most users want a space with the same color of the block they are resizing = padding) 3) When changing the height, the user was able to hide snippet parts and the height was not consistent accross screen sizes Now, the only thing you can edit is padding. There is only one arrow for each direction, which allows increasing spacing and consistent dimension at the same time. The only feature that is lost with this change is the ability to control vertical alignement of colored columns. This is not a problem as colored columns are rare in our current snippets and there still have the possibility to add margin classes by hand if necessary (there are also plans to control vertical alignement another way). Note: margin classes are kept for compatibility.
2018-01-08[FIX] web: DebugManager in dialogsAaron Bohy
For actions executed in dialogs (target='new'), a DebugManager is instantiated and appended to the dialog's header (div with classname 'modal-header'). However, in the full composer dialog (in a chatter, click on 'Send message', and then click on the expand icon), there are more than one element matching the selector '.modal-header', because it also occurs in the html generated by summernote. In this case, the widget's $el is cloned and appended to each element of the JQuery nodeset matching the given selector, but widget.$el only refers to one of those. So when it isn't the one appended in the real dialog's header, the debug manager remains empty as the widget isn't able to populate it correctly. This bug appeared with rev. 5f1ef09, as before it, the debug manager was appended to the dialog before its content.
2017-12-06[MERGE] forward port branch 11.0 up to f96a797fe62Christophe Simonis
2017-12-05[FIX] web,*: time format from user's languageAlexandre Kühn
Before this fix, the chatter always showed dates of messages in military time format. This was not the expected behavior, as the user could have had customize the date and time format in the settings of the current language. Steps to reproduce the issue: 1. Set Odoo in English 2. Settings > Translations > Languages > English 2.1. Set Date Format to %m/%d/%Y 2.2. Set Time Format to %I:%M:%S %p 3. CRM > (Select any opportunity with at least one message) > Mouse hover on elapsed time (e.g. "an hour ago") Expected: - It shows the customized time format (e.g. 11/07/2017 5:33:36 PM) Results: - It shows the military time format (e.g. Tue Nov 07 2017 17:33:36 GMT+0100) opw-781647
2017-11-10[MERGE] forward port branch 11.0 up to 350973ff366Christophe Simonis
2017-11-10[FIX] web(_editor): enable mobile testsAaron Bohy
This rev. introduces a new test suite meant to test the webclient components on mobile devices. The key 'config.device.isMobile' is forced to true in this test suite, so that mobile specific JS files are properly executed, which isn't the case in the classic JS test suite (setting isMobile to true in the test definition is too late, as the JS files are already processed). For now, this new test suite contains a single test, which was skipped until this rev. as it couldn't be executed in the classical JS test suite. Both suites are executed at each build of the runbot, and they can be manually executed from the webclient as well (via the debug manager).
2017-11-08[FIX] web: invalid domain in DomainSelectorMartin Geubelle
A domain could contain the key `parent` (in an embedded subview), like: domain="[('display_name', '=', parent.display_name)]") This is currently not handled by the DomainSelector. This will probably be handled in a future version but for this stable version, this case that triggered an error is now catched and an error message is displayed in the widget. This was causing a traceback when opening a domain with `parent` in the edition of a subview with Studio.
2017-11-07[MERGE] forward port branch 11.0 up to 449ec5e29daChristophe Simonis
2017-11-02[FIX] web: FieldSelector: add model in field attributesMartin Geubelle
The key `model` was missing in the FieldSelector selected fields. The model can be useful for example to create a one2many related field.
2017-11-02[MERGE] forward port branch 11.0 up to ee2b9fae351Christophe Simonis
2017-10-31[FIX] web: FieldSelector: always keep first pageMartin Geubelle
In the FieldSelector, after clearing the chain and closing the popover, the very first page was removed from the widget `pages`. This was causing issue when trying to select a new field again. This commit ensures that the first page is not sliced.
2017-10-18[FIX] web,*: replace core.debug by config.debugKhoi Nguyen
2017-10-18[IMP] web: Regenerate assets from debug menuKhoi Nguyen
This commit adds a "Regenerate Assets Bundles" entry in the debug menu, whose role is to unlink all assets from ir.attachment, forcing their regeneration.
2017-10-18[REF] web: improve switch company menuGéry Debongnie
Mostly update it to new guidelines, and improve a few details
2017-10-18[REF] web: refactor notification systemGéry Debongnie
This commit aims to bring the code closer to an ideal state. We want notifications to be a simple service, easy to use, and well documented.
2017-10-18[FIX] web: make rainbowMan more solidGéry Debongnie
2017-10-10[MERGE] forward port branch saas-16 up to 88a9980b0c0Christophe Simonis
2017-10-09[FIX] web: allow strings as m2o values in domain selectorqsm-odoo
Since the new views, the field parsing for m2o returns an object with id and display_name. If the given value to parse is a string, it is supposed that this is an ID. This was breaking the domain selector widget which should allow strings as name-strings of m2o values.
2017-10-03[FIX] web: The model "ir.values" has been renamedGoffin Simon
The model "ir.values" has been renamed in "ir.default" by this commit: 60d9f6fef9e15c96cb710a17318a56c1cc1c33dc
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-26[FIX] web: untranslated choice in widget domainMartin Trigaux
For boolean fields, the choice is "set (true)" or "not set (false)" Missing _t to translate it
2017-09-26[FIX] web: untranslated fields in widget domainMartin Trigaux
The user context was not propagated so the list of fields was untranslated.
2017-09-25[REF] web: preliminary work for the mobile Burger MenuAaron Bohy
2017-09-21[MERGE] forward port branch saas-17 up to bf4ccb21f6cChristophe Simonis
2017-09-21[MERGE] forward port branch saas-16 up to 88395bdb8e1Christophe Simonis