You are here

function date_popup_update_6001 in Date 6.2

Update default path for date popup css

File

date_popup/date_popup.install, line 104

Code

function date_popup_update_6001() {
  $ret = array();
  $version = function_exists('jquery_ui_get_version') ? jquery_ui_get_version() : '1.6';
  switch ($version) {
    case '1.6':
      $path = drupal_get_path('module', 'date_popup') . '/themes/datepicker.css';
      break;
    default:
      $path = drupal_get_path('module', 'date_popup') . '/themes/datepicker.1.7.css';
      break;
  }
  variable_set('date_popup_css_file', $path);
  if (!module_exists('jquery_ui')) {
    drupal_set_message('The jQuery UI module is now required when using Date Popup. See the <a href="http://drupal.org/project/jquery_ui">jQuery UI</a> page for installation instructions.', 'error');
  }
  return $ret;
}