You are here

function beautytips_library in BeautyTips 7.2

Implements hook_library().

File

./beautytips.module, line 46
Provides API for adding beautytips to pages.

Code

function beautytips_library() {
  $libraries = [];
  $path = drupal_get_path('module', 'beautytips');
  $expath = $path . '/other_libs/excanvas_r3';
  $libraries['beautytips-jquery'] = [
    'title' => 'BeautyTips Jquery Plugin',
    'website' => 'https://github.com/pifagor87/beautytips',
    'version' => '0.9.5-rc1',
    'js' => [
      $path . '/js/jquery.bt.min.js' => [],
    ],
  ];
  $libraries['beautytips-module'] = [
    'title' => 'BeautyTips Module',
    'website' => 'http://drupal.org/project/beautytips',
    'version' => '7.x-2.x',
    'js' => [
      $path . '/js/beautytips.min.js' => [],
    ],
    'dependencies' => [
      [
        'beautytips',
        'beautytips-jquery',
      ],
    ],
  ];
  if (file_exists($expath . '/excanvas.compiled.js')) {
    $libraries['excanvas_r3'] = [
      'title' => 'ExplorerCanvas',
      'website' => 'http://excanvas.sourceforge.net/',
      'version' => 'r3',
      'js' => [
        $expath . '/excanvas.compiled.js' => [],
      ],
    ];
  }
  $libraries['beautytips-ltr'] = [
    'title' => 'BeautyTips Module LTR support',
    'website' => 'http://drupal.org/project/beautytips',
    'version' => '7.x-2.x',
    'css' => [
      $path . '/css/beautytips-ltr.css' => [],
    ],
    'dependencies' => [
      [
        'beautytips',
        'beautytips-jquery',
      ],
    ],
  ];
  return $libraries;
}