You are here

function theme_designkit_colorpicker in DesignKit 7

Same name and namespace in other branches
  1. 6 designkit.module \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.admin.inc, line 218

Code

function theme_designkit_colorpicker($variables) {

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