/[drupal]/contributions/modules/yui_calendar/yuicalendar.module
ViewVC logotype

Diff of /contributions/modules/yui_calendar/yuicalendar.module

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

revision 1.9.2.1, Wed Mar 19 20:23:07 2008 UTC revision 1.9.2.2, Mon Mar 24 16:42:11 2008 UTC
# Line 24  function yuicalendar_form_alter(&$form, Line 24  function yuicalendar_form_alter(&$form,
24    elseif (isset($form['type']) && $form['type']['#value'].'_node_form' === $form_id && isset($form['author']) && isset($form['author']['date'])) {    elseif (isset($form['type']) && $form['type']['#value'].'_node_form' === $form_id && isset($form['author']) && isset($form['author']['date'])) {
25      yuicalendar_build_form($form['author'], 'date', $form['created']['#value'], 5, variable_get('yuicalendar_edit_drop_down', '1'), NULL);      yuicalendar_build_form($form['author'], 'date', $form['created']['#value'], 5, variable_get('yuicalendar_edit_drop_down', '1'), NULL);
26    }    }
   $form['yuicalendar'] = Array('#type' => 'weight');  
27  }  }
28    
29    /**
30     * Implementation of hook_nodeapi().
31     */
32  function yuicalendar_nodeapi($node, $op) {  function yuicalendar_nodeapi($node, $op) {
33    switch ($op) {    switch ($op) {
34      case 'validate':      case 'validate':
# Line 75  function yuicalendar_build_form(&$form, Line 77  function yuicalendar_build_form(&$form,
77        '#value' => $date_only);        '#value' => $date_only);
78    }    }
79    
80      $form['yuicalendar'] = Array('#type' => 'hidden');
81    
82    // Wrap and set the weight of the form element being transformed into a calendar/date    // Wrap and set the weight of the form element being transformed into a calendar/date
83    $form[$id]['#attributes'] = array('class' => 'yuicalendar');    $form[$id]['#attributes'] = array('class' => 'yuicalendar');
84    $form[$id]['#prefix'] = '<div class="yuicalendar-wrapper"><div class="yuicalendar-date">';    $form[$id]['#prefix'] = '<div class="yuicalendar-wrapper"><div class="yuicalendar-date">';
# Line 172  function yuicalendar_load() { Line 176  function yuicalendar_load() {
176    
177    $path = drupal_get_path('module', 'yuicalendar');    $path = drupal_get_path('module', 'yuicalendar');
178    
179    $yui_source = variable_get('yui_source', 'http://yui.yahooapis.com/2.3.1');    $yui_source = variable_get('yui_source', 'http://yui.yahooapis.com/2.5.1');
180    
181    yui_add_js('calendar', $yui_source, '/build/yahoo/yahoo-min.js');    yui_add_js('calendar', $yui_source, '/build/yahoo/yahoo-min.js');
182    yui_add_js('calendar', $yui_source, '/build/yahoo-dom-event/yahoo-dom-event.js');    yui_add_js('calendar', $yui_source, '/build/yahoo-dom-event/yahoo-dom-event.js');

Legend:
Removed from v.1.9.2.1  
changed lines
  Added in v.1.9.2.2

  ViewVC Help
Powered by ViewVC 1.1.2