I'm using this module as a dependency of another module. I need to include colorpickers in the html which is returned by AHAH. I needed to make a couple of changes to get it to work.
1. Add all the colorpicker CSS and Javascript to the initial form.
2. Modify the colopicker.js file to check to see if there are any colorpickers on the page. (see patch)
3. Modify the colorpicker.js file to allow the colorpickers to be reinitialised after the ahah callback has fired. (see patch)
4. Add some javascript to to the ahah callback to fire the reinitialisation of the colorpickers.
...
$output .= '<script>var t=setTimeout(colorpicker_init, "100");</script>'; //reinitialise the colorpickers. We need to give a small delay to wait for the ahah form to be rebuilt.
print drupal_to_js(array('data' => $output, 'status' => true));
I'd appreciate it if this patch could be committed.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | colorpicker.js_.patch | 844 bytes | aaron1234nz |
| colorpicker.js_.patch | 888 bytes | aaron1234nz |
Comments
Comment #1
aaron1234nz commentedthis patch is better
Comment #2
dwees commentedDone. Modified patch slightly to fix formatting slightly (because of indenting formatting I had done poorly myself). Completely understand the idea of the fix.
Dave
Comment #3
dwees commentedComment #4
aaron1234nz commentedthanks!
Comment #5
Babalu commentedsubscibing
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.