/[drupal]/contributions/modules/jsv/jsv.module
ViewVC logotype

Diff of /contributions/modules/jsv/jsv.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2, Thu Sep 6 20:45:34 2007 UTC revision 1.3, Thu Oct 4 18:02:10 2007 UTC
# Line 2  Line 2 
2    
3  /**  /**
4  * Implementation of hook_init().  * Implementation of hook_init().
5    * TODO: change this to an initializing function the developer must add
6    *   in the needed scope so this is not added for every page.
7  */  */
8  function jsv_init() {  function jsv_init() {
9    drupal_add_js(drupal_get_path('module', 'jsv').'/js/validator.js');    drupal_add_js(drupal_get_path('module', 'jsv').'/js/validator.js');
10    drupal_add_css(drupal_get_path('module', 'jsv').'/css/validator.css');    drupal_add_css(drupal_get_path('module', 'jsv').'/css/validator.css');
11    
12      theme('jsv_settings');
13    }
14    
15    /**
16    * Settings.
17    * TODO: change to drupal_alter hook in D6
18    */
19    function theme_jsv_settings(){
20      $settings = array('jsv' => array(
21          // ORIENTATIONS
22          'orientationValid' => 'before',
23          'orientationError' => 'before',
24          // MESSAGES
25          'validMessages'    => TRUE,             // should valid messages even display
26          'errorNumeric'     => 'Numbers only.',  // numeric error message
27          'errorEmail'       => 'Invalid email.', // email error message
28        ),);
29    
30      drupal_add_js($settings, 'setting');
31  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.2