With this commit, any component that needs an instance of the
root widget can simply require the module 'root.widget'. Based on
the context (backend, frontend, iframe), the real root.widget
will resolve to either the webclient, the website root instance, or
the iframe root instance.
This is desirable in order for the tour_manager to become a child
of the root widget, as tours are enabled in any of the above contexts.
This commit is a requirement in order to solve an issue with JS services,
in which there should be only one service provider at any given time.
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.
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.
* 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.
The "Customize Theme" modal was displayed under the main navbar since
the introduction of the affix feature (especially in some themes). This
is because the main navbar's z-index has been increased for animation
reasons.
In fact, the fix seems simple: the customize modal does not need any
z-index override (it should behave like any modal).
* portal
When there are too many items in the top menu, the menu is broken into
multiple lines (especially on medium screen resolution). This commit
implements a system like in the enterprise backend: the extra items are
placed in a "+" dropdown menu at the end of the top menu.
Also, review the direction used to open dropdown menus. The default is
now left-to-right (while it was right-to-left before) and JS has been
added to determine the safe direction:
- If last item: to the left instead
- If would overflow the window: to the other direction instead
Purpose
=======
There are some usability issues in the website dashboard
Specification
=============
1/ Move button 'Go to Website' in the header
2/ Hide the action button bar if there's nothing in it
3/ Align the labels in the graph's legend
4/ Make the legend labels and display more obvious
5/ Modify the graph colors to be more readable
6/ Remove margins around todo buttons
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
When a snippet is dropped into a page, all its animations are started.
The problem was that all its children's animations have to be started
and that was not the case anymore since recent big website refactoring.
Fortunately, this allows to improve and optimize animations start
function: now all animations are (re)started for a portion of a
given DOM (default to #wrapwrap) while it was only possible to
restart animation of a given DOM *element* before.
Before this commit, when an user added a video in his page (an <iframe>)
it was then duplicated each time the snippet in which the video is was
edited and saved again, slowing the page loading.
As the code responsible for that is quite outdated, it should be
reviewed and refactored in master. This commit only fixes the problem
with more code. This commit will also fix existing databases, if the
user edit the video snippet once again.
(Note: even if this commit's code will be even more strange in master,
it *should* be forward-ported anyway).
Before this commit, clicking on 'Go to page' in a page properties dialog would
redirect user to an incorrect link (relative vs absolute) because the link
would not have a leading slash. (We removed it earlier to hide it in the input)
Now, the link is correct
* web_editor, website_twitter
- There can now be multiple animation widget on the same element
- Animation are destroyed before saving the editor (allows to not be
forced to do that destruction / code duplication in many cleanForSave)
- .data('snippet-view') is definitely dead
qsm:
This is because of multiple animations during edition (which is not
occuring afterwards). This is not supported, but as it does not break
anything, it can be kept as it is. However, we cannot access the
animation via 'snippet-view' anymore, which is fine as I am about to
deprecate it in master.
Before the website refactoring, snippet animations were cleaned thanks
to the `stop` method. As those animations are now extensions of the
standard `Widget` class, the `stop` method was replaced by the standard
`destroy` method. This was tweaked so that the $el is not removed from
the DOM, but with proper cleaning of events. However, this changed the
way the `stop` method content has to be called. Indeed, we should be
allowed to call the `_super` method and then use the $el variable.
Before this commit, you was able to double click on the button when
are in registration flow. In this case, you subscribe 2 times and so
take 2x more seats, what can be annoying when you have a limited room.
In the same time, we fix the form in the form that generate
strange behaviour like some events not bubbled correctly.
The attendee form (into the modal) was inside the registration form.
$'attendee_form).on('submit') obviously failed due to this bad dom.
This commit closes opw-778191
Purpose
=======
User tests have been made by the Product Owners team. It showed that the planners are not used by new users on Odoo due to several reasons (They are too static, too heavy to use,...)
Specification
=============
Remove the module and its different applications. The onboarding on the business flow will be improvement in the weeks to come.
Purpose
=======
Utm links are really useful for website owners but this feature is hidden in Odoo apps. There is nothing pointing to that.
Specification
=============
- Add new module to generate utm pie chart in website_sale dashboard to track website utm link
- Add new option in website settings to install "website_links"
Title: Link Tracker
Subtitle: Track clicks on UTM links
Tooltip: Analyze the efficiency of your marketing campaigns by using trackable UTM trackers (campaigns, medium, sources). Create trackers and follow clicks from the Promote menu of your website. Those trackers can be used in Google Analytics or in Odoo reports where you can see the opportunities and sales revenues generated thanks to your links.
- Add utm chart to dashboard, using nvd3 such pie chart should be easy to implement
- If no data to display > Display a default picture with "There isn't any UTM tag detected in orders".
- Set a real icon to app "utm" since it shows up in homepage debug mode