judy.module 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * @file
  4. * Drupal Judy module
  5. */
  6. /**
  7. * Implements hook_help().
  8. *
  9. * @param string $path
  10. * @param string $arg
  11. * @return string
  12. */
  13. function judy_help($path, $arg) {
  14. switch ($path) {
  15. case 'admin/help#judy':
  16. return '<h3>Use</h3>'
  17. . '<p>' . t('Include in form generating functions') . ':<br/>drupal_add_library(\'judy\', \'judy\');</p>'
  18. . '<h3>Documentation</h3>'
  19. . '<p>'
  20. . l(
  21. t('Full jsDoc documentation of the library'),
  22. 'http://www.simple-complex.net/docs/drupal/modules/judy/js/symbols/Judy.html'
  23. )
  24. . '</p>';
  25. }
  26. }
  27. /**
  28. * Makes the modules' Javascript library available for inclusion.
  29. *
  30. * Implements hook_library().
  31. *
  32. * @code
  33. * drupal_add_library('judy', 'judy');
  34. * @endcode
  35. * @return array
  36. */
  37. function judy_library() {
  38. $path = drupal_get_path('module', 'judy');
  39. return array(
  40. 'judy' => array(
  41. 'title' => 'Judy Javascript Utilities',
  42. 'website' => 'http://drupal.org/project/judy',
  43. 'version' => 2.1,
  44. 'js' => array(
  45. $path . '/judy' . '.min' . '.js' => array(),
  46. ),
  47. 'css' => array(
  48. $path . '/judy' . '.min' . '.css' => array(),
  49. ),
  50. )
  51. );
  52. }