You are here

function oa_core_libraries_info_alter in Open Atrium Core 7.2

Implements hook_libraries_info_alter().

File

./oa_core.module, line 2385

Code

function oa_core_libraries_info_alter(&$libraries) {
  if (isset($libraries['bootstrap'])) {

    // Prevent duplicate bootstrap css since it's already
    // compiled into our screen.css from compass_bootstrap via oa_basetheme theme.
    unset($libraries['bootstrap']['files']['css']);

    // Figure out the weight relative to jquery.ui.
    $jquery_ui_library = drupal_get_library('system', 'ui');
    $jquery_ui_js = reset($jquery_ui_library['js']);
    $weight = $jquery_ui_js['weight'] - 1;

    // Adjust the group and weight of Bootstrap's Javascript.
    _oa_core_bootstrap_library_javascript_alter($libraries['bootstrap']['files']['js'], $weight);
    _oa_core_bootstrap_library_javascript_alter($libraries['bootstrap']['variants']['js']['files']['js'], $weight);
  }
}