| 1 |
<?php
|
| 2 |
|
| 3 |
function jquery_freebase_jq($op, $plugin = NULL) {
|
| 4 |
switch ($op) {
|
| 5 |
case 'info':
|
| 6 |
return array(
|
| 7 |
'freebase' => array(
|
| 8 |
'name' => 'Freebase',
|
| 9 |
'description' => t('This is the Freebase jQuery plugin. It can enhance your forms.'),
|
| 10 |
'version' => 'r0.4 // 2008-06-18 // jQuery 1.2.6',
|
| 11 |
'url' => 'http://code.google.com/p/freebase-suggest',
|
| 12 |
'files' => array(
|
| 13 |
'js' => array(
|
| 14 |
drupal_get_path('module', 'jquery_freebase') . '/jquery.freebase.suggest/dist/freebase.suggest.js',
|
| 15 |
),
|
| 16 |
),
|
| 17 |
),
|
| 18 |
);
|
| 19 |
case 'add':
|
| 20 |
// any additional processing required when adding a plugin to a page.
|
| 21 |
switch ($plugin) {
|
| 22 |
case 'freebase':
|
| 23 |
drupal_add_css(drupal_get_path('module', 'jquery_freebase') . '/jquery.freebase.suggest/dist/css/freebase-controls.css');
|
| 24 |
break;
|
| 25 |
}
|
| 26 |
break;
|
| 27 |
}
|
| 28 |
}
|