Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD][web_editor_background_color] Custom background color picker #582

Merged
merged 3 commits into from
Mar 17, 2017

Conversation

yajo
Copy link
Member

@yajo yajo commented Mar 15, 2017

This addon lets the user choose a preferred background color when editing some web content.

Works out of the box with website and mass_mailing addons, although requires none of those.

mass_mailing_editor

😎 Cool

This addon replaces the old website_mail_snippet_bg_color, and it is completely new.

@Tecnativa

This addon lets the user choose a preferred background color when editing some web content.

Works out of the box with `website` and `mass_mailing` addons, although requires none of those.
@yajo yajo added this to the 9.0 milestone Mar 15, 2017
@yajo yajo self-assigned this Mar 15, 2017
@pedrobaeza pedrobaeza mentioned this pull request Mar 15, 2017
31 tasks
Copy link
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code review: LGTM

Copy link
Member

@tarteo tarteo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @yajo
I tested it on runbot:

  • I tried to select a color in the color picker (by clicking on the color pallet): The background wouldn't change to the color I selected; it kept changing it to white. It works though when I select the text field, type in any character (the menu closes and the background color changes to black), reopen the menu and then select the color on the pallet.
  • The color presets works.

Code:

  • Looks very good. It's easy to read and has some nice inline documentation!

I'm using Google Chrome 56.0.2924.87.

@yajo
Copy link
Member Author

yajo commented Mar 16, 2017

Thanks @tarteo, could you upload a screencast to see exactly what's happening?

@tarteo
Copy link
Member

tarteo commented Mar 16, 2017

@yajo
https://www.youtube.com/watch?v=Unx5R4jtSSE
I found out that because the opacity is default 0 the background turns white. I've to open the menu a couple of times to get the color I want to select (see video).

This happened specifically in Chrome as demonstrated in
OCA#582 (comment).
@yajo
Copy link
Member Author

yajo commented Mar 16, 2017

@tarteo It should work now. I did not notice because I mainly use Firefox.

Merger: remember to squash on merge 😊

Copy link
Member

@tarteo tarteo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 😄 👍

var style = this.$target.prop("style");
this.change_border =
style["border-color"] &&
style["background-color"] == style["border-color"];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new beta lint of javascript using jshint show the following message:

In order to disable a few checks... Is a valid check for you the eqeqeq?

Copy link
Member

@rafaelbn rafaelbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in runbot

@yajo
Copy link
Member Author

yajo commented Mar 17, 2017

@moylop260 Fixed. 4x 👍 now. Please merge 🙌 😊

@moylop260 moylop260 merged commit 0e002a1 into OCA:9.0 Mar 17, 2017
@yajo yajo deleted the 9.0-web_editor_background_color branch March 20, 2017 10:15
yajo added a commit to Tecnativa/web that referenced this pull request Jul 5, 2017
…A#582)

* [ADD][web_editor_background_color] Custom background color picker

This addon lets the user choose a preferred background color when editing some web content.

Works out of the box with `website` and `mass_mailing` addons, although requires none of those.

* [FIX] Avoid clicks removing dropdown menu

This happened specifically in Chrome as demonstrated in
OCA#582 (comment).

* [FIX] Use strict equality operator.
yajo added a commit to Tecnativa/web that referenced this pull request Oct 11, 2018
…A#582)

* [ADD][web_editor_background_color] Custom background color picker

This addon lets the user choose a preferred background color when editing some web content.

Works out of the box with `website` and `mass_mailing` addons, although requires none of those.

* [FIX] Avoid clicks removing dropdown menu

This happened specifically in Chrome as demonstrated in
OCA#582 (comment).

* [FIX] Use strict equality operator.
yajo added a commit to Tecnativa/web that referenced this pull request Jul 9, 2019
…A#582)

* [ADD][web_editor_background_color] Custom background color picker

This addon lets the user choose a preferred background color when editing some web content.

Works out of the box with `website` and `mass_mailing` addons, although requires none of those.

* [FIX] Avoid clicks removing dropdown menu

This happened specifically in Chrome as demonstrated in
OCA#582 (comment).

* [FIX] Use strict equality operator.
daerio pushed a commit to vertelab/odoo-oca-web that referenced this pull request Aug 7, 2020
…A#582)

* [ADD][web_editor_background_color] Custom background color picker

This addon lets the user choose a preferred background color when editing some web content.

Works out of the box with `website` and `mass_mailing` addons, although requires none of those.

* [FIX] Avoid clicks removing dropdown menu

This happened specifically in Chrome as demonstrated in
OCA#582 (comment).

* [FIX] Use strict equality operator.
CarlosRoca13 pushed a commit to Tecnativa/web that referenced this pull request Nov 5, 2020
…A#582)

* [ADD][web_editor_background_color] Custom background color picker

This addon lets the user choose a preferred background color when editing some web content.

Works out of the box with `website` and `mass_mailing` addons, although requires none of those.

* [FIX] Avoid clicks removing dropdown menu

This happened specifically in Chrome as demonstrated in
OCA#582 (comment).

* [FIX] Use strict equality operator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants