diff options
| author | qsm-odoo <qsm@odoo.com> | 2016-05-02 11:04:04 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2016-05-02 11:06:09 +0200 |
| commit | 89c0266b93c0f2b54b0248be642066bc919e94f1 (patch) | |
| tree | 9495264cadfa9bd9d07c76415609e5c36b50a3cf /addons/web_editor/static/src/less/web_editor.backend.less | |
| parent | e3ce70a64d7da6532f50c61762c23c26a7106153 (diff) | |
[FIX] web_editor: backend colorpicker in editor
The web_editor.colorpicker defines a series of color buttons which
toggle the bg-* and text-* classes. The problem is that themes can
define new buttons whose bg-* and text-* classes only exist in the
frontend. So these buttons should not be displayed in the backend.
Only solution for the current implementation is to add this ugly rule
(in this backend file) which hides every button and redisplayed the
default ones.
This fix is temporary and has to be improved in next versions.
Diffstat (limited to 'addons/web_editor/static/src/less/web_editor.backend.less')
| -rw-r--r-- | addons/web_editor/static/src/less/web_editor.backend.less | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/less/web_editor.backend.less b/addons/web_editor/static/src/less/web_editor.backend.less index 0ff97e327aa..53789aae8af 100644 --- a/addons/web_editor/static/src/less/web_editor.backend.less +++ b/addons/web_editor/static/src/less/web_editor.backend.less @@ -83,3 +83,21 @@ box-shadow: #DDCC33 0 0 5px 2px inset; } } + +// FIX (to improve in next versions) +// --------------------------------- +// The web_editor.colorpicker defines a series of color buttons which toggle the bg-* and text-* classes. +// The problem is that themes can define new buttons whose bg-* and text-* classes only exist in the frontend. +// So these buttons should not be displayed in the backend. Only solution for the current implementation is +// to add this ugly rule (in this backend file) which hides every button and redisplayed the default ones. +.note-editor { + .colorpicker .o_colorpicker_section > button { + display: none; + + &[data-color="alpha"], &[data-color="beta"], &[data-color="gamma"], &[data-color="delta"], &[data-color="epsilon"], + &[data-color="white"], &[data-color="gray-lighter"], &[data-color="gray-light"], &[data-color="gray"], &[data-color="gray-dark"], &[data-color="gray-darker"], &[data-color="black"], + &[data-color="primary"], &[data-color="success"], &[data-color="info"], &[data-color="warning"], &[data-color="danger"] { + display: block; + } + } +} |
