You are here

function theme_designkit_colorpicker in DesignKit 6

Same name and namespace in other branches
  1. 7 designkit.admin.inc \theme_designkit_colorpicker()

Theme colorpicker element.

1 theme call to theme_designkit_colorpicker()
_designkit_form_alter in ./designkit.admin.inc
Implementation of hook_form_alter() for spaces_features_form, system_theme_settings.

File

./designkit.module, line 244

Code

function theme_designkit_colorpicker($element) {

  // Add Farbtastic color picker
  drupal_add_css('misc/farbtastic/farbtastic.css', 'module', 'all', FALSE);
  drupal_add_js('misc/farbtastic/farbtastic.js');
  drupal_add_js(drupal_get_path('module', 'designkit') . '/designkit.js');
  $output = theme('textfield', $element);
  $output .= "<div id='{$element['#id']}-colorpicker' style='display:none;'></div>";
  return $output;
}