* website
```
$map: (
test: 1,
black: 2,
);
@debug map-get($map, 'test');
@debug map-get($map, test);
@debug map-get($map, 'black');
@debug map-get($map, black);
```
The above code leads to a:
1
1
null
2
This is because maps' keys can be *anything* in sass (even other maps).
In the example, the map is defined with unquoted `test` and `black` as
keys which are understood as the string 'test' and the *color* black.
When asking for the value for the 'black' string key... there isn't any.
This commit forces the use of quoted string as color maps' keys.
Make some changes which are needed for theme migration.
- Theme colors as user colors fallback only (not hard choice)
- Review option dependency system
[FIX] web_editor: adapt col size to avoid too small select
We should avoid col-md-3 in col-md-9 as the menu dialog is instanciated at 2
places:
- When creating a link in the editor
- When editing website navbar menu
In the second case, there is a hack in `content.js` to remove `modal-lg`
lowering the width of the modal and making the select too small.
[FIX] website: lower navbar font size
With BS4, font-size of navbar element went from 13px to ~17px (rem unit
computation).
14px seems better than previous 13px as the frontend content size is
higher than the backend one. Thus, 13px looks too small in contrast with the
frontend page content.
[FIX] website_crm_partner_assign, website_customer, website_membership: fix layout
This commit fixes multiple layout issues, mainly by aligning code of the 3
modules:
- Add margin right to avoid text to be against image
- Using image_medium everywhere
- Fixing search input width
publish toggle red + odoo primary is weird -> gray
navbar now has a background & float-right not working since flex
-> remove navbar class, use d-flex and ml-auto so the right element will be floating since using all available width
task-1878150
* web, website
- Introduce gray color palettes (needed for themes migration)
- Synchronize BS4 color maps with individual variables (see comments
about this in the code).
- Review alpha/primary, beta/secondary matching:
Before this commit, we decided that the common way to define a color
palette was defining primary, secondary, gamma, delta and epsilon.
alpha and beta were then forced to primary and secondary without other
possibility.
The new system makes more sense:
1) define alpha, beta, gamma, delta and epsilon
2) primary and secondary will automatically be set to your alpha and
beta (allowing to style the default UI with BS4-independant
variables)
3) if you are not happy with (2), you can define primary / secondary
in your color palette so that they are not automatically set to
alpha / beta
This commit also changes what classes the editor uses. Background colors
and text colors will now use alpha/beta/gamma/delta/epsilon (not primary
and secondary anymore). For buttons, all the possibilities are suggested
but color duplicates are hidden (so if your primary and alpha are equal,
only one button color is suggested).
Sometimes, two dropzones end up at the exact same location (if two
oe_structure are somewhat siblings for example). Before this commit, in
this context, if the user hovered that location with a snippet, then stopped
hovering that location, here is what occured:
- the snippet preview is dropped after the zone 1 and the zone 1 is hidden
- the snippet preview is dropped after the zone 2 and the zone 2 is hidden
- the snippet preview is removed and the zone 2 is shown again
- ... the zone 1 is forever hidden
After this commit, the snippet preview can only be dropped once.
Dropzones between columns were displayed vertically, they were detected
thanks to their 'float' property. With BS4, columns are not floating
elements anymore, they use flex. So the code had to be adapted.
- The current code found colors in the page which were not custom colors
(because we were case-sensitive for hex values)
- Applying custom colors font font/background were inverted
* web_editor, portal
This commit introduces the first page options: header overlay and color.
The website builder is improved to allow the management of those. With
this commit, users can now click on the website header to make it go on
top of the first snippet, with a chosen transparent color. This is a
configuration that can be done on each page individually (as the feature
is very dependent of the first snippet on the page, this is typically an
option for homepages).
task-32155
* web, web_editor, website_hr_recruitment, website_mail_channel,
website_mass_mailing
- Review all snippets and add new ones
- Add lots of new options
- Use odoo colors as default theme colors
task-38878
- Custom color can now be applied to elements
- Find used custom colors in the page and add them as colorpicker
suggestions
- Current color is selected in the picker when you open the custom
color wizard
task-37974
Closes#26274
- Split editor button: one for font color and one for background color
- Remove recent color button feature
- Add only theme colors and remove other color sections like
graypalette/standard colors
- Button's icon for font color and background color buttons have the
same color of currently selected element
task-37974
Closes#26274
* web, web_editor, website, website_theme_install, portal,
theme_default, theme_bootswatch
The purpose of this task is to make the customize dialog as generic as
possible, that is theme-independant:
1) The design is now totally generic (Odoo visuals)
2) The XML definition is form-view like. This allows themes to extend
the dialog without any risk of breaking the style and also allows to
not care about lots of technical details.
3) New options have been included. Those were themes options that are
now generic and which themes can simply adapt without touching the
customize modal (navbar colors, footer color, navbar layout, fonts,
body background, ...).
The color palette can now also be customized with user colors.
Using sass functionnalities, color palettes and fonts integration is now
a lot better.
Thanks to @qha-odoo for the original design.
task-31677
If a user embeds a youtube video on his website, he has no option to remove the
suggestion of related videos at the end of playback.
Since there is no good reason to have it, we disable the related videos in all
cases.
opw 1868380
The purpose of this change is to make the code clearer and testable.
In this change, the 'tab_manager' static object was merged with the bus
cross tab.
Cleaning was done to clearly define private and public functions as well
as handlers. The methods are documented and the constants are now defined
on the class. The bus use the service behavior with 'trigger_up'.
'bus.CrossTab' who extend 'bus.Longpolling' are instantiated by the
bus service.
The class is always instantiated with a parent, or root in the case of the website
(im_livechat), to use the ajax and localstorage services. So the behavior, perhaps
logger or redefined by the parents.
Because we converted buttons into tables so inline buttons was
breaking into multiple lines so we need to add display inline and vertical align
properties in tables.
We allowed display property from mail sensitizer whitelist.
Because in this commit https://github.com/odoo/odoo/commit/cf15030ed09f7479f5b2701ba101a5bed71f7409
we use display property for align items
- Email generated from mass mailing will have its own layout with internal css.
- strip_classes is removed from mail_message because mail client are now supporting
internal stylesheet. we need it for make mail responsive.
mail: manually removed classes from incoming mail body
Because we removed strip_classes from mail message body field because we want to
allow classes in outgoing mail to make it responsive but classes are not removed
from incoming mails so here we manually removed classes from incoming mail.
opw-1836556
In the field HTML, click on create hyperlink
as its url, put in http://hell-broke-luce.waits/?param=tom@waits.com
Before this commit, since the url merely contains a @, it was considered as a mailto: link
After this commit, if the url starts with a flavor of http, it is considered
as a standard http link
OPW 1869087
closes#26012
The big plan is to remove our current editor and its customization and
replace it with an updated summernote. Meanwhile, we have to patch our
current lib directly so that it works with BS4.
* survey, website_slides
Before this commit, the web_editor app created bg and text classes its
own way for theming (alpha, beta, grays, ...). Now the system is far
more automatic by extending BS4 color maps.
In a previous commit, we removed the use of the 'btn-sm' classes as we
used it everywhere for default-size buttons instead of customizing the
size of those default-size buttons directly.
This commit proves it was even more necessary as the 'btn-xs' class does
not exist anymore in BS4 and we so can use the 'btn-sm' class instead.
Before this commit, Odoo used checkboxes in three different ways:
- A simple <input type="checkbox"/>, mainly in the frontend. The style
is browser dependant.
- Same as above but with the BS3, checkbox structure. The style is still
the same, but the alignement is supposed to be better (which is not
always the case).
- The Odoo official structure:
```
<div class="o_checkbox">
<input type="checkbox"/>
<span/>
</div>
```
which allows to have a cross-browser checkbox style and correct
alignements.
The goal after this commit is to only use the BS4 *custom* checkbox
structure to achieve the same goal as our official structure (and
remove that one):
```
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck1">
<label class="custom-control-label" for="customCheck1">...</label>
</div>
```
/!\ Labels are now required (use a zero-width space if necessary)