Commit Graph
1977 Commits
Author SHA1 Message Date
Rohan Patel 4d1cef1b1f [IMP] website: improve dashboard header to have a website-related dashboard
This header displays icons that proposes to install other website related
applications.
2017-03-03 16:57:06 +01:00
Rohan Patel 79597a2b84 [REF] website: merge Website and Website Admin menu items
This commit merge the two website menu items in order to ease user flow
inside Odoo. When clicking on the Website item a server action is called
that decides to redirect the user either to the dashboard if the user is
an admin or a website publisher, either to the website for other people.
Overriding this method allows to define a specific behavior. Future commit
will also redirect sales people to the website dashboard.

Dashboard itself is customized to add a header used to display a website
button. It will be used in future commits to add other new stuff to the
dashboard.
2017-03-03 16:57:06 +01:00
Rohan Patel 3b4b65849b [FIX] website: update google analytics documentation link 2017-03-03 16:57:06 +01:00
Christophe Simonis 68176d80ad [MERGE] forward port branch saas-14 up to eddefc9948 2017-03-01 16:49:15 +01:00
Olivier Dony 087ce98928 [MERGE] Forward-port 10.0 up to 2cffcfd860 2017-02-25 02:32:17 +01:00
Jeremy Kersten 6969c6c5ad [FIX] website: allow to edit master if 'automatic footer' is disabled
Before this commit, impossible to edit the master if no language switcher
was displayed on the web page.
2017-02-24 19:18:31 +01:00
qsm-odoo b4d8a270e1 [FIX] web_editor, website: restore content menu feature
Commit 3c9e6c89e7 made big changes to the
link editor dialog... but also broke many features with it.

Commit 9a1ea6dc08 already fixed some of
them but this commit fixes a bigger one. Indeed, the menu edition
feature was totally broken since the changes. Also, the DOM was messy
which broke form navigation, etc.
This commit also simplifies the LESS which was uselessly big.
2017-02-20 17:37:15 +01:00
qsm-odoo 198673bf35 [ADD] web_editor, website, web: new LESS editor
The old "HTML" editor now handles LESS edition. The editor has now a
button to switch between XML and LESS edition. By default, it only
displays the odoo files which only appear in the assets_frontend bundle
and in debug mode, it allows to see all the files that influenced the
page design.

The new editor has a new set of options which allows to use it as a
xml editor only or a less editor only if needed.

Also: make the "include bundles" option appear only in debug mode.

Technical details:

- When saving a modified LESS file, an attachment is created with the
full modified content and an extension view xpaths the bundle where
the original file was added to link this attachment instead. This
relies on the fact that qweb, when generating assets bundle,
replaces missing files by the "datas" contents of the ir.attachment's
which have an "url" field equal to the urls it is searching.

- If a LESS error is introduced, the recent changes in assets bundle
generation (see c248674a5c) will not break
the design but only open a dialog on page loading, with the LESS error.
The user can then go to the LESS editor and reset its changes.

This feature code has been started with original work of @pga-odoo
2017-02-14 16:37:23 +01:00
qsm-odoo 7751c1bfb9 [REF] web_editor, website: split customize_template_get
Commit a2ae219d4e fixed the customize_template_get
function(s) which had been modified for the 10.0 web_studio release.
While the fix also reorganized the structure to make it more efficient
and understandable, it promised that the function would be refactored
in master. This is what this commit does.

The customize_template_get route of the website module was also removed
with commit 5a030db3eb as it was an useless
duplicate of the web_editor customize_template_get route.

The old route handled two totally different features of odoo: getting
all the page-related views to allow their edition with the HTML editor
and getting the "toggable views" which appear in the "Customize"
website menu. The parameter "full" allowed to determine which one the
route was supposed to do and was useless until website was installed to
add its feature (by extending the route behavior). In both cases, views
informations are returned, only the number of views differs. The
above-mentionned fix already did part of the refactoring by returning
the same info structure for each view in both cases.

Now, the function has been split. The web_editor customize_template_get
route is renamed as get_assets_editor_resources and returns the info the
HTML editor needs to work (the "assets" term is in prevision of the
new LESS editor).
A new website route "get_switchable_related_views" has been created to
return the info the "Customize" website menu needs.
Both use the renamed ir.ui.view function "get_related_views" (old
ir.ui.view customize_template_get function) which now returns a
recordset and not a list of dictionnaries.
2017-02-14 16:32:15 +01:00
qsm-odoo ab78680d58 [IMP] web, web_editor, website: small refactoring of LESS files
This commit comments some LESS files to help the user to understand
for what their content is used (preparing the LESS editor feature).
2017-02-14 16:32:06 +01:00
qsm-odoo 9049d953ca [FIX] website: restore company edition option
Commit d1a8d54aca broke the feature without mercy.

The mentioned commit introduces a nice improvement to allow the edition
of the company logo directly from frontend. However it also breaks the
option for non-logo parts (example: clicking on the address on the
contact us page). It also leaves most of the option code behind, which
makes useless code being executed for nothing.

This commit restores the company option the way it was and simply
deactivates it for the logo edition, which was the desired behavior.
2017-02-14 12:33:53 +01:00
jpr-odoo d1a8d54aca [IMP] website: Make company logo editable from frontend
Purpose
=======

Clicking the company logo takes to the backend's company settings. Users get lost and don't know how to go back to the website.

Specs
=====

It should be a picture selection wizard. If possible the default picture should be the company logo if already set.
2017-02-10 15:19:04 +01:00
Parth Gajjar 3c9e6c89e7 [IMP] web_editor: improve LinkDialog widget design and usability
Specification
=============

- no boxes around fields
- use regular form style for input fields
- don't split page/URL into two fields, just do one URL field, with autocomplete
- Add alpha, beta, gamma, delta and epsilon color in color selection because they are used in mass mailing and themes also.
- Add a selection option with label "L" inside circle for link.
- Add Color selector for choosing button color
- Remov select2 page selector and used jquery autocomplete on same input
- Fix issue of page search in ir.http
2017-02-10 14:11:38 +01:00
Christophe Simonis 6c4389df41 [MERGE] forward port branch 10.0 up to 6804085b8c 2017-01-23 14:33:53 +01:00
Christophe Simonis 44276dfdc3 [MERGE] forward port branch saas-11 up to a0aca47fef 2017-01-17 19:12:20 +01:00
qsm-odoo 655a9bcd51 [FIX] website: allow "contain" option for s_banner background
Since saas-10, you can customize the background size and position
of snippets. The "contain" option was not working for the s_banner
components as overridden to "cover" by the snippet specific style.
2017-01-16 13:09:34 +01:00
Jeremy Kersten c61fbe36b8 [FIX] website,website_sale: add o_text_overflow in front end
And use it in right column from ecommerce (task-28865)
2017-01-11 11:12:47 +01:00
Yannick Tivisse 74c78f878a [FIX] website: Link to the latest version for documentation user pages 2017-01-03 17:07:02 +01:00
Dhawal Limbuwala 13e819f510 [FIX] website: Don't show links on website pages when pressing Ctrl+p 2016-12-05 14:22:06 +01:00
Christophe Simonis 0b846861b6 [MERGE] forward port branch 10.0 up to 5dc1c57 2016-12-01 17:05:08 +01:00
Kishan Gajjar 167057800b [IMP] web,website: Only display planner for group_system users
Planners should only be visible for "base.group_system" user group (admin settings) because there are links to install apps etc. For now missing access rights messages whenever you click a settings link.Only for admin and not by company.
Admin and the user who has "base.group_system" rights can see the planners.
2016-12-01 16:32:01 +01:00
Christophe Simonis 7d4ac39c4c [MERGE] forward port branch saas-12 up to d853d3c 2016-11-24 18:35:42 +01:00
qsm-odoo 9a1fd7c940 [FIX] website: fix opening of the SelectEditMenuDialog
When on a page event for example, when the user choose "Edit menu",
a modal is first opened to ask which menu to edit (the top menu or
the event menu ?).

This feature was broken with a web_editor refactoring. Indeed, the
dialog was converted to use the standard dialog class but the
widget was still inserted in the DOM thanks to "appendTo" instead of
the modal built-in "open" method, preventing it to be properly opened.
2016-11-23 10:34:18 +01:00
stefanorigano d6cf236b4b [REF] website: refactor parallax snippet
This commit is a refactoring of the 's_parallax' snippet. Note that it
is compatible with previous parallax snippet (old snippets are just
transformed into the brand new one on page load). Note that scroll
speed are changed by this implementation though.

This solves several issues:

- Bg image went easily off of the frame if scroll speed was too fast

- The 'scroll speed' effect was visually inconsistent across different
    devices.

- If the Bg image was smaller than the frame (condition which occurs
    often in a responsive environment), then the image was totally
    offset.

- Since the previous implementation use background-position property
    to perform the effect, It was not possible to define an image
    focus point.

This implementation solves the previous issues introducing a safe-area
that limit the effect range. It's calculated dynamically, according to
the current screen size and the 'speed' option.

The effect if now achieved thanks to the translation of a DOM element
instead of background-position changes. This allows to solve the last
mentionned problem and improve performance.

The implementation rely on the new animation methods of the snippets
Animation class.
As this use the "requestAnimationFrame" function, the snippet knows
the right time to repaint itself, instead of using the "scroll" event
which is triggered too many times and thus occurs between painting
frames. This change greatly improved performances (CPU/painting usage
many times smaller).
2016-11-22 17:15:33 +01:00
qsm-odoo 0e08e653cd [IMP] website: allow better animations thanks to requestAnimationFrame
This commit extends the behavior of the Animation class of the
"web_editor.snippets.animation" module.

Now, all animations can easily define an animation algo update without
much caring about performances. All that must be done is:

* If the "start"/"stop" method is/are defined, do not forget to call
the _super parent method (which will now initializes the animation
components).

* Define particulary-named method in your Animation class extension.
See in-code comment of the _prepareComponents method.

This extension should be used to define all animations. For example the
use of $(window).scroll(function () { /* do stuff */ }) is now the same
as defining the function with on_scroll: function () { /* do stuff */ }
except that the later one will be more efficient, smoother and allow
you to not care about throttling / event binding/unbinding / ...
2016-11-22 17:15:33 +01:00
Jeremy Kersten 5bd04fd502 [FIX] website_sale: cleaning view
Confirmation page - remove useless label
Don't center total in xs width
Don't display wizard in xs width
Remove dublicate border in xs width
Show sorted by label

task-28865
2016-11-21 11:13:51 +01:00
Jeremy Kersten 44911af6fd [IMP] website_sale: disable zoom on xxs device by default 2016-11-21 11:13:51 +01:00
Christophe Simonis 639421e8a5 [MERGE] forward port branch 10.0 up to fb77309 2016-11-17 18:13:45 +01:00
qsm-odoo 18e1ecd019 [FIX] website: stop making parallax content disappear on save
Depending on the context, the s_parallax snippet content was not
showing after save. This was because the HTML is prettyfied on save
and so spaces are inserted around the .oe_structure, making it break
over the next line.

This commit removed the vertical middle alignment of the .oe_structure
block (so back like it was before v10.0), allowing to fix the problem.
2016-11-17 17:24:08 +01:00
Christophe Simonis e2fcace05e [MERGE] forward port branch 10.0 up to 13dc704 2016-11-17 15:27:29 +01:00
qsm-odoo 669336baa9 [REF] web_planner, *: refactor planner code
* Share code between website and backend
* Do not do a [100ms - 500ms] RPC on each app change in the backend
but do it only if the planner is asked to be opened
* Use the Dialog class so that the planner is not broken
* Simplify/optimize code, use standard conventions, lint files, ...
2016-11-15 13:08:59 +01:00
qsm-odoo 9305450508 [FIX] website: properly size the default bg for s_big_message
The default background-size for the s_big_message snippet was not
set to "cover" as the "oe_img_bg" class is missing from the snippet
structure. As this change is not critical but should not be merged
in a stable version, this change will be done in master and this
10.0 fix will only force the "cover" value for the default bg thanks
to LESS.
2016-11-14 13:13:53 +01:00
qsm-odoo dfe072cf79 [FIX] website: adapt parallax extensions to 10.0 refactoring
The s_parallax snippet was refactored in 10.0 but this refactoring
broke some snippet extensions such as the s_parallax_slider.
This made the texts disappear once the snippet was resized.
2016-11-14 10:16:46 +01:00
Christophe Simonis 7eb8ed2769 [MERGE] forward port branch 10.0 up to 3d085f6 2016-11-08 15:13:05 +01:00
Christophe Simonis 3d085f632d [MERGE] forward port branch saas-12 up to 6386037 2016-11-08 15:01:20 +01:00
Christophe Simonis 63860373ac [MERGE] forward port branch saas-11 up to c19f546 2016-11-08 14:43:28 +01:00
Christophe Simonis c19f546505 [MERGE] forward port branch 9.0 up to b795755 2016-11-08 14:20:07 +01:00
qsm-odoo 5a030db3eb [REF] website, web_editor: refactor ace editor
Stop using ugly code for ace editor.

* Really close the ace editor by changing its display property thanks
    to the dedicated do_show and do_hide method.
* Make the common part of ace editors (website, web_studio) consistent
    so that the extensions are really small.
* Do not do RPC to retrieve data already retrieved (now, there is only
    one unique RPC when the editor starts an one RPC per view changed
    on save).
* Fix born-dead code so that the website editor starts automatically
    if the URL contains its associated hash and loads the correct view
* Better handle errors (previous behavior only worked partially and
    only on chrome):
    - Jump to the error line and make it red.
    - Do not open a Dialog with mostly incomprehensible message but
        allow to open it on click of the error marker.
    - Do not save any changed file if one contains an error.
    - Do not allow formatting a file if it contains an error (show the
        error instead).
* Do not use different routes to get the same content (remove the
    /website/customize_template_get route as it returns the same
    content as /web_editor/customize_template_get route). Note: in
    a further commit this route will be refactored.
* In a general way, use consistent method names and behaviors /
    comment the code / lint files / ...
* Open the code to extensions (so that it may later load other data
    than XML).

Note: this refactoring allowed to fix bugs in previous odoo versions
but this commit message will not detail them.
2016-11-08 14:18:28 +01:00
qsm-odoo a545eb3919 [FIX] website: update gallery snippet thumbnails once an image is changed 2016-11-03 09:57:22 +01:00
Christophe Simonis 3bb022d57c [MERGE] forward port branch saas-12 up to 6f8e40c 2016-10-27 18:17:59 +02:00
Christophe Simonis 6f8e40cdec [MERGE] forward port branch saas-11 up to 1304d13 2016-10-27 17:55:47 +02:00
Christophe Simonis 1304d13c7f [MERGE] forward port branch 9.0 up to 25616b9 2016-10-27 17:35:49 +02:00
Christophe Simonis 477e69d850 [MERGE] forward port branch saas-6 up to 3c3ce75 2016-10-27 14:42:57 +02:00
Damien Bouvy eb7226d8d0 [FIX] website: prevent faulty 'no access' message for analytics
There are multiple scopes giving access to analytics api, like
https://www.googleapis.com/auth/analytics.readonly

Having a space at the end of the queried string prevents correct
scope detection; so a user who has, in fact, access will receive
a faulty error message.
2016-10-24 17:33:38 +02:00
qsm-odoo 389574e550 [FIX] website: make the 'include assets bundle' option of ace editor work
Commit which added summernote broke the ace editor with a strange
change: https://github.com/odoo/odoo/commit/9069d0127c176317436b67b23ae5677dd9d53de7#diff-e9d66a1b466f404be082fa00519eafa5L140.

With this change instead of not including the assets bundles in the ace
editor and allowing to see them by checking the option, the assets
bundles were included when NOT in debug mode and not included when in
debug mode.
2016-10-24 17:22:05 +02:00
qsm-odoo 976fdc4402 [FIX] website, web_editor: correct split of displayError function
Before the ace editor was split so that it can be used in the backend
and the frontend, the displayError function finished by:
website.error(a, b);

As website.error cannot be used in the backend, the method was changed
to return the error and the extensions of the method were in charge
of displaying it. Unfortunatly this return was done like this:
return a, b;
which is not valid javascript.

Now the method return an object with a "title" and a "message" value
instead of wrongly returning two values.

Note: this fix relies on another fix which will be forward-ported from
saas-11.
2016-10-24 16:47:05 +02:00
qsm-odoo 88d48818c2 [FIX] website: correctly define website.error function
* The Dialog dependency was missing
* The function arguments were wrong
2016-10-24 16:43:59 +02:00
Jeremy Kersten a7cdd44c2a [FIX] website: reset_password page resize
The less code that was resizing the login and sign up form container
in v9 was moved to the login form, but not to the reset password form.

https://github.com/odoo/odoo/commit/5b65befcd
https://github.com/odoo/odoo/commit/40c0d542d

This commit closes #13866
2016-10-20 11:17:04 +02:00
qsm-odoo 5ada73335a [FIX] website: properly show iframe video in website
Sometimes the video DOM content is present except the iframe which
prevents the iframe to be loaded.
2016-10-18 13:14:23 +02:00
qsm-odoo d5464458c5 [FIX] website: properly unbind events of parallax snippet option
Recent refactoring of the parallax changed the snippet option JS and
attached a callback on a editor element but forgot to detach it if
the parallax snippet is removed. This added a bug which broke the
editor every time a parallax snippet was removed.
2016-10-18 13:14:23 +02:00