[FIX] website: fix adding same font family twice
Steps to reproduce the bug :
- Add the same google font twice with the font family selector in the
option tab of the editor panel.
- The font will be displayed only once in the font selector menu but 2
trash icons will be added, one for the added font and one for the font
that was already there.
This commit fix this and allows now the user to add the same font twice,
but only to replace a served font by a local font. The opposite does not
make sense, but if the user really wants to replace a local font with a
served, it is always possible by deleting the locale beforehand.
In addition, this commit adds a cloud icon next to the default fonts of
the theme. Since these fonts are served by Google, it is logical to have
the cloud icon. This is consistent with the cloud icon that is present
when the user adds a font served by Google.
task-2998689
closes odoo/odoo#103402
Signed-off-by:
Romain Derie (rde) <rde@odoo.com>
Showing
- addons/website/i18n/website.pot 10 additions, 0 deletionsaddons/website/i18n/website.pot
- addons/website/static/src/js/editor/snippets.options.js 39 additions, 1 deletionaddons/website/static/src/js/editor/snippets.options.js
- addons/website/static/src/scss/secondary_variables.scss 3 additions, 0 deletionsaddons/website/static/src/scss/secondary_variables.scss
- addons/website/static/src/xml/website.editor.xml 1 addition, 1 deletionaddons/website/static/src/xml/website.editor.xml
Loading