You are here

function timefield_library in Timefield 7

Implements hook_library().

1 call to timefield_library()
timefield_field_instance_settings_form in ./timefield.module
Implements hook_field_instance_settings_form().

File

./timefield.module, line 57
Defines a Field API field for time

Code

function timefield_library() {
  $libraries = array();
  $libs = libraries_get_libraries();
  if (array_key_exists('jquery.timepicker', $libs)) {
    $path = $libs['jquery.timepicker'];
    $libraries['timepicker'] = array(
      'title' => 'Timepicker',
      'website' => 'http://fgelinas.com/code/timepicker',
      'version' => '7.x',
      'js' => array(
        $path . '/jquery.ui.timepicker.js' => array(),
      ),
      'css' => array(
        $path . '/jquery.ui.timepicker.css' => array(),
      ),
      'dependencies' => array(
        array(
          'system',
          'ui',
        ),
        array(
          'system',
          'ui.position',
        ),
      ),
    );
  }
  return $libraries;
}