Avoid 'Uncaught TypeError: t.value.trim is not a function'
When t.value is empty / false, trim crash and so it's impossible
for end user to make translation.
Fix for saas-6 only, don't forward port.
If the user translate a record html field like product... and add block after in English version, the translation doesn't have the new blocks.
In version >= 9.0 the translations contain only textual contents (with font, bold, color...). If a user add a block in english the block appear in all translations (with new text marked to translate).
jQuery has a special behaviour when using .contents() over an iframe
object. This caused an error for escaping when saving the page with an
iframe content of an external domain.
introduced by 8c77c711
opw-649570
Each theme was duplicating this file.
Now we need to improve this file to be re-usable by others themes.
This fix is only to catch input, in case of the selector is an image.
In 7d40a7d, f820c07, 3ed0628 the way the mobile preview iframe is set
was altered several times. This left an inconsistent needless page load.
This page load was cancelled, but as a side effect in a given set of
conditions:
- an ajax request is done early in current (and so iframe) page,
- phantomjs is used for the test,
- server response time
this could lead to a false positive caused by a cancelled xhr request
throwing the error: "Can't load template, http status 0".
Force fa size to 14px, to avoid that themes which change body size,
change the fa snippet icon size and display it on severals lines.
Add text 'Snippets are loading' while snippets template is downloading.
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