[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/date/date_popup/ -> date_popup.js (source)

   1  // $Id: date_popup.js,v 1.1.2.4 2010/11/20 12:03:36 karens Exp $
   2  
   3  /**
   4   * Attaches the calendar behavior to all required fields
   5   */
   6  Drupal.behaviors.date_popup = function (context) {
   7    for (var id in Drupal.settings.datePopup) {
   8      $('#'+ id).bind('focus', Drupal.settings.datePopup[id], function(e) {
   9        if (!$(this).hasClass('date-popup-init')) {
  10          var datePopup = e.data;
  11          // Explicitely filter the methods we accept.
  12          switch (datePopup.func) {
  13            case 'datepicker':
  14              $(this)
  15                .datepicker(datePopup.settings)
  16                .addClass('date-popup-init')
  17              $(this).click(function(){
  18                $(this).focus();
  19              });
  20              break;
  21  
  22            case 'timeEntry':
  23              $(this)
  24                .timeEntry(datePopup.settings)
  25                .addClass('date-popup-init')
  26              $(this).click(function(){
  27                $(this).focus();
  28              });
  29              break;
  30          }
  31        }
  32      });
  33    }
  34  };


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7