Commit Graph
417 Commits
Author SHA1 Message Date
xO-Tx 7a74418b42 [IMP] website_blog: change blog cover title to h1
SEO issue: blog post doesn't have <h1> for post title.

The goal of this commit is to change the main cover title to <h1>.

task-2454130

closes odoo/odoo#66844

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-26 15:10:02 +00:00
Xavier Morel 0e552b96da [FIX] *: convert tip contents to t-out
Requires markup every markup-using tip content as Markup. Would be a
nice occasion to migrate everything to a markup-safe markdown I think,
especially if we could migrate the translations so we don't lose them.
2021-07-20 05:40:55 +00:00
+1 14bffd983e [REF] *: adapt code to new owl webclient
This commit adapts the community codebase to the rewriting of the
/web application in owl.

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2021-06-18 21:31:27 +02:00
Younn Olivier f9133d1300 [FIX] website_blog: fix covers background color
The background color displayed on the blog posts list page was static,
instead of being the background_color_class saved from the
CoverProperties. Also, on the blog post page itself, the two were
combined which made no sense.

Part of https://github.com/odoo/odoo/pull/71593
task-2497846

closes odoo/odoo#72186

X-original-commit: b3ebc427fd519c29788eadedfca2f956e3695a3e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-06-15 16:36:31 +00:00
Younn Olivier a18b14d72f [FIX] website_blog: fix cover display on posts list page
This commit fixes a bug happening when changing the background with the
CoverProperties SnippetOption from the blog posts list page.
As it selects the default sizing class and applies it, the min-height
css property was applied and breaking the layout.

The covers min-height is now set as !important to not be overriden in
that context.

Part of https://github.com/odoo/odoo/pull/71593
task-2497846

X-original-commit: aa9591bf546729162f44d1f34cbee094131aba73
2021-06-15 16:36:30 +00:00
Younn Olivier e13924253e [FIX] website_blog: fix blog cover height on post page
As [1] added `!important` flag on .o_full_screen_height and
.o_half_screen_height global classes, the current override in
website_blog was not effective anymore.

Also, the value of the height override is also changed to offer more
differences. Also, simply restoring the old rule would "restore" 13.0
databases but "break" 14.0 databases which relied on it. So a compromise
between both was chosen.

[1]: https://github.com/odoo/odoo/commit/7cc6fdf36569be85e995c962321f2926822ac604

Part of https://github.com/odoo/odoo/pull/71593
task-2497846

X-original-commit: 3929eece7face5f6ed497a119787cd841b917c08
2021-06-15 16:36:30 +00:00
Leonardo Pavan Rocha c53724ebc3 [IMP] *: adds generic user avatar
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.

Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient

Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.

closes odoo/odoo#69819

Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-01 14:36:23 +00:00
740168ce8d [REF] web_editor, website_*, mass_mailing: adapt to Odoo Editor
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Sébastien Geelen <sge@odoo.com>
Co-authored-by: Emilien Durieu <edu@odoo.com>
2021-04-01 16:01:06 +00:00
Benoit Socias c1e84bd08d [FIX] website_blog: fit the size of the Dexter effect darkening area
Before this commit the darkening area of the Dexter effect is visible
through the rounded corners when the blog post was not hovered.

After this commit the darkening area is moved inside the right element
thus not requiring magic numbers for truncating the area and fixing the
display of the darkening area behind the rounded corners.

closes odoo/odoo#68640

X-original-commit: f08e6e02cda9080d39f3a81fb83853df917f9ebc
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-04-01 13:09:57 +00:00
Romain Derie 9658cc2944 [FIX] website_blog: add missing require
Require to website snippets options was missing.
Indeed, `CoverProperties` is defined in it, but is `include` in website_blog
without requiring it.

Somehow, it was not raising an error on runbot but adding new odoo module
(totally unrelated to CoverProperties or blog) seems to change the order of
import and reveal the issue.

Part of https://github.com/odoo/odoo/pull/64756
2021-04-01 09:49:45 +00:00
Benoit Socias eeb9593c6d [FIX] website_blog: fix Dexter effect of blog snippet
Before this commit the Dexter effect did span its darkening area beyond
the cover image.

After this commit the darkening area it aligned with the cover image.

https://github.com/odoo/odoo/pull/68529

closes odoo/odoo#68529

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-30 13:53:54 +00:00
Benoit Socias e306ec7ca3 [IMP] website_blog: remove the old latest blog posts snippet
Before this commit the old latest blog posts snippet was still
available.

After this commit the old latest blog posts snippet has been removed.

task-2477207
https://github.com/odoo/odoo/pull/67334
See https://github.com/odoo/upgrade/pull/2262
2021-03-29 14:27:58 +00:00
Benoit Socias 3c0d98bcd8 [IMP] website_blog: add a blog snippet that relies on snippet filters
Before this commit the latest posts snippet implemented the lookup for
its templates and its rendering procedure.

After this commit a new blog posts snippet is introduced which relies on
the dynamic snippet mechanisms.

task-2477207
https://github.com/odoo/odoo/pull/67334
2021-03-29 14:27:58 +00:00
Benoit Socias d65101b254 [MOV] website_blog: prepare for blog snippet refactoring
The purpose of this commit is to isolate the move operations that happen
before the refactoring of the blog snippet into a dynamic snippet so
that the refactoring diffs can be understood.

task-2477207
https://github.com/odoo/odoo/pull/67334
2021-03-29 14:27:58 +00:00
Samuel Degueldre 73f4fad9ee [REF] website_blog, *: adapt blog-post option to use new m2m for tags
*: web_editor

This commit refactors the website blog option to use the newly
introduced Many2manyUserValueWidget

Part of https://github.com/odoo/odoo/pull/67832
task-2274732

closes odoo/odoo#67832

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-25 09:27:18 +00:00
qsm-odoo e5572c317a [REV] web_editor, *: remove Jabberwock
*: barcodes, mail, mass_mailing, note, test_website, web, web_tour,
   website, website_blog, website_event, website_form, website_forum,
   website_mail_channel, website_mass_mailing, website_profile,
   website_sale, website_twitter, doc

New solutions are being investigated in master. For the moment, it seems
better to remove Jabberwock to unlock difficult forward-port between
14.0 and 14.1/master, until we decide what to do once and for all in
a later master. We may un-revert this later but that would be way easier
than reverting Jabberwock in a few months.

This was done as safely as possible by removing any commit related to
Jabberwock, then resolving conflicts, then reforcing commits from 14.0
that were hugely adapted for 14.1/master, then forcing the whole diff
over a rebased 14.1/master. The only possible miss (other than me making
a mistake) would be commits that were not forward-ported to 14.1 thanks
to Jabberwock handling the issue on its own (I know we had such commits
in website, which I manually included in this revert, see below).

For reference:

Commits which were reforced to their 14.0 version:
- https://github.com/odoo/odoo/commit/1a916fc2362c0b006460d94a219366ade1cce058
- https://github.com/odoo/odoo/commit/fd9e58a675bb7ec1bf97cb77b21b3c65369d51fe
- https://github.com/odoo/odoo/commit/bdfddace29b16404c06a7ebfc0cc242463a0e768
- https://github.com/odoo/odoo/commit/42b3ad10e0b32b7fc72f801e2c67d6baf938c566
- https://github.com/odoo/odoo/commit/710784da1f02d45cbe898da426ba7e2ac63dc711
- https://github.com/odoo/odoo/commit/597585c9b8b1350bcfd84e8433ea6c82060bcc3d
- https://github.com/odoo/odoo/commit/333a9124608ff655bd9ad5e63044a5cb7ef9c636

Commits that were not forward-ported to 14.1/master and now are:
- https://github.com/odoo/odoo/commit/55ff2d971b672dec5f103215be39101c88856b6c
- https://github.com/odoo/odoo/commit/ebbb3de1e5f363689a5ba1647bb4c26416e42d5b

+ Adapt this forward-port: https://github.com/odoo/odoo/pull/60976 (as
  it was simplified for non-stable master version relying to the
  Jabberwock implementation and now needed to be adapted to the
  summernote implementation).
  See `!$el.data('oe-expression') && $el.data('oe-xpath')`

+ Revert https://github.com/odoo/odoo/pull/60477 and reforce original
  14.0 fix https://github.com/odoo/odoo/commit/746bf53b4aecfc601f0581a948d7cb7153812c82

Note: this also means that any good refactoring that was done by the
Jabberwock-related commits is lost for now. Once the revert reaches
master, I'll try and restore what we want from those commits. Here
are their references (but obviously they have the opposite conflicts
than those resolved during this revert):

e766842a92b6 [REM] web_editor,website: empty summernote files
08c94c986e09 [REF] web_editor,web: adapt to new jabberwock editor
1546c1b74713 [REF] mass_mailing: adapt to new jabberwock editor
fd0b963c6028 [REF] website: adapt to new jabberwock editor
0113d05c6c94 [ADD] web_editor: add new Jabberwock editor lib
d0c88a396493 [FIX] web_editor: don't change background color out of the website editor
d52d3d67d4e1 [FIX] web_editor : better icon in text style dropdown
61cb2f0d21da [FIX] web_editor: should not ask if want to leave the page twice
c42012b863b5 [FIX] web_editor: trigger a resize when use the mobile preview
d934d05d6e39 [FIX] web_editor: need to build the snippet before commit it into vDom
495bea924745 [FIX] web_editor: remove box shadow on the #wrap container
bffb5612e689 [ADD] field_html: add resizer in most field_html
f3c94e40cccf [IMP] web_editor: update Jabberwock library to commit 41e4063
cc87dea3ef32 [FIX] web_editor: update header change position to work with JW
5d9b25f66704 [FIX] web_editor: do not insert chars around step icon on click
70d3f0e4630c [IMP] web_editor: update Jabberwock library to commit 0bd94881
a57f13891f82 [FIX] web_editor: open media modal in appropriate tab on dblclick media
5b7537397e08 [IMP] web_editor: update Jabberwock library to commit a7ba7c34
a8d7ec235eeb [FIX] web_editor: adapt iframe Qunit test to new editor
5f794eac7209 [FIX] mass_mailing: hide all panels on show themes
551d45641d19 [IMP] website: remove unused reference
10580e1c102f [IMP] wesbite: add comment in tour
c17049f6b764 [FIX] web_editor: Fix description toggle in pricelist snippet
18a428e854b1 [IMP] web_editor: update Jabberwock library to commit 43a10003
58a161c645a5 [REF] web_editor, website: use editor helper setClass
62dd0bd3bc66 [FIX] web_editor: properly deactivate snippets and reactivate the last
99eebcaa34cb [FIX] web_editor: disable snippet in preview mode on mouse leave options
a84216932958 [FIX] web_editor: fix the image gallery snippet
f8dd4ea3e7d5 [FIX] web_editor: fix shadow selector for Safari
e50a4f3a16de [IMP] web_editor: update Jabberwock library to commit de13ed7e
4a2718f7a5ba [FIX] web_editor: ensure dom is properly cleaned at end of save test
03684c004a4e [FIX] website: ensure reset of bg-image on add bg-video
d63397159708 [FIX] web_editor: fix image remove from images wall
82fa5142f1a5 [IMP] note: restyle note without sheet or resizer
8b9f1ce603d5 [FIX] web_editor: properly mock createWysiwygIntance (sic) in tests
fc2183b66305 [FIX] web_editor: image overlay did not update with changes
cd0d2f5791cd [FIX] web_editor: add color preview to color picker
28a168172454 [FIX] web_editor: restore removal of spinner
67c90dd3b946 [FIX] website_forum: properly initialize editor
920dfe2a430a [FIX] website_forum: better css in the JW toolbar
43f33fd651af [IMP] web_editor: update Jabberwock library to commit 6853b60
71246c92f8de [FIX] Web_editor: table options button should be inside the toolbar
12b9e5916692 [FIX] web_editor: properly update the image options on replace image
e889cf8583da [FIX] website, website_sale: properly save filter id of dynamic snippets
e0fd11e36e45 [IMP] web_editor: update Jabberwock library to commit 4b2c903b
8f2b7ba35614 [FIX] web_editor: properly stop snippet option changed event propagation
a30c2c4105c7 [FIX] website: fix megamenu snippet editor behavior
312091cf822b [FIX] web_editor: fix overlay that is not reappearing
9f1d03dda613 [FIX] web_editor: table picker not fully displayed
814ddada6124 [IMP] web_editor: remove message before leaving page if editor is destro
4f38e26af7da [FIX] web: allow saving copyright footer
01e947b6123b [FIX] web_editor: only save translations that changed
103676072c50 [FIX] web_editor: prevent traceback on open crop dialog
5844ff66d4a0 [FIX] web_editor: apply image crop in jw on save dialog
1b435652e4a0 [FIX] website_forum: ensure media modal opens on click button
4f4a6ca0b8ac [FIX] web_editor: ensure valid default html value
51e22026ac7b [IMP] web_editor: update Jabberwock library to commit ab1184f8
2413fa19be0e [FIX] web_editor: Qunit test properly wait for editor stop
aa89e1ea3e97 [FIX] web_editor: properly save view blocks with an id
e2e90b53992e [FIX] web_editor: ensure language selector is non editable
0efd72089d5c [IMP] web_editor: clean useless lines
f54dfc7631f9 [IMP] web_editor: remove useless comment
3995ab1b84f2 [IMP] web_editor: update Jabberwock library to commit b8d73691
0834b1e5740a [IMP] web_editor: withDomMutations
f1459fb7b45c [FIX] web_editor: fix non-deterministic error in QUnit wysiwyg tests
6e8acc6c8cc7 [IMP] web_editor: update Jabberwock library to commit 3bbb175c
18a0c95d51cb [FIX] website, web_editor: #wrapwrap in body
4686a92e742c [FIX] website_form: allow edition of success message
78cc4da075cc [FIX] web_editor: allow edition of branded nodes only
bcffa7353448 [FIX] web: dialog should not use field value footer items
67ff56e14746 [FIX] web_editor,website_mass_mailing: display the popup preview
3cb9bea50c20 [IMP] web_editor: update Jabberwock library to commit a20492ea
518f03e6f1c9 [FIX] web_editor: use withIntangibles to find ZoneNode
d0ad6a568f49 [FIX] website: move sidebar out of theme
d690f5da13ea [FIX] website: properly save popup id
43b3433df3e6 [FIX] web_editor: fix non-deterministic error in QUnit wysiwyg tests
4ee8f4dedc30 [FIX] web_editor: prevent deadlock when removing child snippet of popup
850be198ef6d [FIX] web_editor: prevent traceback on reposition background image
4c3eaba41f5d [FIX] mass_mailing: adapt tour to the new editor design.
496d3ea272ed [FIX] web_editor: properly position sidebar scrollbar
5be4de703074 [FIX] web_editor: Show the toolbar when select the text in forum edition

closes odoo/odoo#63768

Related: odoo/enterprise#15458
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-12-24 13:36:49 +00:00
Benoit Socias 3902fa5815 [FIX] website_blog: not include new tags in existing tags list
Before this commit the existing tags list contained the unsaved newly
added tags.

After this commit the existing tags list does not contain the unsaved
newly added tags.

Fixes https://github.com/odoo/odoo/issues/62647

closes odoo/odoo#62829

X-original-commit: 8520a3ef14dd1e79ace1dea70eebeffb4f21f0eb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-12-03 13:52:06 +00:00
Martin Trigaux 1658473bf2 [FIX] *: rephrase, correct typos
Courtesy of Transifex's translators for reporting bad/unclear sentences.

closes odoo/odoo#62564

X-original-commit: 9b3b2e8d711e3be75b1faffaf6f4f8f4ec90186e
Related: odoo/enterprise#15038
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-30 07:07:58 +00:00
Samuel Degueldre b0f95a7ace [FIX] website_blog: make twitter share string translatable
Previously the default message when sharing a blog article was
hardcoded, meaning it was always in English and not translatable, this
commit fixes that.

Closes https://github.com/odoo/odoo/issues/31173
task-2369420

closes odoo/odoo#62118

X-original-commit: fab72412b973eeec503279f498d18006a584c1c0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-22 14:03:33 +00:00
fw-bot c1e0b03d8b [IMP] website: make homepage tour, available on homepage only
Homepage tour starts with a very generic step 'drop snippet'
So, you can be in the middle of another tour and see the step of homepage tour.
This doesn't fix all cases, but make conflict less frequent.

E.g.

go to step 4 of tour event
click on save (before doing the step 5)
click on edit
Element is no more dirty (because save before step 5) so the step 5 not visible,
Tour with higher sequence (== lower priority) become visible. (e.g.: homepage)

Forward-Port of bca6cf2693d38c76b1af08398a3125bb16b59c15

closes odoo/odoo#61157

Related: odoo/design-themes#416
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-04 09:54:08 +00:00
Goaman 1981f175a6 [IMP] website: remove unused reference 2020-10-27 15:29:23 +00:00
6d6f42f489 [REF] website: adapt to new jabberwock editor
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Sébastien Geelen <sge@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
2020-10-14 10:29:11 +00:00
Benjamin Vray 3ab3afcc91 [FIX] website_blog, web_editor: fix tag layout issue in blog
Before this commit the layout of the front-end edition of tags in blog
was broken. And the default value of the select element was not filled.

We fixed those design issues and also improve some small design
details. And for the select issue, we add a return value in the
computeWidgetState of the addTag method because even if the value will
still be empty we need to return something because we want the select
to be filled by the default value of setValue() wich is "/".

task-2312878

closes odoo/odoo#58860

X-original-commit: 9a04c8146c799ecd5efa6ba42582d4664a1a3a51
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-29 17:51:04 +00:00
qsm-odoo 9f048625e1 [IMP] website, *: move page scrollbar to #wrapwrap
*: web, web_editor, portal, account, website_blog, website_forum

This is probably not ideal to move the scrolling behavior out of the
html element but this will be needed for the editor to not have a double
scrollbar on the right. This is actually also useful for the scrollbar
to appear under the purple odoo menu instead of its right.

This commit, if to be reverted in the future, however contains many
improvements to make the transition easier that should be kept: jQuery
and Odoo functions to be able to scrollTo a specific element, get the
top scrollable element, check if an element is scrollable, etc. Also,
some magic was done: if some code tries to scroll to a specific scroll
position via jQuery's scrollTop or animate functions on the html/body
element, those will still work as intended (obviously, using the new
utils to do that is however recommended).

This commit also reviews our scroll behaviors to make them more robust
and share the code.

Part of https://github.com/odoo/odoo/pull/57975
task-2344227

X-original-commit: 4e7be69825163c0a0ff41c882a196fc7f3158fb3
2020-09-22 10:09:36 +00:00
qsm-odoo e3c23b50ee [FIX] website, *: make scroll to anchor consider the fixed header
*: website_blog

This was fixed and rebroken quite a few times. Hopefully, with this
commit and the next ones, the feature will be more robust: when clicking
on a link anchor, the animation now considers the fixed header height if
any *even if the header becomes fixed during the animation*.

Part of https://github.com/odoo/odoo/pull/57975
task-2344227

X-original-commit: 416b125803d043badef8e4b022c100e33d1dba04
2020-09-22 10:09:35 +00:00
qsm-odoo c9cb4a65fc [IMP] portal, website_blog: lint some files before fixing them
Part of https://github.com/odoo/odoo/pull/57975
task-2344227

X-original-commit: 392456d686370937700a1f42f879ab6fe5ef4e68
2020-09-22 10:09:34 +00:00
Samuel Degueldre c46204dff9 [IMP] web_editor, *: make media-dialog search odoo media-library
*: website, web_unsplash, website_blog

We have recently created an odoo media library that exposes a public API
for searching for open-source media, including dynamic SVGs that can be
used with the dynamic background-shape system to create illustrations
whose colors can be changed by the user. This commit adds the
corresponding client-side functionalty: search for the images in the
media-library, creating a corresponding attachment when selected, as
well as an option to customize the colors of the dynamic SVGs.

In the process, adaptations have been made in the web_unsplash module to
avoid duplicating code and to adapt code that was making assumptions
that are no longer valid.

To make new users more aware of this feature, all default images have
been hidden from the media-dialog, so that the user is prompted so
search for images. Some tests and tours that were relying on having
default images in the media-dialog (eg in website_blog) have been
adapted to match.

task-2316651
Linked to: odoo/iap-apps#235

closes odoo/odoo#57888

X-original-commit: 7a1308b426f94b33e2bd55e5d58e661067e26ff3
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-16 16:14:37 +00:00
Francois (fge) 6286f8aab7 [FIX] website: replacement linkedin share link by the 2020 version
closes odoo/odoo#55044

Related: odoo/enterprise#12064
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-10 07:51:57 +00:00
Samuel Degueldre c3dacfea05 [IMP] web_editor, website, *: create background-type toggler option
*: website_blog

Previously, background colors, images, and videos could all be applied
on the same section, such that the image can be used as a fallback for
the video, and the color as a fallback for the image. However, if you
wanted to change the background color behind the background image, the
background image would be removed. The background image and background
video also shared the same widget to pick the image or video.

This commit adds a background-type toggler, where the user can toggle
the background color, image and video individually. It also makes the
video picker into its own UserValueWidget, such that the user can pick
both an image and video without overriding the other.

Part of https://github.com/odoo/odoo/pull/53017
task-2210790
2020-08-07 15:34:45 +00:00
DramixDwandqsm-odoo bdcc1ea9e7 [IMP] website_blog: add tag from frontend (editor left panel)
Previously, you could only add a tag on a blog post from the backend.
Here we're adding a way to add them from the left-panel so that it's
easier for the user to add them.

The long term goal will not be to reimplement complex view of the
backend. This is actually already past the limit: we will need a way
to instantiate views from the backend in the frontend in the future.

Part of https://github.com/odoo/odoo/pull/52759
task-2267693

closes odoo/odoo#52759

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-07-31 10:32:22 +00:00
stefanorigano (SRI) b7fe2bdae2 [IMP] website, *: review snippets thumbs
*: website_blog, website_event, website_form, website_mail_channel,
   website_mass_mailing, website_sale, website_twitter

Part of https://github.com/odoo/odoo/pull/55089
task-2157252
2020-07-30 10:13:07 +00:00
DramixDw da32bdb88a [IMP] website, *: make cover options always available
*: website_blog, website_event

It would make sense to be able to change the height of a cover or to
change the text alignment even if there's no backgroung-image.
Therefore, we're removing the background-image restriction for the
options of the cover snippet.

Part of https://github.com/odoo/odoo/pull/47933
task-2210733

closes odoo/odoo#47933

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-15 11:36:56 +00:00
qsm-odoo bb0cd4d5c8 [IMP] web_editor, *: review background color/image options UI
*: website, mass_mailing, website_blog, doc

Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
qsm-odoo a0f45bab76 [FIX] website_blog: restore blog option UI
The label of some buttons is updated on-the-fly, and the code which
does that was actually altering the structure of the button widgets
instead of just the labels' text. This code should be made more robust
in master.

closes odoo/odoo#54324

X-original-commit: 5eb25c482eeaf68e30fd9f5b2fbe889f9b53c954
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-10 12:05:59 +00:00
qsm-odoo 69190959ce [IMP] website, *: introduce new classes to color snippets
*: web, web_editor, website_blog, website_event

New o_cc${xxx} classes where ${xxx} is a number [1-5] to style snippets:
they come with a background color, a text color, headings colors, a
link color, primary button colors and secondary button colors which
will later be possible to customize by the user.

The classes are made so that they are working on two levels. So if a
column receives a color class and the snippet too, everything will work
fine. More than 2 levels are not supported and the editor is made so
those cases should not appear. See o_colored_level class.

Part of https://github.com/odoo/odoo/pull/45856
task-2197038
2020-06-02 09:42:19 +00:00
Samuel Degueldre ecfef7abba [FIX] website_blog: fix transition animation when going to next post
In odoo/odoo#38950 the navbar was reworked such that there is only one,
instead of using two different copies for when the user is at the top of
the page vs when the user has scrolled a little. The transition
animation to the next blog post used the first navbar's top offset to
compute where it should scroll, which is no longer correct.

This commit fixes that by using the content's offset instead, which
should always be correct.

closes odoo/odoo#51599

X-original-commit: 85cc286ff7b04eaf624082b761e14bbdde50ac76
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-20 09:55:16 +00:00
std-odoo d599a05736 [FIX] website_blog: fix the share content popover widget
Bug
===
We can not share a text with the "share content popover" widget
if the text contains a single quote (').

Task-2223641

closes odoo/odoo#49515

X-original-commit: 58cba0f3139d8ac8fe561aac88af2a79a2703d50
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-14 11:29:58 +00:00
Samuel Degueldre 5576a5f84d [IMP] web_editor, web_unsplash: improve media-dialog UX
Previously, searching for images in the database and on unsplash was
mutually exclusive, and controlled by a dropdown menu next to the search
bar. Additionally, the display of db images and unsplash images was very
different, making using the search function inconsistent and awkward.

This commit merges the unsplash search into the db search. When
searching, the first few matches from the database are displayed, then
results from unsplash.

Additionally, the layout of images has been greatly improved,
eliminating almost all padding, using some flex-box magic to allow the
images to take up all the available space without being cropped or
deformed.

The input to add an attachment by URL is now collapsed by
default, and clicking on it will expand it to reduce visual clutter.

Finally, when not in multi-images mode, the clicked image is immediately
used, rather than the user having to click it and then click the add
button, or having to double click, which was not obvious.

task-2091417
closes odoo/odoo#45174
2020-03-30 11:06:45 +00:00
Romeo Fragomeli ab2e3fdb7d [REF] *: add tour steps utils
This commit moves some step utils in a dedicated file and add new ones.
These steps will be very useful for the Main Flow Tour to avoid
duplicated code.

To do this, we also had to transform it into functions to allow
utils to call each other. Existing one are converted for
standardization purpose.

Note that 'WEBSITE_NEW_PAGE' wasn't considered as an util.
This is a very simple step only used twice.
2020-03-11 10:10:16 +00:00
Samuel Degueldre 382f17f462 [FIX] website_blog: fix s_latest_post using undefined theme color
In odoo/odoo#42466 , the s_latest_posts snippet options that were
theme-specific were brought into standard from various themes. One of
those options is hover effects, and one of those hover effects used the
beta theme color, which is not defined in theme_bootswatch, and would
cause assets_frontend to fail to build when that theme was selected.

This commit fixes that by changing it to use the secondary theme-color
instead, which is available in all themes.

closes odoo/odoo#46387

X-original-commit: 75c44836580ed71f035d8b23097a4998a1109917
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-26 17:44:18 +00:00
Jeremy Kersten d020dd89b5 [FIX] website_blog: simplify call to s_latest_posts
Common part of the domain is automatically appended by controller now.

X-original-commit: 38058cc6642b36195329e03ca187bd7d4366914d
2020-02-21 12:30:14 +00:00
Loan (lse)andNicolas Lempereur 7ceba92511 [FIX] website_blog: handle None window selection
In the code for commenting or posting to twitter a selected range of
text, we did not take into account the case of no selection (eg. we
click on an element, but another code prevent default browser action).

opw-2197227

closes odoo/odoo#45883

X-original-commit: c578279dba4a3fd95e261d8dc58f2704c3b50eb0
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
2020-02-20 20:12:17 +00:00
Samuel Degueldre 7cc6fdf365 [FIX] website_blog: fix next post loading animation
Previously, when clicking on the next post at the bottom of a blog post,
a spinning loader circle would always appear in the bottom left of the
screen in an incorrect position. This commit removes that spinner.

This commit also adds support for the half-screen cover size, which
until now would animate as though it was full screen. All in all this
just makes the transition animation much more seamless, which was the
point of having it in the first place.

task-2166790

closes odoo/odoo#44198

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-10 17:03:33 +00:00
jvm-odoo de7a0b3240 [FIX] website_blog: fix share link on blog posts
Issue

	- Install Blog
	- Go on a Blog post
	- Customize > Enable Share links & Sidebar
	- Click on a social share link

	Redirected to #

Cause

	The website_blog.js has been refactored fron v12
	to v13, it seems that the onShareLink method has
	been forgotten in the event handlers.

Solution

	I added it and make it working with the actual view.

OPW-2170706

closes odoo/odoo#44992

X-original-commit: 0e90afb789690be3723f0c3522b50b2ce7dfb8e5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-10 14:11:01 +00:00
Samuel Degueldre 4751d35e0f [IMP] website_blog, *: review latest posts snippet
* website

This commit reviews the latest post snippet(s). It fixes the list style
option and renames it to "Hover effects", most of the css for those
effects were broken, since the XML had been altered in bb0cdec and the
css had not been adapted, resulting in most rules being unable to target
anything.

The number of posts option has been removed in favor of a fixed number
that depends on the screen size so that the layout looks good on all
devices (3x1, 2x2 1x3), this makes the layout more responsive and
prevents having a select with 10 options where most choices would result
in a poor layout.

The list, big picture and horizontal layouts of this snippet have been
fused, and the layout is now an option on the snippet. A new 'cards'
layout similar to the one on odoo.com/blog has been added as well.

Lastly, a new option has been added to choose which posts are displayed:
most recent or most viewed.

task-2152188
PR: odoo/odoo#42466
2020-02-04 16:08:02 +00:00
Samuel Degueldre 9fc5f14469 [IMP] website_blog, *: make theme-specific snippet and options standard
* website

This commit moves the theme specific options from theme_avantgarde and
theme_graphene standard, namely:
- Big picture "list style" (hover effect)
- Big picture "First is bigger" option
- Latest posts horizontal

task-2152188
PR: odoo/odoo#42466
2020-02-04 16:07:38 +00:00
Samuel Degueldre f4c7c0bef5 [REF] website_blog: move snippets to match website snippet organization
Recently, we changed the way snippet are organized in website to allow
for versioning of the snippets' css and frontend js, to prevent new
changes from breaking old versions of a snippet. This commit moves all
the parts of the s_latest_posts and its big picture counterpart (which
are really just two variations of a single snippet) to match this new
organization, such that we can support css and js versioning in the
future.

task-2152188
PR: odoo/odoo#42466
2020-02-04 16:07:18 +00:00
Romain Derie 1ecdb5b6b8 [IMP] website(_blog): remove several border in edit mode
This commit removes some noise of the UI in edit mode, to have a more easy
interface for onboarding blog creation.

task-2144335
2020-02-03 15:25:20 +00:00
Romain Derie d64eb2981f [REM] website, website_blog, website_event: remove text size on cover
task-2144335
2020-02-03 15:25:20 +00:00
Samuel Degueldre d513c662e0 [IMP] website, *: add full height option and scroll down button
*: website_blog, website_event

This commit adds a "Height" option to sections, allowing them to have a
minimum height of the user's choosing (either full screen height or half
screen height, similar to blog covers). Enabling the full screen option
also allows the user to add a "scroll down button" that will scroll down
to the next section, also similar to blog covers.

As such, the classes doing the corresponding things in website_blog and
website_event have been renamed to reuse the same code.

task-2155710

closes odoo/odoo#41623

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-01-08 14:13:36 +00:00