Support for Drupal core's farbtastic widget seems to be in the code but commented out.

This would be useful to have available as a separate widget, especially in light of #1743808: popup widget is buggy.

Comments

joachim’s picture

Status: Active » Needs review
StatusFileSize
new3.23 KB

Here's a patch.

alanom’s picture

Patch works great for me.

quicksketch’s picture

StatusFileSize
new3.86 KB

Thanks for the patch @joachim! I updated it to act more how I expect Farbtastic to behave, matching the functionality of Color module:

- When you adjust the color wheel, it immediately updates the field, including a background color matching the selected color.
- And if you enter in a hex code, it immediately updates the color wheel to match.

It *doesn't* set the background color on page load, since I think that's something that should probably be done by colorfield itself. I'm not sure if it would be preferable to do it for just Farbtastic or for all color widgets; though the latter would be my preference. That way you could easily *see* what color a hex code was without opening the color picker at all.

joachim’s picture

Thanks for the improvement!

Not sure I can set this to RTBC as some of the patch is my work, but works great for me.

artusamak’s picture

Status: Needs review » Fixed

Excellent, thank you guys, i just merged that change http://drupalcode.org/project/colorfield.git/commit/10c4d0d0c39d432a9d63... and added a setting to enable or not the usage of the colorpicker in http://drupalcode.org/project/colorfield.git/commit/724281ec1744903c9b1e... i'm also planning to expose minicolors which is the only maintained colorpicker, i will expose it as an optional alternative if the user has jquery update enabled (requires jquery 1.7).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.