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.
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.
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.
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).
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 / ...
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
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.
* 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, ...
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.
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.
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.
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.
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.
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.
Commit e11f23b701 split the website
customize_template_get into web_editor and website ones. This split
was not perfect and commit 20861b482a
tried to make it work... but did not made it totally and added an
indirect dependency to website module in web_editor...
As the final result is wrong and inconsistent and that the previous
9.0 implementation was already ugly, this was not possible to make
a consistent full-stable fix.
This commit tries to make a fix as stable as possible (the main method
name did not change, the arguments did not change, their purpose is
the same, ...) which makes the code work and be less ugly. However,
the function returns are now slightly different (and JS depends on it).
It returns only valid view information (not header stuff which is not
related to anything and the inherit_id value is now a combination of
the inherit view id and name). Also, a new private method has been
created.
Also, the method contained code which was deprecated since saas-6 but
was never removed (and never broke anything "by chance").
In master these methods will be refactored to make more sense.
* add and use preservation mixins to prevent undesired customizations
made by themes
* remove some style preservation code (and use the mixins instead)
* add UI states' colour variables
On old apple devices (IPad 2, IPhone 4, ...), the FAQ Roller could not
be opened on click. This is because the snippet does not use standard
bootstrap correctly and put the toggle on a <div/> element instead of
a <a/> element.
This fix forces an empty click handler on these <div/>, which allows
standard bootstrap to work.
Commit 48a1eaf792 adapt the welcome
message on website so that it fits the page height. But this does
only worked for large screens as the height was forced to main
height... which is smaller than the default welcome message height
on small screen. The fix only had to use min-height instead of height.
Commit 5f98040430 in saas-12 changed
some "saved" event to "save" event but forgot to adapt new features
which depend on this in 10.0 after forward port.