Escape text nodes changed via the web editor before sending the content
it to the server controller.
It is done since the content is unescaped one time when being displayed,
and it is not done for inline style and script tags (which may be
injected by dropping a snippet) since that would break them.
replacing the solution in cdb900044.
Called by click or changes with enable or disable.
Called only one time by selection.
Receive all changed inputs.
For e.g.: allow to the designer to use this method to open modal or other option.
In some case margin could be applied via CSS and not via mb* classes
(e.g several themes with different aspects but a shared snippet). This
commit allow this if custom CSS margin matches a CSS mb* class value
(currently 0, 4, 8, 16, 32, 48, 92 and 128).
* don't duplicate fa classes needlessly,
* keep img-* classes which may be used on icons with a background,
* copy overlay when we transform a tag to a span
When dropping the snippet "Newsletter Popup", a modal appeared to choose
the newsletter. Once the button "Continue" was clicked, the modal was not
hidden and then it was impossible to scroll.
Since saas-6, all snippets should start by a s_, so we can know exactly what is
the current snippet, and retrieve the slide from the drop-snippets bar.
If none snippet match, we use the old method which consists to find the snippet
which have the biggest intersection of class betwwen dropped snippet, and all
snippets in drop-snippets bar.
A other way without update the JS code will be to had many fake class in the
snippet declaration and in the snippet code to be sure that it match the right
snippet.
Pasting from the website to the website could for example copy
t-field="..." which then would easily add an error if e.g a field
is copied to an area where it is not available.
This fix strip the data-oe-... attributes of nodes added to the DOM
when pasting.
closes#7653
opw-644968
* Correct inheritance of async method
* Correct calls to do_hide/show
* Fetch the template in `willStart`
* Correct bootstrap structure for the layout, remove useless branding
and dom depth
* Each planner page is now in its own bootstrap grid
* Compatibility between both webclients
This introduces a new way to define web_planners. They now take the
following form:
<template id="project_planner">
<t t-call="web_planner.pages">
<t t-call="web_planner.category">
<t t-set="menu_categorytitle" t-value="'Prepare'"/>
<t t-set="menu_categoryclasses" t-value="'fa-flag-checkered'"/>
<t t-call="web_planner.page">
<t t-set="page_title" t-value="'Welcome'"/>
<t t-set="hide_mark_as_done" t-value="True"/>
<t t-set="hide_from_menu" t-value="True"/>
<!-- content here -->
</t>
</t>
</template>
The menu is not manually created anymore, it is automatically generated.
Pages do not have to be part of a category and can just be defined as
children of web_planner.pages. A page can have hide_mark_as_done and
hide_from_menu, these are optional and will both default to False when
omitted.