Commit Graph
2009 Commits
Author SHA1 Message Date
qsm-odoo 9a07523e7b [FIX] web_editor: display snippet options in the correct order
closes odoo/odoo#38862

X-original-commit: 0a3966235f8d02b7d11fddeee7e4d71c64076a3c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-16 10:06:24 +00:00
fw-bot 817ce6bd6b [FIX] web_editor: allow a snippet to use the same option multiple times
If two snippet options are declared using the same data-js="..." and
that they end up targeting the same snippet in some cases, only one of
those two snippet options was shown.

This case occurred in a theme (avantgarde) for the map snippet.

closes odoo/odoo#38551

X-original-commit: 2072bfd9981eebc8c8d8d03d2f44f0e4a2489692
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-11 22:35:19 +00:00
qsm-odoo 53bb4582d2 [FIX] web_editor: do not show website name in snippet names
Since https://github.com/odoo/odoo/commit/ea3a2ab6788980a8961d9b9a3f88bc13c15a3c46
the website name appears in the view names if the user has the multi
website group or in special cases on some form views.

We don't want it to be displayed in snippet names in the editor UI.

Part of https://github.com/odoo/odoo/pull/38495
task-2083198

closes odoo/odoo#38549

X-original-commit: 3ad50aa53f1f8673a674365917f95e75b036f244
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-10-11 22:34:41 +00:00
qsm-odoo 79bf207739 [FIX] web_editor: fix collapse opening on complex option hierarchy
When an option group is opened, all the other opened option groups were
closed. The problem is that an option group may contain other option
groups, so when trying to open a sub-group the main parent group was
closed first.

Note: this case only occurs for one option in themes for now.

Part of https://github.com/odoo/odoo/pull/38495
task-2083198

X-original-commit: 102151da12c28746bf16dd7f009c1ca3933d06ba
2019-10-11 22:34:41 +00:00
qsm-odoo f34fae25d1 [FIX] web_editor, *: expose access to all snippet options UI
* website_form

To support old theme options, a hack had to be made to allow access to
left panel UI. This will be improved in master.

Part of https://github.com/odoo/odoo/pull/38495
task-2083198

X-original-commit: 5ac6a7a5dbd2af1190d0d027d0239dd1cfc257b0
2019-10-11 22:34:40 +00:00
qsm-odoo d499779e7e [FIX] website_mass_mailing, *: fix display of backend popup edition
In the backend, when a mailing popup was being edited, it was not
centered in the edition area (and went under the editor UI) and was not
using the correct style.

task-2083465

closes odoo/odoo#38449

X-original-commit: 6ccf3b618b4b0774deccb4f75bf33f3ea4dc8b75
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-11 06:45:11 +00:00
Andrea Ullianaandqsm-odoo af847832e8 [FIX] website, *: force website UI dropdown style
* web_editor

The purpose is to force our dropdown style in our UI so that themes do
not break it anymore (same way all the other elements are forced (cards,
headings, etc)).

task-2059538

closes odoo/odoo#38321

X-original-commit: 4ef0eac5ba134f462f72f3e9c60e5c9fc95f3a8c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-10-10 06:28:50 +00:00
Victor Feyens cfe06f6d68 [FIX] web_editor: don't crash if anchorNode is Reserved.
When on Firefox, with sale_product_matrix and sale_quotation_builder installed,
clicking anywhere on the matrix (after opening it) raises a traceback.

It is due to the fact that isBody tries to access anchorNode.nodeName, which
is unexpectedly unaccessible as anchorNode is {Reserved}.

Due to the absence of clear documentation of the possible reasons of this problem,
it was decided to reuse the existing fallback on 'return null', which avoids the
traceback.

closes odoo/odoo#38277

X-original-commit: 70c484e72bffc9ab759df3c376ad9157acec3965
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-09 12:19:46 +00:00
Christophe Simonis d74b451805 [MERGE] forward port branch 13.0 up to f4105eb9c7 2019-10-09 02:08:17 +02:00
Jeremy Kersten 8488e6c871 [FIX] web_editor: don't show warning relative url for new menu item
Before this commit, we hide the 'relative warning' when you don't start
you url with the current location. Now we show it only when you start
your url with the current location.

Before this commit, when you create a new link, the warning was shown
until you type a first char in the input to trigger the input change.

+ some small design theme (label font weight, muted color, ...)

closes odoo/odoo#38224

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-08 15:04:54 +00:00
Goaman f2c38d517b [FIX] web_editor: link from the web editor
Before this commit, the feature for selecting a link and then clicking
on the "link" button or hitting the CTRL+K was partially broken.

The method "commonAncestor" was not returing the expected value.

This commit add a check in the method "showLinkDialog" to prevent
this error to happen.

closes odoo/odoo#38103

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2019-10-07 13:50:44 +00:00
Goaman 52ec2d378c [FIX] web_editor: highlight selected pictogram
Before this commit, the selection of a pictogram in the media
dialog of the website builder and the mass_mailing was not
working.

The pictogram already has the class "o_we_attachment_selected"
upon selection. This commit allow the class "font-icons-icon"
to be included in an existing selector.

closes odoo/odoo#38085

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2019-10-07 12:48:09 +00:00
Martin Trigaux 42417956c0 [I18N] *: export 13.0 source terms
closes odoo/odoo#38028

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-07 07:55:34 +00:00
Odoo Translation Bot b6e7ed6c7b [I18N] Update translation terms from Transifex 2019-10-07 09:11:11 +02:00
Jairo Llopis fd0de2261e [IMP] website: Remove hardcoded domains from website menus
A common software development pattern is to have the same data replicated across different environments, such as production and staging. This happens i.e. in Odoo.sh.

Let's assume your production instance is in ``https://www.example.com`` and your staging one is in ``https://staging.example.com``. Then:

1. A user in production modifies a website menu and makes it link to ``https://www.example.com/my-cool-page``.
1. A new change lands in staging, with a fresh copy of the production database.
1. The user goes to ``https://staging.example.com`` and navigates through the menus to validate the changes.
1. While navigating, he clicks in the website menu that links to ``https://www.example.com/my-cool-page``.
1. He makes some changes. **He didn't realize he was modifying production**.

To avoid this kind of problems, if a user pastes a link that starts with the current domain, it gets removed.

closes odoo/odoo#35715

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-03 12:27:55 +00:00
Nicolas Lempereur 8decc3dc56 [FIX] web_editor: ol in ol have first number hidden
In the case of an <ol> in an <ol> we would have something like:

1.
2. 1.
   2.
3.

With this changeset we get back what we had in 12.0:

1.
   1.
   2.
3.

which is not perfect but the same as 12.0 version.

opw-2073751
closes #37163

closes odoo/odoo#37706

X-original-commit: 479db16fdb86c6925a7f94a24f2821f3a5c047b5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-10-01 12:55:44 +00:00
c8c8eb3d56 [IMP] website_forum, *: revamp design
* web_editor, website_profile

Part of https://github.com/odoo/odoo/pull/35749
task-2024197

Co-authored-by: Jérémy Kersten <jke@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
Co-authored-by: fja-odoo <fja@odoo.com>
2019-10-01 16:52:20 +00:00
Odoo Translation Bot 40deff7cbe [I18N] Update translation terms from Transifex 2019-10-01 21:21:46 +02:00
Gorash b1503c7ee0 [FIX] web_editor: remove image style when change to an other than image
closes odoo/odoo#37343

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2019-09-24 08:52:43 +00:00
RomainLibert 85eeaccf06 [FIX] tools: use user friendly message in case of error
closes odoo/odoo#37058

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-09-18 10:14:12 +00:00
Odoo Translation Bot d7b8831ea8 [I18N] Update translation terms from Transifex 2019-09-29 01:22:33 +02:00
qsm-odoo 3d4060f756 [FIX] web_editor: do not redraw option hierarchy on click
Before this commit, when a hierarchy of options was displayed in the
editor left panel and that the user click on any one, the related
snippet was enabled making all the children options disappear (like
the "go to parent" button in the old UI). Now we only keep this behavior
when we click on the title of the snippet's options.

closes odoo/odoo#37538

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-27 15:24:30 +00:00
Nicolas Lempereur beb80c20bd [FIX] web_editor: change do not bold nobold after bold
If we have a content such as:

`aaa <B>bbb</B> ccc`

and you eg. change size of `a bbb c`, the c gets bold because of an
issue in the merging after style is applied.

reason: we check that the style was same as previous nodes, but because
walkpoints text[a]->B->text[bbb]->B->text[c] is expurged of duplicates
it becomes text[a]->B->text[bbb]->text[c] so we erroneoulsy think that
the node before text[c] is text[bbb] (instead of B tag)

note: 12.5 forward-port (skipping [12.3,12.4]) of 11.0 #37254 (also
contain #37345)

opw-2071930
closes #37295

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-25 12:18:30 +00:00
Romain Estievenart f88520280a [FIX] web_editor: make toolbar scrollable in mass_mailing on mobile
Before this commit, the web_editor toolbar wasn't horizontally scrollable
and part ot the items were not displayed.

To fix this, we have to revert back the initial position on some elements.

closes odoo/odoo#37076

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-09-24 10:05:47 +00:00
Romain Estievenart 65c8d33c29 [FIX] web_editor: make toolbar scrollable in note on mobile
Before this commit, the web_editor toolbar wasn't horizontally scrollable
and part ot the items were out of the screen area.

To fix this, we have to revert back the initial position on some elements.
2019-09-24 10:05:47 +00:00
Romain Estievenart 90e58efeba [FIX] web_editor: correctly display dialogs on mobile
Before this commit, web_editor dialog was opened inside an iframe and
not on the window.top. So dialogs didn't take all screen area.

To fix this, we open dialogs in full screen mode but we also put the
web editor in full screen to increase the size of the iframe.
Note that the initial state of the web editor (full screen or not) is
preserved when you close the modal.

We also add some fixes to make the "web_editor media dialog" responsive.
2019-09-24 10:05:39 +00:00
David Monjoie c778a0552f [FIX] web_editor: fix wrapping of toolbar icons
Commit e6b1dbca wrongly introduced a no-wrap rule on the toolbar while
fixing another bug. This commit fixes that mistake.
2019-09-24 07:40:04 +00:00
qsm-odoo 7b92e13533 [FIX] web_editor: fix section drag and drop error (2)
Forward-port of https://github.com/odoo/odoo/commit/6f14b488fb380c6a3f1b7361b9901de3f07fd9ea
was not properly done.
2019-09-23 09:00:45 +00:00
Odoo Translation Bot 974261f7e9 [I18N] Update translation terms from Transifex 2019-09-22 01:19:57 +02:00
Christophe Simonis 58a83d1222 [MERGE] forward port branch saas-12.4 up to 4a1321bc99
closes odoo/odoo#37127

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-20 14:33:54 +00:00
Christophe Simonis 080f8b1f96 [MERGE] forward port branch saas-12.3 up to d8ce75466e 2019-09-17 17:49:09 +02:00
Kishan Gajjar c326a640c6 [FIX] web_editor: allow autoplay for Vimeo videos
closes odoo/odoo#36932

X-original-commit: 1a87fcc8a39cff99358b91718994ff14967d39bf
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-16 12:03:57 +00:00
qsm-odoo cdba57d4e2 [FIX] web_editor: allow to change primary and secondary bg classes
closes odoo/odoo#36849

X-original-commit: 6d6cf6128e6d36830b339de9b8957717201c2f02
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-13 15:21:54 +00:00
qsm-odoo d1e5231e49 [FIX] web_editor, *: restore crop dialog
* website

Following the new editor merge at https://github.com/odoo/odoo/pull/29775
(which was finally partially reverted for 13.0), the crop dialog was not
working anymore on sub-sequent crop. This was due to 2 things:

1) Re-cropping an image that was just cropped now

The original source of the recently cropped image is saved as temporary
jQuery data on the image element. Unfortunately, for some strange
reason, that image is cloned before any edition and thus lose that data.
This commit fixes the problem by cloning the data too... supposing the
orignal clone is there for a reason.

2) Re-cropping an image that was saved before

This did not work anymore simply because... the cropped images were not
saved in database anymore but saved as base64 data in the view... For
some reason, the cropped images to save were searched in the original
DOM instead of the edited DOM...

Also fixing the random use of a mutex.

Discovered while working on task-2059480

closes odoo/odoo#36878

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-13 14:07:00 +00:00
Odoo Translation Bot 5f1638e42d [I18N] Update translation terms from Transifex 2019-09-15 06:21:03 +02:00
fja-odoo 6f14b488fb [FIX] web_editor: fix error on section drag and drop
closes odoo/odoo#36801

X-original-commit: 0ae223609a860799135e7f6764c4cb8a08979b12
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-12 15:45:58 +00:00
Nicolas Lempereur 5c408dd442 [FIX] web_editor: element inline bar over modal popover
In the inline editor (eg. task description), the inline bar of an
element (eg. link or image) has higher bootstrap z-index than modal that
can be opened via this bar (eg. croping window for an image, link
editing for a link).

So the bar would be over the modal opened by the bar which is
unexpected.

This was solved in 12.3 f2969923 by setting the inline bar to z-index of
$o-wysiwyg-zindex (defined to 1000).

This is the equivalent of 12.0 #37119 fix.

opw-2073761
closes #37125

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-19 09:46:08 +00:00
Gorash fa6dcc7332 [FIX] web_editor: fix add/remove columns in table
closes odoo/odoo#37079

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2019-09-19 07:40:47 +00:00
Gorash 42df7f84a4 [FIX] web_editor: checkbox without text change can now be checked 2019-09-19 07:40:47 +00:00
Gorash d1f25b178a [FIX] web_editor: recursive checkbox check
In multi-level checkboxes, if there is only one checkbox per level, the
expected behavior is that all checkbox will be checked if one of them is
checked. This was not the case before this commit.
2019-09-19 07:40:47 +00:00
Gorash f7c2cb088c [FIX] web_editor: fix link style being lost on edit 2019-09-19 07:40:46 +00:00
Gorash 175c75b9b5 [FIX] web_editor: min-width for custom colors in color picker
The custom colors were displayed as a single column while it actually
had enough space to expand itself.
2019-09-19 07:40:46 +00:00
Gorash 65d0809786 [FIX] web_editor: prevent popovers from overflowing the editable
When setting align right on a picture, the popover of the picture was
partially overflowing the editable zone, rendering it useless.

This commit mimicks the behavior of Odoo 12 by disabling the fact
that the popover follows the picture.
2019-09-19 07:40:46 +00:00
Nicolas Lempereur d2f01f7cc6 [FIX] web_editor: re set style of custom color in editor
The style for custom color in the editor color menu from 12.0 was
dropped in 12.3 (correctly because of the changed structure) but in 12.5
the HTML structure changed again and the CSS is once again necessary.

opw-2073734
closes #37090

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-18 15:37:42 +00:00
MaxLarue 8ed94a11f4 [IMP] wysiwig widget: fix wysiwig widget autofocusing
When clicking on edit in a form with a wysiwig widget inside, that widget would gain focus. It is not the expected behaviour (focusing the first field) and is really an issue on mobile, where the screen would scroll and the keyboard open.

The mouseup event was there to force summernote refreshing the editor toolbar (which will not display which buttons were active until the editor is focused). So removing it still has drawbacks (the toolbar is not up-to-date), but with chm it was decided to remove it as the issue with focus is worse.

Task-2047389      Closes #36360
2019-09-18 12:05:19 +00:00
17237ff31c [IMP] website, *: allow to set background video to snippets
* web_editor

This commit adds support to set background videos to all the snippets
that already support setting background images (except on parallax
background for now).

task-1920630

closes odoo/odoo#36261

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Varun Raval <var@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-09-17 12:06:17 +00:00
qsm-odoo 57f92e2a8b [FIX] website_blog, *: restore blog/post cover edition
* web_editor, website

Editing the cover images or sizes was not working anymore. When it
worked, it was thanks to the 'o_dirty' class appearing magically on a
cover part... and that magic seems to be gone.

This commit fixes the problem by adding the 'o_dirty' class on all
elements whose content is changed, not only the editable ones (this is
the case for the blog cover: it is a non editable element whose bg
image can be changed).

Note: this also fixes the edition of multiple covers (of different blogs
or posts) at the same time (this could be backported in 12.0 if needed).

closes odoo/odoo#36999

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-17 11:15:42 +00:00
qsm-odoo aa9db571e3 [REF] web_editor: update the cropper library
Just after we first added the library in Odoo (in april 2018), the
library was released in its last and deprecated version (4.0.0). At the
same time, the author indeed split its 'cropper' library into 2 parts:
'cropperjs' which is the core of the original library without jquery
and 'jquery-cropper' which is a jquery wrapper of the 'cropperjs'
library. This commit updates our code to use the latest version of those
two libraries.

Note: the commit also removes the lazy loading of the library which is
useless and maybe breaking since it comes with the editor assets which
are themself lazy loaded.

Note 2: we may want to remove the jquery wrapper in another update and
simply use the standard JS library.

Part of https://github.com/odoo/odoo/pull/36880
task-2059480

closes odoo/odoo#36880

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-13 14:55:26 +00:00
qsm-odoo da95ff210d [FIX] web_editor: allow better usability to crop all image zones
Before this commit, when rotating an image so that it overflew the
cropper canvas, it was not possible to unzoom on some part of the image.

Now, with the new set of options used by this commit, the cropping zone
and the image can be moved independently allowing to do everything.

Part of https://github.com/odoo/odoo/pull/36880
task-2059480
2019-09-13 14:55:26 +00:00
Odoo Translation Bot e80b81dca1 [I18N] Update translation terms from Transifex 2019-09-15 01:30:37 +02:00