8.3.x simpletest.module simpletest_js_alter(&$javascript, AttachedAssetsInterface $assets)
8.0.x simpletest.module simpletest_js_alter(&$javascript, AttachedAssetsInterface $assets)
8.1.x simpletest.module simpletest_js_alter(&$javascript, AttachedAssetsInterface $assets)
8.2.x simpletest.module simpletest_js_alter(&$javascript, AttachedAssetsInterface $assets)
8.4.x simpletest.module simpletest_js_alter(&$javascript, AttachedAssetsInterface $assets)
7.x simpletest.module simpletest_js_alter(&$javascript)

Implements hook_js_alter().

File

modules/simpletest/simpletest.module, line 94
Provides testing functionality.

Code

function simpletest_js_alter(&$javascript) {
  // Since SimpleTest is a special use case for the table select, stick the
  // SimpleTest JavaScript above the table select.
  $simpletest = drupal_get_path('module', 'simpletest') . '/simpletest.js';
  if (array_key_exists($simpletest, $javascript) && array_key_exists('misc/tableselect.js', $javascript)) {
    $javascript[$simpletest]['weight'] = $javascript['misc/tableselect.js']['weight'] - 1;
  }
}