forked from jsreese/monster_menus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmm_dependencies.inc
54 lines (46 loc) · 1.9 KB
/
mm_dependencies.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
// $Id: mm_dependencies.inc 5163 2011-03-17 16:54:12Z vquinn $
function mm_dep_add_libs($lib_type) {
$dep_path = drupal_get_path('module', 'monster_menus') . '/dependencies/';
switch ($lib_type) {
case 'jsTree':
// used in monster_menus/mm_browser.inc
drupal_add_js($dep_path . 'jsTree/jquery.jstree.js');
drupal_add_css($dep_path . 'jsTree/source/tree_component.css');
return;
case 'splitter':
// used in monster_menus/mm_browser.inc
drupal_add_js(JQUERY_UI_PATH . '/external/jquery.cookie.js');
drupal_add_js($dep_path . 'splitter.js');
return;
case 'fg.menu':
// used in monster_menus/mm_browser.inc
drupal_add_js($dep_path . 'fg.menu.js');
drupal_add_css($dep_path . 'fg.menu.css');
jquery_ui_add('ui.core');
return;
case 'dataTables':
// used in academics/{acad_library.inc, acad_lib_eresv.inc, academics.module}
drupal_add_js($dep_path . 'jquery.dataTables.min.js');
return;
case 'php-captcha':
// used in monster_menus/misc.inc
$captcha = $dep_path . 'php-captcha';
require_once("$captcha/php-captcha.inc.php");
$fonts = array("$captcha/fonts/VeraBd.ttf", "$captcha/fonts/VeraMono.ttf", "$captcha/fonts/VeraIt.ttf");
$images = array("$captcha/images/1.jpg", "$captcha/images/2.jpg", "$captcha/images/3.jpg");
return array($fonts, $images);
case 'xregexp':
// used in monster_menus/mm_static.inc
drupal_add_js($dep_path . 'xregexp.js');
return;
case 'jquery.cycle':
// used in themes/default/node-featured_content_slider.tpl.php
drupal_add_js($dep_path . 'jquery.cycle.all.min.js');
return;
}
die("mm_dep_add_libs() called with unknown parameter '$lib_type'");
}
function mm_dep_add_js_dep_path() {
drupal_add_js(array('dependencyPath' => drupal_get_path('module', 'monster_menus') . '/dependencies'), 'setting');
}