You are here

function boxes_add_js in Boxes 6

Same name and namespace in other branches
  1. 7 boxes.module \boxes_add_js()

Add JavaScript to the page.

2 calls to boxes_add_js()
boxes_block in ./boxes.module
Implementation of hook_block().
boxes_context_block_info_alter in ./boxes.module
Implementation of hook_context_block_info_alter().

File

./boxes.module, line 552

Code

function boxes_add_js() {
  static $added = FALSE;
  if ($added || !boxes_access_admin()) {
    return;
  }
  $added = TRUE;
  ctools_include('ajax');
  ctools_add_js('ajax-responder');
  drupal_add_js(drupal_get_path('module', 'boxes') . '/boxes.js');
  drupal_add_js('misc/jquery.form.js');
  drupal_add_css(drupal_get_path('module', 'boxes') . '/boxes.css');
  drupal_add_js(array(
    'getQ' => $_GET['q'],
  ), 'setting');
}