You are here

function format_number_add_js in Format Number API 7

Same name and namespace in other branches
  1. 6 format_number.module \format_number_add_js()

Expose a javascript version of the Format Number API.

1 call to format_number_add_js()
theme_numericfield in ./format_number.module
Render a numeric form element.

File

./format_number.module, line 156
This module provides a method to configure number formats (site default and user defined) with configurable decimal point and thousand separators. It also exposes several functions that can be used by other contributed or custom modules to display…

Code

function format_number_add_js() {
  static $ready;
  if (!isset($ready)) {
    $ready = TRUE;
    $module_path = drupal_get_path('module', 'format_number');
    drupal_add_css($module_path . '/format_number.css');
    drupal_add_js($module_path . '/format_number.js');
    drupal_add_js(array(
      'format_number' => format_number_get_options(),
    ), 'setting');
  }
}