- Hide navbar divider in mobile view
- Change font to default when applying header style
- Remove form tag from media dialog search input to avoid redirection
This commit solves a bug when using custom background option: if a
custom background was selected, then hovering a non-custom background
and leaving the dropdown was selecting the non-custom background for
good instead of resetting back to the custom one. This is because the
custom background option is a non-preview one (you have to click) so
there should not be any need of resetting... except that the non-custom
background option is a preview one and messes with the same DOM
attributes as the custom background option.
The save on the frontend worked, but there was no feedback that it
worked if the identifier of the file currently edited broke a jQuery
attribute selector value (eg. /test.less breaks it).
website.page = old ir.ui.view with page=True
website.redirect is a new mechanism to replace in the futur the ir.attachment
mechanism of redirect.
From now, we don't have a specific /page controller to serve 'page'.
We use a new model website.page which is rendered if none route matches the url
and that the field 'url' on website.page matches the request.httprequest.path.
The order to serve a path is:
- Routes defines in controllers (/shop, /blog, ...)
- ir.attachment with name matching the path
- website.page with url matching the path
- website.redirect with url_from matching the path
- 404
To improve:
- allow regexp in website.redirect model
- allow to edit the view_arch from the page.management via redirect backend
(needed when traceback in the page, or when modifying a js/css/less/...)
There is some odd behavior especially inside a editable containing
newlines.
For example in the sale description on an ecommerce item, lines could
contain newline (it is editable from backend) but as an effect of other
use case, pressing enter could have a range of unwanted side effects:
- removing all the content,
- duplicating the editable (should never happen, if we have one field
"description_sale" we don't want to duplicate it, this has no sense)
In a product name which is in the same use case, there is no newline so
the problem is not apparent, and ENTER do nothing. This is the behavior
we should want in every instance.
If we still want a newline, we have to force it with SHIFT + ENTER key,
also this is regarding field that may or could be present in the backend
views, so it could also be edited in backend.
This change make ENTER ignored when we are editing a node directly child
of an node being edited.
A second part of the issue was that dom.removeBetween (used to remove
content inside a range) could remove the ancestor node that was an
editable. This is not wanted.
For example if we did CTRL + A inside a field with `<br />` then ENTER
or pasting something, the field would be removed and not just emptied
and could not be gotten back without editing the template manually.
This was sometimes mitigated because if a `<br />` was at the end of an
element, it would stay in this use case avoiding the issue.
note: not necessary after saas-16
fixes#17445
opw-751360
closes#19313
The commit 8749410b10 corrected the way the iframe was rendered to display a video in v9.0.
In v10 though, the html sanitizer is a bit more severe and cleans data-src attributes, preventing the iframe to have a src
This commit works around that and allows the src of the video to be saved in db
OPW 761424
closes#19125
Before this commit, when the shop was in multi images, the main image was not refreshed when changed in the back end.
This was because of the ?unique parameter that was computed on the product variant image. Hence, when the product image changed, the variant image did not, the hash neither, and the image wasn't refreshed
This commit fixes this by adding an option to the qweb.field.image
OPW 765287
closes#19133
Currently the image field rendering in QWeb using the /web/image
controller is done in web_editor. However there is no link between
the web editor and the rendering. The rendering can therefore be moved
directly in web.
During the move two options have been added to the rendering of image
field :
* qweb_img_raw_data: fallback on standard base64 behavior that is
otherwise impossible to achieve;
* qweb_img_responsive: True by default, add the img-responsive
class that is not always requested;
Thanks.
* website_forum
Summernote is instantiated as a simple text editor for 'simple' HTML
backend fields and in website_forum. In those cases, the user was not
able to open editor dialogs anymore as their opening was now handled
by the RTE widget in web_editor since the recent website refactoring.
The goal was to use `this._rpc` in these dialogs (and this required the
dialogs to be attached to the widget parenting system).
As a fix, a new component was implemented to handle these dialog
openings and this component is thus created by the RTE widget and the
other places that need the feature. The right fix would be a better
integration of the summernote editor in the parenting system but this
requires a lot more work than this commit, this will be the goal of the
future editor refactoring.
In saas-15, the LESS editor was introduced alongside the use of the
select2 library to style the <select/> element which allows to choose
the view / less file to edit. The problem is that the default behavior
of the select2 library is to open a dropdown with a max-height of 200px
and a width equals to the <select/> element (with no regards to the
dropdown content). In most cases, the dropdown was then displaying
only a few results, broken over multiple lines.
Now, the dropdown is restyled so that it has no maximum height, no set
width and more readable content.
Now that we're closer to switching to P3 for good, these helpers have
outlived their usefulness, and mostly add noise.
All remaining dict.iter*() or dict.view*() must be converted to the
normal keys(), values() or items() calls.
Whenever the result is likely to be used for more than the scope of a
loop, or when the dict needs to be modified during iteration, the calls
must be wrapped in a ``list()``, to protect the new P3 semantics.
Those cases are very exceptional.
Also removed some dead code or improved the API to remove unnecessary
conversions.
* remove references to basestring & unicode (use relevant pycompat
helpers)
* remove some str calls (either entirely or replaced by relevant
helper, either text or native)
* use better API to avoid unnecessary conversions
* remove some XML declarations in views
* StringIO removed from stdlib, replace with io
* try to correctly handle BytesIO/StringIO (one is for bytes the other
is for text)
* fix base64: Python 3 removed bytes-encoding and bytes-bytes
codecs (via #encode) so replace all calls to str.encode('base64'),
also b64encode is a bytes->bytes conversion so attempt to properly
handle that
issue #8530
When starting the HTML editor, the first view that is shown is supposed
to be the main one of the page by default. This was not the case for
custom pages as the 'xml_id' of the page was considered instead of its
'key' value.
When an image is added thanks to the media dialog, the URL that is used
was '/web/image/<id-of-the-attachment>'. Now the name of the image will
be added for SEO purposes ('/web/image/<id-of-the-attachment>/<name>').
Also protect URLs with quotes to allow spaces.