array( 'scope' => 'navigate-init' ), 'jquery.js' => array( 'title' => t('jQuery'), 'scope' => 'navigate-init', 'vendor url' => 'http://jquery.com/', 'download url' => 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', 'error_message' => t('Navigate does not use the packaged jQuery from Drupal, nor from the jQuery Update module. Instead, Navigate relies on using a no-conflict version of jQuery. This ensures that jQuery is updated to the latest version and that it works completely with Navigate and any installed plugins.', array('!no-conflict' => 'http://api.jquery.com/jQuery.noConflict/')), ), 'jquery-ui.js' => array( 'title' => t('jQuery UI'), 'scope' => 'navigate-init', 'vendor url' => 'http://jqueryui.com/', 'download url' => 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js', 'error_message' => t('Drupal does not provide jQuery UI by default. If you have the jQuery UI module installed, Navigate does not use it. Instead, Navigate relies on using a no-conflict version of jQuery. This ensures that jQuery is updated to the latest version and that it works completely with Navigate and any installed plugins.', array('!no-conflict' => 'http://api.jquery.com/jQuery.noConflict/')), ), // Navigate Core Libraries 'navigate.core.js' => array(), 'jquery.cookie.js' => array( 'title' => t('jQuery Cookie'), 'vendor url' => 'https://github.com/carhartl/jquery-cookie', 'download url' => 'https://github.com/carhartl/jquery-cookie/raw/master/jquery.cookie.js', ), 'jquery.hotkeys.js' => array( 'title' => t('jQuery Hotkeys'), 'vendor url' => 'https://github.com/jeresig/jquery.hotkeys', 'download url' => 'https://github.com/jeresig/jquery.hotkeys/raw/master/jquery.hotkeys.js', ), 'jquery.hoverintent.js' => array( 'title' => t('jQuery hoverIntent'), 'vendor url' => 'http://cherne.net/brian/resources/jquery.hoverIntent.html', 'download url' => 'http://cherne.net/brian/resources/jquery.hoverIntent.minified.js', ), 'jquery.hoverintent.js' => array( 'title' => t('jQuery hoverIntent'), 'vendor url' => 'http://cherne.net/brian/resources/jquery.hoverIntent.html', 'download url' => 'http://cherne.net/brian/resources/jquery.hoverIntent.minified.js', ), 'jquery.mousewheel.js' => array( 'title' => t('jQuery Mousewheel'), 'vendor url' => 'https://github.com/brandonaaron/jquery-mousewheel', 'download url' => 'https://github.com/brandonaaron/jquery-mousewheel/raw/master/jquery.mousewheel.js', ), 'jquery.mwheelintent.js' => array( 'title' => t('jQuery Mousewheel Intent'), 'vendor url' => 'http://www.protofunc.com/scripts/jquery/mwheelIntent/index.html', 'download url' => array('http://jscrollpane.kelvinluck.com/script/mwheelIntent.js', 'http://www.protofunc.com/scripts/jquery/mwheelIntent/mwheelIntent.js'), ), 'jquery.pngFix.js' => array( 'title' => t('jQuery PNG Fix'), 'vendor url' => 'http://jquery.andreaseberhard.de/pngFix/index.html', 'download url' => 'http://jquery.andreaseberhard.de/pngFix/jquery.pngFix.js', ), 'jquery.shadowanimation.js' => array( 'title' => t('jQuery Shadow Animation'), 'vendor url' => 'http://www.bitstorm.org/jquery/shadow-animation/', 'download url' => 'http://www.bitstorm.org/jquery/shadow-animation/jquery.animate-shadow.js', ), 'jquery.tokeninput.js' => array( 'title' => t('jQuery Token Input'), 'vendor url' => 'https://github.com/markcarver/jQuery-Tokenizing-Autocomplete-Plugin', 'download url' => 'https://github.com/markcarver/jQuery-Tokenizing-Autocomplete-Plugin/raw/master/src/jquery.tokeninput.js', ), 'xregexp.js' => array( 'title' => t('XRegExp'), 'vendor url' => 'http://xregexp.com/', 'download url' => 'http://xregexp.com/xregexp.js', ), ); // Load plugin libraries foreach ($_navigate['hooks']['libraries'] as $plugin) { $function = $plugin .'_navigate_libraries'; if (function_exists($function)) { $plugin_libraries = (array) $function(); foreach ($plugin_libraries as $name => $properties) { if (isset($libraries[$name])) { if (!isset($properties['overwrite']) || $properties['overwrite'] === FALSE) { unset($plugin_libraries[$name]); continue; } } if (!isset($plugin_libraries[$name]['plugin'])) { $plugin_libraries[$name]['plugin'] = $plugin; } } $libraries = array_merge($libraries, $plugin_libraries); } } // Load defaults for libraries $library_paths = navigate_library_paths(); foreach ($libraries as $library => $properties) { $libraries[$library] += array( 'author' => '', 'version' => '', 'vendor url' => '', 'download url' => '', 'library path' => '', 'plugin' => 'navigate', 'optional' => FALSE, ); $library_path = &$libraries[$library]['library path']; if (empty($library_path)) { foreach($library_paths as $path) { $path = $path . '/' . $library; if (file_exists($path)) { $library_path = $path; $libraries[$library]['installed'] = TRUE; break; } } } else { if (file_exists($library_path)) { $libraries[$library]['installed'] = TRUE; } } if (!empty($library_path)) { $contents = file_get_contents($library_path); // Only get the first comment block close to the beginning of file if (preg_match("/(\/\*.+\*\/)/s", $contents, $match)) { $pos = strpos($match[1], '*/') + 2; $libraries[$library]['details'] = substr($match[1], 0, $pos); } } if (!isset($libraries[$library]['installed']) && $libraries[$library]['optional'] == FALSE) { $libraries[$library]['error'] = t('This library could not be detected.'); if (isset($libraries[$library]['error_message'])) { $libraries[$library]['error'] .= '
' . $libraries[$library]['error_message'] . '
'; } } } return $libraries; } function navigate_admin_libraries_check() { include_once './includes/install.inc'; navigate_add_js('navigate.admin.js'); navigate_add_css('navigate.admin.css'); $form = array(); $description = t('Navigate uses many JavaScript libraries to function properly. The table below will indicate the status of each library. Drupal only allows third-party applications with GPL 2+ and compatible licenses to be packaged. Not all of the required/optional libraries may be available upon initial installation of Navigate and may require extra steps to configure.'); $form['description'] = array( '#value' => $description, ); $form['paths'] = array( '#type' => 'fieldset', '#title' => t('Library Lookup Paths'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#description' => 'The following paths are the locations where Navigate looks for the supported libraries:' . htmlspecialchars($library['details']) . ''; } $description = ''; if (count($info) > 0) { $description = '