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.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | colorfield_farbtastic.patch | 3.86 KB | quicksketch |
| #1 | 1743952.colorfield.farbtastic-widget.patch | 3.23 KB | joachim |
Comments
Comment #1
joachim commentedHere's a patch.
Comment #2
alanom commentedPatch works great for me.
Comment #3
quicksketchThanks 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.
Comment #4
joachim commentedThanks for the improvement!
Not sure I can set this to RTBC as some of the patch is my work, but works great for me.
Comment #5
artusamakExcellent, 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).