Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
What about a colorpicker element? currently there's a module for that but apparently it won't be ported anytime soon.
Comment | File | Size | Author |
---|---|---|---|
#5 | colorpicker-1083958-3.patch | 2.04 KB | lelizondo |
#4 | colorpicker-1083958-2.patch | 1.79 KB | lelizondo |
#2 | colorpicker-1083958-4197442.patch | 2.31 KB | minorOffense |
Comments
Comment #1
minorOffense CreditAttribution: minorOffense commentedHere's an attempt to get the color picker element into the module. To test, you'll have to use Opera 11.
Also, this patch was made to the Drupal 7.x code. If it's good, I can port to 6.x
Comment #2
minorOffense CreditAttribution: minorOffense commentedComment #3
lelizondo CreditAttribution: lelizondo commentedI get Hunk #2 failed when applying with patch command
If I use git apply I also get two errors.
Comment #4
lelizondo CreditAttribution: lelizondo commentedI've remade the patch since the previous one didn't apply. Here is the same exact patch.
Anyway, I tested the patch with Opera 11 like you said but it didn't work, here is the important part in case I'm using it wrong.
Comment #5
lelizondo CreditAttribution: lelizondo commentedOk, so here is a working patch.
First, you have to download the JsColor zip from http://jscolor.com/download.php
Extract it to the module directory and rename it to jscolor
Apply the patch. Now you can select a color from a color picker.
The only reason because I choose jscolor over other color pickers is that was the easiest one to implement, all it needed was the color class to be added to the input
I tested this with Firefox 3.6.x and it worked.
Comment #6
lelizondo CreditAttribution: lelizondo commentedComment #7
lelizondo CreditAttribution: lelizondo commentedIt seems like we can use Farbtastic that already comes with core and avoid having to download a new library.
Here is a nice patch that uses the Farbtastic color picker if anyone wants to jump in and take it as an example. http://drupal.org/files/issues/env_ind_farbtastic_picker_60422_0.patch
I'll work tonight with this.
Comment #8
minorOffense CreditAttribution: minorOffense commentedSorry, I was reading the color input element docs on some HTML5 sites and they said it was only properly implemented in Opera 11.
I didn't include any javascript libraries because I understood the w3c docs on the input type color as not requiring any. I was assuming the browser would just handle all that.
As for the bad patch, that's my bad. I'm still getting used to this whole git thing. I may have started working from the wrong branch (I think it was a branch for fixing the horizontal tabs, the git instructions for the project link to it for some reason).
I'll keep reading and help out as best I can. Well done with the patch though!
Comment #9
Pere OrgaAdding related issue.