Commit Graph
2144 Commits
Author SHA1 Message Date
Alexandre Kühn 0de5c1f076 [FIX] web{_site,_editor}: transparent root instance 'root widget'
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.
2018-02-12 16:09:37 +01:00
Aaron Bohy cf178a2f06 [IMP] web,*: config: add XXS size to config.device
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-26 19:26:03 +01:00
Aaron Bohy 32b8cec536 [REF] web,*: ActionManager/ViewManager refactoring
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 20:49:19 +01:00
qsm-odoo abde8bddf8 [REF] web_editor, website(_*): refactore media & link dialogs
* blog, gengo, sale
2018-01-16 17:03:15 +01:00
Christophe Simonis 782154da11 [MERGE] forward port branch saas-11.1 up to f6ef0c7760 2018-01-10 20:35:53 +01:00
qsm-odoo 61bb46c82b [FIX] website, *: auto-fold menu review
* portal

Review https://github.com/odoo/odoo/commit/392c91cda3133b921e9aca9a7b1c511231027438

- Some elements should not be folded in the "+" dropdown, like the login
  button and related stuff
- Using pull-right instead of navbar-right (https://github.com/odoo/odoo/blob/392c91cda3133b921e9aca9a7b1c511231027438/addons/portal/views/portal_templates.xml#L37)
  broke the mobile version of the menu
- Folded menu <li/> seemed too small (but it was only an illusion)
- On Chrome, the menu was sometimes not folded when it should have been.
  This was because of rounded width calculations.

For the first point, the code has been made so that everything that
follows a divider is considered unfoldable.
2018-01-10 17:59:38 +01:00
qsm-odoo 4fc0079f5f [REF] web_editor, website: LESS simplification and correction
The variables.less file was producing CSS which was then multiplicated
by the number of bundles (see less_helpers).

Also simplify some LESS.
2018-01-10 17:54:22 +01:00
qsm-odoo 5da89f6152 [REF] portal, website, web, *: improve LESS split
* website_sale
2018-01-10 17:54:22 +01:00
qsm-odoo a5e9acfb69 [REF] portal, website, web: rename/regroup LESS files 2018-01-10 17:54:22 +01:00
qsm-odoo 27311c2b3d [REF] portal, website: portal LESS files cleaning
- website.ui.less was moved to portal for no reason
- rename portal_frontend.less to portal.less
2018-01-10 17:54:22 +01:00
qsm-odoo 2303dcb2a9 [IMP] web_editor, *: change height/margin system to padding system
* 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 13:54:25 +01:00
qsm-odoo 8270b21290 [FIX] website: move customize modal on top of the navbar
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).
2018-01-05 17:50:47 +01:00
qsm-odoo 392c91cda3 [IMP] website, *: keep top menu on one line and review alignments
* 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
2017-12-21 09:52:36 +01:00
qsm-odoo 76abdd4ace [REF] website: menu-related JS is supposed to grow, so rename "affix" file 2017-12-21 09:52:36 +01:00
Christophe Simonis 8ef7af6afe [MERGE] forward port branch 11.0 up to f96a797fe6 2017-12-06 12:02:58 +01:00
Christophe Simonis f96a797fe6 [MERGE] forward port branch saas-16 up to b8540eefe3 2017-12-06 11:59:38 +01:00
Dhawal Limbuwala 4764cae315 [IMP] website(_sale): Improve UX for the website dashboard
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
2017-12-05 13:13:23 +01:00
Dhawal Limbuwala 3821eb218e [IMP] website: Reload website dashboard when coming back from breadcrumb
Purpose
=======

When clicking on a dashboard element (eg: an invoice) and modifying it doesn't reload the dashboard, which could be confusing.
2017-12-05 13:13:22 +01:00
Dhawal Limbuwala 109857949d [IMP] website: Remove the suggested app on the website dashboard 2017-12-05 13:13:21 +01:00
Alexandre Kühn 6cc5a9963b [FIX] web,*: time format from user's language
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-12-05 09:13:31 +01:00
Christophe Simonis a8d01cbf4e [MERGE] forward port branch saas-15 up to a447da75fd 2017-12-04 20:12:19 +01:00
Christophe Simonis a447da75fd [MERGE] forward port branch saas-14 up to e7d174a142 2017-12-04 19:25:51 +01:00
Christophe Simonis 426e269c22 [MERGE] forward port branch 10.0 up to 067a241ea8 2017-12-04 16:24:24 +01:00
Christophe Simonis 7b808982a0 [MERGE] forward port branch 9.0 up to 5e38bef5a5 2017-12-04 12:55:38 +01:00
qsm-odoo 5e38bef5a5 [FIX] website: review iframe video building
/!\ This commit *must* be "forced" forward-ported /!\

Recent commit(s) broke existing databases making website videos
disappear / not be saved / ...

Original code was broken then fixed by a succession of commits which
solved some errors to create new ones. Hopefully, this one is the right
stable one. Existing databases should be restored while allowing new
videos to be added correctly no matter the version. In master, a solution
must be found to smoothly migrate old videos to a new better system.

See:
https://github.com/odoo/odoo/commit/8749410b1033ddec1207ce1db42d1889a0d2ea33
https://github.com/odoo/odoo/commit/45e0cd564afdae71e9525193250744e88076da71
https://github.com/odoo/odoo/commit/6d2bf44fee76a8b73ebad206cd7a283c88b6c4ef (opw-783233)

opw-786165
2017-12-04 11:45:06 +01:00
Christophe Simonis 2f99470458 [MERGE] forward port branch 11.0 up to c201cf2b77 2017-12-01 12:55:02 +01:00
Christophe Simonis 42264d8dcb [MERGE] forward port branch saas-16 up to 5d7ad2b16c 2017-11-30 18:43:08 +01:00
Christophe Simonis ab084d580f [MERGE] forward port branch saas-15 up to 98539336a5 2017-11-30 15:27:59 +01:00
Christophe Simonis 98539336a5 [MERGE] forward port branch saas-14 up to b780e4a0e4 2017-11-30 14:44:49 +01:00
qsm-odoo 1f39b6021e [FIX] website: properly start all dropped snippets' animations
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.
2017-11-29 17:27:27 +01:00
Christophe Simonis 299a5e058b [MERGE] forward port branch 10.0 up to 7754538750 2017-11-28 12:25:16 +01:00
Christophe Simonis ad6f307976 [MERGE] forward port branch 9.0 up to 6d2bf44fee 2017-11-28 11:10:59 +01:00
qsm-odoo 6d2bf44fee [FIX] website: do not duplicate iframes at each edition
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).
2017-11-28 10:03:27 +01:00
Kishan Gajjar 5b356a732b [IMP] website: add facebook page snippet 2017-11-17 17:59:21 +01:00
Christophe Simonis c703a2a0c3 [MERGE] forward port branch 11.0 up to d279a3e6d5 2017-11-16 17:55:37 +01:00
Romain Derie 86e79881e8 [FIX] website: use underscore's startsWith method for browser support
Since ES6's startsWith method is not supported by all/old browser, replace it
with underscore's one
2017-11-15 12:56:02 +01:00
Romain Derie dbce2491fe [FIX] website: Incorrect 'Go to page' link in page properties dialog
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
2017-11-10 16:39:01 +01:00
qsm-odoo 938fca4de1 [REF] website: clean and lint content.js file 2017-11-09 09:49:45 +01:00
qsm-odoo 0a31cb9b4a [IMP] website, *: improve 'animation' API
* 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
2017-11-09 09:49:36 +01:00
Christophe Simonis 9a32dacd8c [MERGE] forward port branch 11.0 up to ee2b9fae35 2017-11-02 13:44:53 +01:00
Deep Patel 0e9197c562 [FIX] website: bg element not found when using big parallax snippet
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.
2017-10-30 17:35:02 +01:00
qsm-odoo 81fffdbdc4 [FIX] website: restore snippet animation API
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.
2017-10-30 10:46:22 +01:00
qsm-odoo c06f0f3a35 [FIX] portal, website: make affix menu appear from *under* the odoo topbar 2017-10-27 15:52:06 +02:00
Christophe Simonis 4873aeb501 [MERGE] forward port branch saas-15 up to 991ba1d861 2017-10-26 20:07:36 +02:00
Christophe Simonis 991ba1d861 [MERGE] forward port branch saas-14 up to a2890c1e76 2017-10-26 19:36:23 +02:00
Christophe Simonis a2890c1e76 [MERGE] forward port branch 10.0 up to bbc226cd6c 2017-10-26 19:03:19 +02:00
Christophe Simonis bbc226cd6c [MERGE] forward port branch 9.0 up to 809aaf9e7b 2017-10-26 18:33:33 +02:00
Jeremy Kersten 809aaf9e7b [FIX] website_event: avoid double subscription
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
2017-10-26 17:52:21 +02:00
Yannick Tivisse 7ed9a7fabe [REM] web_planner: Remove the module
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.
2017-10-26 16:14:21 +02:00
axj-odoo a924cbf983 [ADD] website_sale_link_tracker: Display utm statistics on website dashboard
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
2017-10-24 14:48:57 +02:00