You are here

function _invoice_add_css_js in Invoice 6

Same name and namespace in other branches
  1. 7 invoice_helpers.inc \_invoice_add_css_js()

Helper function to add JS or CSS to Drupal

2 calls to _invoice_add_css_js()
invoice_form in ./invoice_form.inc
Implementatin of node_form()
invoice_validate in ./invoice.module
Implementation of node_validate()

File

./invoice_helpers.inc, line 412
Invoice module

Code

function _invoice_add_css_js() {
  $a_invoice_js_settings = array(
    'host' => $_SERVER['HTTP_HOST'],
    'clean_urls' => (bool) variable_get('clean_url', false),
  );
  drupal_add_js(array(
    'invoice' => $a_invoice_js_settings,
  ), 'setting');
  drupal_add_js(drupal_get_path('module', 'invoice') . '/javascript/invoice.js', 'module');
  drupal_add_css(drupal_get_path('module', 'invoice') . '/invoice.css');
}