Commit Graph
851 Commits
Author SHA1 Message Date
qsm-odoo e3dd0dee42 [FIX] web_editor: restore iframe editor code view mode
Broken since https://github.com/odoo/odoo/commit/2972976962617d4b8a0113bae58c640ab41cdff8
2017-10-12 13:33:25 +02:00
Odoo Translation Bot 38155cd786 [I18N] Update translation terms from Transifex 2017-10-11 17:17:17 +02:00
Deep Patel bfba2c0e75 [FIX] web_editor, portal: some edition fixes
- 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
2017-10-10 16:19:29 +02:00
Odoo Translation Bot ded650083e [I18N] Update translation terms from Transifex 2017-10-09 10:53:17 +02:00
qsm-odoo ad4dd2243c [FIX] web_editor: build all child snippets when dropping one
Since website refactoring, the behavior was lost and broke some snippets.
2017-10-03 12:59:55 +02:00
qsm-odoo 4e090b2a5e [FIX] web_editor: properly reset to custom background option
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.
2017-10-03 10:52:30 +02:00
Odoo Translation Bot 0333007a08 [I18N] Update translation terms from Transifex 2017-10-02 15:06:48 +02:00
Kishan Gajjar 2a9605414b [FIX] web_editor: open customize menus to the left/right
Open customize options menus to the left if there is not enough space on
the right.
2017-09-30 11:17:22 +02:00
Kishan Gajjar 19dc6e97ba [FIX] web_editor: link dialog color buttons style was broken in some themes 2017-09-30 11:17:22 +02:00
Nicolas Lempereur 56800ad667 [FIX] web_editor: HTML/CSS Editor save feedback
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).
2017-09-29 13:28:36 +02:00
Martin Trigaux 9d2e825340 [I18N] export saas-18 source terms
saas-18 will be the future version 11
2017-09-20 16:14:08 +02:00
Xavier Morel f1a85ba70a [FIX] *: fix a bunch of incorrectly documented docstring
Fix a bunch of ill-documented/incomplete/incorrect method docs
Without this, the automatic doc generation does not work.
2017-09-18 11:54:39 +02:00
rde 4ecbacaf59 [ADD] website: add new page management
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/...)
2017-09-15 15:29:37 +02:00
Christophe Simonis c5f680200c [MERGE] forward port branch saas-17 up to d08b4407be 2017-09-12 12:09:11 +02:00
Christophe Simonis bd08d4f052 [MERGE] forward port branch saas-16 up to 3ac2a1106c 2017-09-11 14:02:19 +02:00
Christophe Simonis 3ac2a1106c [MERGE] forward port branch saas-15 up to ec15765eec 2017-09-11 13:30:03 +02:00
Christophe Simonis ec15765eec [MERGE] forward port branch saas-14 up to 48f88992da 2017-09-11 12:35:49 +02:00
Christophe Simonis 48f88992da [MERGE] forward port branch 10.0 up to 7d7e94c6ef 2017-09-11 11:45:44 +02:00
Odoo Translation Bot c2866f17ff [I18N] Update translation terms from Transifex 2017-09-10 04:41:07 +02:00
Nicolas Lempereur 73edebc371 [FIX] web_editor: enter remove or duplicate node
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
2017-09-07 09:38:56 +02:00
Lucas Perais (lpe) 45e0cd564a [FIX] web_editor, website_forum: allow to post videos on the forum
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
2017-09-06 13:52:03 +02:00
Odoo Translation Bot 39dafce595 [I18N] Update translation terms from Transifex 2017-09-03 07:07:46 +02:00
Odoo Translation Bot 0e0771e319 [I18N] Update translation terms from Transifex 2017-09-03 04:40:05 +02:00
Christophe Matthieu 95c2bd33a2 [IMP] web: lazy load nvd3, ace and fullCalendar lib to reduce asset size 2017-08-31 16:26:11 +02:00
Christophe Simonis 71f370903c [MERGE] forward port branch saas-16 up to 600d015938 2017-08-30 18:18:59 +02:00
Christophe Simonis 600d015938 [MERGE] forward port branch saas-15 up to cb4dbfb7b7 2017-08-30 18:04:40 +02:00
Christophe Simonis cb4dbfb7b7 [MERGE] forward port branch saas-14 up to 583fcf0a67 2017-08-30 16:13:19 +02:00
Christophe Simonis 583fcf0a67 [MERGE] forward port branch 10.0 up to 1b7e31f341 2017-08-30 15:34:58 +02:00
Lucas Perais (lpe) e88f91ba41 [FIX] web_editor, website_sale: load images of the shop when product has been updated
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
2017-08-30 10:00:50 +02:00
qsm-odoo 9486ec33c4 [FIX] web_editor: properly not allow edition of non editable parts
Before this commit, (double) clicking an image/link in a non editable
environment still opened a dialog / change the editor bar for edition.
2017-08-28 12:04:06 +02:00
Odoo Translation Bot 32078bba33 [I18N] Update translation terms from Transifex 2017-08-27 07:14:46 +02:00
Odoo Translation Bot bb28a2d7f6 [I18N] Update translation terms from Transifex 2017-08-27 04:40:12 +02:00
Thibault Delavallée 50f5d28c80 [MOV] web(_editor): move image rendering from web_editor to web
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.
2017-08-24 17:06:07 +02:00
Christophe Simonis 017ee5eab3 [MERGE] forward port branch saas-17 up to 877e709871 2017-08-24 13:17:53 +02:00
Christophe Simonis 30bd5ac0e9 [MERGE] forward port branch saas-16 up to aec6248bb3 2017-08-23 16:44:58 +02:00
Xavier Morel 9d0af3c72c [FIX] web_editor: P3 io error
Views archs (and sub-archs) should be serialized to and deserialized
from unicode, not bytes.
2017-08-23 14:34:50 +02:00
qsm-odoo 0fb82ab34e [FIX] web_editor, *: allow editor dialogs in simple HTML areas
* 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.
2017-08-23 11:27:55 +02:00
Christophe Simonis 59f8b849fb [MERGE] forward port branch saas-15 up to d5f2a38b50 2017-08-23 11:23:08 +02:00
Christophe Simonis d5f2a38b50 [MERGE] forward port branch saas-14 up to 6956ad54de 2017-08-22 17:20:15 +02:00
qsm-odoo 9af8d5e6de [IMP] web_editor: make HTML editor select2 dropdown better
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.
2017-08-21 10:57:28 +02:00
Olivier Dony 695716efb0 [FIX] P3: remove pycompat.{keys,items,values} helpers
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.
2017-08-20 23:25:54 +02:00
Xavier Morel 43dedda9eb [FIX] P3: cross-version binary data is bytes, not str 2017-08-20 23:25:54 +02:00
Xavier Morel 481a00dc4b [FIX] P3: hash/hmac payload must be bytes 2017-08-20 23:25:54 +02:00
Xavier Morel 7dd062f835 [FIX] P3: text model types
* 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
2017-08-20 23:25:54 +02:00
Xavier Morel 3824b5dcc1 [FIX] P3: fix base64 and StringIO uses
* 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
2017-08-20 23:25:54 +02:00
Odoo Translation Bot 3b142d426a [I18N] Update translation terms from Transifex 2017-08-20 07:14:17 +02:00
Xavier Morel a4ada695e1 [FIX] P3: absolute ordering removed 2017-08-19 02:34:21 +02:00
qsm-odoo be754451b4 [FIX] web_editor: open correct view on HTML editor default start
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.
2017-08-18 12:36:04 +02:00
Vandan Shah 886c07dabb [IMP] web_editor: add image filename at the end of URLs
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.
2017-08-18 11:41:28 +02:00
qsm-odoo 6c9a56a65f [REF] web_editor: improve "Video" dialog design and behavior
Original design by @stefanorigano.
2017-08-17 12:41:15 +02:00