Commit Graph
904 Commits
Author SHA1 Message Date
qsm-odoo 3444e0a0da [FIX] web_editor, *: use explicit string keys for color maps
* 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.
2018-09-07 13:57:14 +02:00
qsm-odoo a997a5a1c6 [FIX] web_editor: adapt 'small' colorpicker button UI 2018-09-05 14:25:53 +02:00
qsm-odoo 5ec04489f0 [FIX] web_editor: avoid odoo UI buttons override by themes 2018-09-03 18:40:35 +02:00
qsm-odoo cde3c9261e [FIX] website: review website customize dialog
Make some changes which are needed for theme migration.

- Theme colors as user colors fallback only (not hard choice)
- Review option dependency system
2018-09-03 18:40:35 +02:00
Romain Derie 6bfb0810b0 [FIX] web_editor, website(_*): fix bs4
[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
2018-08-31 16:37:45 +02:00
qsm-odoo 77402a4efc [REF] web_editor, *: review color theming system
* 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).
2018-08-30 11:10:56 +02:00
qsm-odoo 514722d783 [FIX] web_editor: properly drop a snippet on a 2 zones-location
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.
2018-08-22 16:11:48 +02:00
qsm-odoo c35cc4296a [REF] web_editor: review some dropzone code
- Remove useless code
- Make searching for the nearest dropzone more efficient
2018-08-22 16:11:48 +02:00
qsm-odoo 559ce05186 [FIX] web_editor: restore vertical dropzones
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.
2018-08-22 16:11:48 +02:00
Dipalee Bhalodia 43e29e5d8f [FIX] web_editor: restore custom colors feature
- 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
2018-08-21 12:09:45 +02:00
Cocographique 5637dea114 [IMP] web_editor, website: review we options' style 2018-08-20 12:21:32 +02:00
Kishan Gajjar 9056e5a3cb [FIX] web_editor: BS4, mark proper active img-padding option 2018-08-17 12:46:14 +02:00
Christophe Simonis 0ac7f8fbe6 [MERGE] forward port branch saas-11.4 up to dabe59df9c 2018-08-14 20:16:03 +02:00
Christophe Simonis dabe59df9c [MERGE] forward port branch saas-11.3 up to 27d8daf8a7 2018-08-14 19:43:32 +02:00
Christophe Simonis 27d8daf8a7 [MERGE] forward port branch 11.0 up to 51225c9b9f 2018-08-14 18:59:57 +02:00
qsm-odoo 15df14b9e1 [IMP] website, *: add header overlay and color options
* 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
2018-08-13 18:58:06 +02:00
Cocographique 4dce6cc98b [IMP] website, *: review snippets and colors
* 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
2018-08-13 18:30:01 +02:00
Cocographique ae1e964f69 [FIX] web_editor: review snippets "Customize" dropdown style 2018-08-13 10:20:08 +02:00
Dipalee Bhalodia c31e2047b1 [IMP] web_editor: change UI for snippet background color menu
Replace current UI of the snippet background options with the
same one as the standard editor colorpicker

task-37974
Closes #26274
2018-08-12 18:37:08 +02:00
Dipalee Bhalodia f37c1b124b [IMP] web_editor: add custom colors for editor colorpicker
- 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
2018-08-12 18:37:08 +02:00
Dipalee Bhalodia a17771f591 [IMP] web_editor: improve text colorpicker
- 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
2018-08-12 18:37:08 +02:00
qsm-odoo 22c4311e28 [IMP] *: make customize dialog generic and improve options
* 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
2018-08-10 16:49:29 +02:00
qsm-odoo 1ea9ef7992 [REF] web_editor: rename scss file to respect convention
The file was introduced with BS4 but the name was not well chosen.
2018-08-10 15:43:07 +02:00
qsm-odoo 42b47a7104 [REF] web_editor, *: improve transparent grays definition
* website
2018-08-10 15:43:07 +02:00
Christophe Simonis 7499b47ffa [MERGE] forward port branch saas-11.4 up to edd586002e 2018-08-10 13:37:21 +02:00
len-odoo 47c7d123da [FIX] web_editor: remove related videos at the end of youtube embeds
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
2018-08-10 09:30:41 +02:00
Christophe Simonis 7717f082c0 [MERGE] forward port branch saas-11.3 up to af35aea6b0 2018-08-09 19:33:32 +02:00
Christophe Matthieu 6448420c5d [IMP] bus: re-factoring of bus.bus (Longpolling and CrossTab)
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.
2018-08-09 02:31:59 +02:00
Christophe Simonis 33e7479865 [MERGE] forward port branch saas-11.2 up to d7e2c767ce 2018-08-07 13:59:40 +02:00
Christophe Simonis d7e2c767ce [MERGE] forward port branch 11.0 up to 3513e599a7 2018-08-07 13:58:20 +02:00
Deep Patel 1369272f1a [FIX] base: inline buttons was breaking into multiple lines (outlook hack)
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
2018-08-06 16:17:48 +02:00
Deep Patel c76c21d607 [FIX] mass_mailing: fixed multiple buttons transcoding issues (outlook hack fix)
Because of outlook hack node was not find next sibling of current element.
Due to this only first button is transcoded into inline css.
2018-08-06 16:17:48 +02:00
Deep Patel 967d228a44 [IMP] mass_mailing, mail: added support for media queries in mass mail
- 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
2018-08-06 16:06:45 +02:00
qsm-odoo 08117383d0 [FIX] web_editor: activate image tab by default in media dialog 2018-08-02 09:55:20 +02:00
Kishan Gajjar e391ebff98 [FIX] web_editor: BS4, restore crop dialog UI 2018-08-02 09:55:20 +02:00
qsm-odoo d9b9c4e8e1 [FIX] *: BS4, restore some popover design
Completes commit https://github.com/odoo/odoo/commit/2d5595fcbad73ed0ce03f048fdd870d9659bcd5e
2018-08-02 09:55:20 +02:00
Christophe Simonis 4797627259 [MERGE] forward port branch saas-11.4 up to 8d9366197e 2018-08-01 18:02:29 +02:00
qsm-odoo 37b746c6cf [FIX] *: BS4, restore modal headers
Close icon should now be put after the modal title in the DOM.
Completes commit https://github.com/odoo/odoo/commit/d9801c1abe06b4c20702c0e94c56eea6a3ed8327
2018-07-31 13:07:48 +02:00
Christophe Simonis a719cf2563 [MERGE] forward port branch saas-11.3 up to b4555df336 2018-07-30 17:02:28 +02:00
Christophe Simonis b4555df336 [MERGE] forward port branch saas-11.2 up to 3376bad191 2018-07-30 15:51:38 +02:00
Lucas Perais (lpe) 1fd430d08f [FIX] web_editor: link creation: @ not necessarily a mailto
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
2018-07-30 10:14:26 +02:00
qsm-odoo 702499430f [REF] web_editor, website: BS4, adapt website UI 2018-07-27 12:36:54 +02:00
qsm-odoo 8c32bfb45d [REF] web_editor: make our Summernote/BS3 work with BS4
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.
2018-07-27 12:36:54 +02:00
qsm-odoo 76f714dca8 [REF] web, web_editor, *: review theme color extensions
* 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.
2018-07-27 12:36:54 +02:00
qsm-odoo cd3f5bbfda [REF] web_editor: BS4, review media dialog layout 2018-07-27 12:36:54 +02:00
qsm-odoo d9801c1abe [REF] web_editor, *: BS4, restore preservation mixins and adapt modals
* web, website
2018-07-27 12:36:54 +02:00
qsm-odoo 582933ac01 [REF] *: BS4, replace 'btn-xs' by 'btn-sm'
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.
2018-07-27 12:36:54 +02:00
qsm-odoo f7cee83cb8 [REF] *: BS4, 'center-block' -> 'd-block mx-auto' 2018-07-27 12:36:54 +02:00
qsm-odoo d48b8593dd [REF] *: BS4, 'pull-left/right' -> 'float-left/right' 2018-07-27 12:36:54 +02:00
qsm-odoo f4fbaf1efa [REF] web, *: BS4, use custom BS4 checkbox everywhere
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)
2018-07-27 12:36:54 +02:00