You are here

function select2widget_library in Select2 Field Widget 7.2

Same name and namespace in other branches
  1. 7 select2widget.module \select2widget_library()

Implements hook_library().

File

./select2widget.module, line 274

Code

function select2widget_library() {
  module_load_include('module', 'libraries');
  $path = libraries_get_path('select2');
  $module_path = drupal_get_path("module", "select2widget");
  $libraries['select2'] = array(
    'title' => 'select2',
    'website' => 'http://ivaynberg.github.io/select2/',
    'version' => '3.5.2',
    'js' => array(
      $path . '/select2.js' => array(),
      $module_path . '/js/select2widget.js' => array(),
    ),
    'css' => array(
      $path . '/select2.css' => array(),
      $module_path . '/css/select2widget.css' => array(),
    ),
  );
  return $libraries;
}